-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] Allow XML configuration in config/packages by default #45167
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
Conversation
Let me fix that table for you. 🙃 |
$routes->import($configDir.'/{routes}/'.$this->environment.'/*.{php,yaml}'); | ||
$routes->import($configDir.'/{routes}/*.{php,yaml}'); | ||
$routes->import($configDir.'/{routes}/'.$this->environment.'/*.{php,xml,yaml}'); | ||
$routes->import($configDir.'/{routes}/*.{php,xml,yaml}'); | ||
|
||
if (is_file($configDir.'/routes.yaml')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm not mistaking shouldn't this case be covered as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new feature IMHO, previous PR explicitly targeted config/packages. I follow :)
changelog updated +1
sorry, i missed the else case.
@nicolas-grekas WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ideally i'd like this to be simple as $routes->import($configDir.'/routes.{php,xml,yaml}');
for services we could phase out services_<env>.ext
in favor when@<env>
notation IIUC.
Then everything is uniform IMHO.
i think @HypeMC's comment is valid, and this PR is a rabbit-hole :) i may very vell rewrite xml to php once we upgrade to 6.x :} thus not bothering you with out-of-the-box xml support or so. |
Maybe it’s time to deprecate XML support? |
@fabpot i let you decide .. maybe we miss its purpose :) generally we could have many formats, personally i'd aim for a more consise solution, eg. $c->import($configDir.'/services.{php,xml,yaml}');
$c->import($configDir.'/{packages}/*.{php,xml,yaml}');
$c->import($configDir.'/{packages}/'.$this->environment.'/*.{php,xml,yaml}');
$r->import($configDir.'/routes.{php,xml,yaml}');
$r->import($configDir.'/routes/<env>/*.{php,xml,yaml}');
Then, to make it waterproof we could forbid |
Uh oh!
There was an error while loading. Please reload this page.