Skip to content

Commit 2cfef4b

Browse files
Sander De la Marchefabpot
authored andcommitted
[FrameworkBundle] Allow PHP configuration in config/packages by default
1 parent bf8541f commit 2cfef4b

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ CHANGELOG
55
---
66

77
* Environment variable `SYMFONY_IDE` is read by default when `framework.ide` config is not set.
8+
* Load PHP configuration files by default in the `MicroKernelTrait`
89

910
6.0
1011
---

Kernel/MicroKernelTrait.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ private function configureContainer(ContainerConfigurator $container, LoaderInte
5050
{
5151
$configDir = $this->getConfigDir();
5252

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

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

77-
$routes->import($configDir.'/{routes}/'.$this->environment.'/*.yaml');
78-
$routes->import($configDir.'/{routes}/*.yaml');
77+
$routes->import($configDir.'/{routes}/'.$this->environment.'/*.{php,yaml}');
78+
$routes->import($configDir.'/{routes}/*.{php,yaml}');
7979

8080
if (is_file($configDir.'/routes.yaml')) {
8181
$routes->import($configDir.'/routes.yaml');

0 commit comments

Comments
 (0)