-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DependencyInjection] Add abstract_arg() and param() #36775
Conversation
src/Symfony/Component/DependencyInjection/Loader/Configurator/ContainerConfigurator.php
Outdated
Show resolved
Hide resolved
f76faf8
to
a94be60
Compare
a94be60
to
1871889
Compare
src/Symfony/Component/DependencyInjection/Loader/Configurator/ContainerConfigurator.php
Outdated
Show resolved
Hide resolved
What do you think about adding this also? function env(string $name): string
{
return '%env('.$name.')%';
} |
src/Symfony/Component/DependencyInjection/Loader/Configurator/ContainerConfigurator.php
Outdated
Show resolved
Hide resolved
I like the idea, but I think env vars might need a special configurator to get rid of the "complex" strings like |
Honestly, teaching ppl with the real syntax is going to empower them much more than using some extremely specific DSL here. |
1871889
to
08ff298
Compare
08ff298
to
1fd4e8b
Compare
…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/a In 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
this misses the update of the changelog of the component |
Added abstract_arg() and param() to configuration abstract arguments in PHP DSL.