Skip to content

[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

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CHANGELOG
---

* Environment variable `SYMFONY_IDE` is read by default when `framework.ide` config is not set.
* Load PHP configuration files by default in the `MicroKernelTrait`
* Load PHP and XML configuration files by default in the `MicroKernelTrait`

6.0
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ private function configureContainer(ContainerConfigurator $container, LoaderInte
{
$configDir = $this->getConfigDir();

$container->import($configDir.'/{packages}/*.{php,yaml}');
$container->import($configDir.'/{packages}/'.$this->environment.'/*.{php,yaml}');
$container->import($configDir.'/{packages}/*.{yaml,xml,php}');
$container->import($configDir.'/{packages}/'.$this->environment.'/*.{yaml,xml,php}');

if (is_file($configDir.'/services.yaml')) {
$container->import($configDir.'/services.yaml');
Expand All @@ -74,8 +74,8 @@ private function configureRoutes(RoutingConfigurator $routes): void
{
$configDir = $this->getConfigDir();

$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')) {
Copy link
Member

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?

Copy link
Contributor Author

@ro0NL ro0NL Jan 25, 2022

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?

Copy link
Contributor Author

@ro0NL ro0NL Jan 25, 2022

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.

$routes->import($configDir.'/routes.yaml');
Expand Down