Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[DependencyInjection] Add abstract_arg() and param()#36775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
src/Symfony/Component/DependencyInjection/Loader/Configurator/ContainerConfigurator.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
f76faf8 toa94be60Comparea94be60 to1871889Comparesrc/Symfony/Component/DependencyInjection/Loader/Configurator/ContainerConfigurator.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
nicolas-grekas commentedMay 12, 2020
What do you think about adding this also? functionenv(string$name):string{return'%env('.$name.')%';} |
src/Symfony/Component/DependencyInjection/Loader/Configurator/ContainerConfigurator.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
wouterj commentedMay 12, 2020
I like the idea, but I think env vars might need a special configurator to get rid of the "complex" strings like |
nicolas-grekas commentedMay 12, 2020
Honestly, teaching ppl with the real syntax is going to empower them much more than using some extremely specific DSL here. |
1871889 to08ff298Compare08ff298 to1fd4e8bCompare…onfiguration in core (fabpot)This PR was merged into the 5.2-dev branch.Discussion----------Use PHP instead of XML as the prefered service/route configuration in core| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | yes-ish <!-- please update src/**/CHANGELOG.md files -->| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tickets | n/a <!-- prefix each issue number with "Fix #", if any -->| License | MIT| Doc PR | n/aIn Symfony 6, I (we?) would want to promote usage of configuration written in PHP instead of YAML. For third-party bundles and core, we should do the same, replacing XML with PHP. Doing so would remove the need for the XML lib for core.The biggest advantage is auto-completion with any modern IDE without explicit support for Symfony, and probably one less thing to learn (how to configure things in YAML/XML).Be warned that it does NOT concern semantic configuration which is much harder.This PR does the work for the Twig bundle as an example. Once we agreed on the CS, the same should then be done for other core bundles both for service configuration and route configuration.Embeds#36775 until it is merged.Commits-------0aedd54 [Twig] Move configuration to PHP
stof commentedJun 10, 2020
this misses the update of the changelog of the component |
Uh oh!
There was an error while loading.Please reload this page.
Added abstract_arg() and param() to configuration abstract arguments in PHP DSL.