Commit 49cc99a
committed
minor #17507 Changing
This PR was submitted for the 6.2 branch but it was merged into the 6.3 branch instead.
Discussion
----------
Changing `enum:` example away from APP_ENV
https://symfony.com/doc/current/configuration/env_var_processors.html#built-in-environment-variable-processors
Reason: When I first read this, I was expecting that the Symfony-internal ways to get the environment (`{{ app.environment }}`, `$routingConfigurator->env()` ,etc.) would now return the enum. But this is not the case. So if you explain the new processor with exactly this example, there needs to be a caution box, explaining that Symfony's methods still return the string.
* If you don't agree with this change, I'd still open a separate PR to add the following info (taken from https://symfony.com/blog/new-in-symfony-6-2-improved-enum-support#enums-in-environment-variables), cause that's a missing piece of information here:
> The value stored in the ``CARD_SUIT`` env var would be a string like `'spades'` but the
> application will use the ``Suit::Spdes`` enum value.
* Besides, as the list of processors is getting longer and longer, I'd suggest to create a sub-heading for each (under "Built-In Environment Variable Processors") and sort them alphabetically, to get rid of the endless indentation, and improve scanability, and get them included in the TOC.
Should I create a PR for this? If yes, for which version?
Commits
-------
c099758 Changing `enum:` example away from APP_ENVenum: example away from APP_ENV (ThomasLandauer)1 file changed
+11
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
745 | 745 | | |
746 | 746 | | |
747 | 747 | | |
748 | | - | |
| 748 | + | |
749 | 749 | | |
750 | 750 | | |
751 | | - | |
752 | | - | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
753 | 755 | | |
754 | 756 | | |
755 | 757 | | |
| |||
758 | 760 | | |
759 | 761 | | |
760 | 762 | | |
761 | | - | |
| 763 | + | |
762 | 764 | | |
763 | 765 | | |
764 | 766 | | |
| |||
773 | 775 | | |
774 | 776 | | |
775 | 777 | | |
776 | | - | |
| 778 | + | |
777 | 779 | | |
778 | 780 | | |
779 | 781 | | |
780 | 782 | | |
781 | 783 | | |
782 | 784 | | |
783 | | - | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
784 | 789 | | |
785 | 790 | | |
786 | 791 | | |
| |||
0 commit comments