8000 minor #18295 [Fix pipeline] multiple_kernels.rst must respect doctor-… · symfony/symfony-docs@e562839 · GitHub
[go: up one dir, main page]

Skip to content

Commit e562839

Browse files
committed
minor #18295 [Fix pipeline] multiple_kernels.rst must respect doctor-rst (alamirault)
This PR was squashed before being merged into the 5.4 branch. Discussion ---------- [Fix pipeline] multiple_kernels.rst must respect doctor-rst #18186 (comment) `apps` -> `applications` `ContainerConfigurator $container` -> `ContainerConfigurator $containerConfigurator` Commits ------- 07f6609 [Fix pipeline] multiple_kernels.rst must respect doctor-rst
2 parents 0480fdc + 07f6609 commit e562839

File tree

2 files changed

+23
-9
lines changed

2 files changed

+23
-9
lines changed

.doctor-rst.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,17 @@ whitelist:
101101
- '// bin/console'
102102
- '.. _`a feature to test applications using Mercure`: https://github.com/symfony/panther#creating-isolated-browsers-to-test-apps-using-mercure-or-websocket'
103103
- '.. End to End Tests (E2E)'
104+
- 'First, create a new ``apps`` directory at the root of your project, which will' # configuration/multiple_kernels.rst
105+
- '├─ apps/' # configuration/multiple_kernels.rst
106+
- '``apps/`` directory. Therefore, you should carefully consider what is' # configuration/multi 10000 ple_kernels.rst
107+
- 'Since the new ``apps/api/src/`` directory will host the PHP code related to the' # configuration/multiple_kernels.rst
108+
- '"Api\\": "apps/api/src/"' # configuration/multiple_kernels.rst
109+
- "return $this->getProjectDir().'/apps/'.$this->id.'/config';" # configuration/multiple_kernels.rst
110+
- '``apps/`` as it is used in the Kernel to load the specific application' # configuration/multiple_kernels.rst
111+
- '``apps/admin/templates/`` which you will need to manually configure under the' # configuration/multiple_kernels.rst
112+
- '# apps/admin/config/packages/twig.yaml' # configuration/multiple_kernels.rst
113+
- "'%kernel.project_dir%/apps/admin/templates': Admin" # configuration/multiple_kernels.rst
114+
- '// apps/api/tests/ApiTestCase.php' # configuration/multiple_kernels.rst
115+
- 'Now, create a ``tests/`` directory inside the ``apps/api/`` application. Then,' # configuration/multiple_kernels.rst
116+
- '"Api\\Tests\\": "apps/api/tests/"' # configuration/multiple_kernels.rst
117+
- '<directory>apps/api/tests</directory>' # configuration/multiple_kernels.rst

configuration/multiple_kernels.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,12 @@ resources::
164164
return ($_SERVER['APP_LOG_DIR'] ?? $this->getProjectDir().'/var/log').'/'.$this->id;
165165
}
166166

167-
protected function configureContainer(ContainerConfigurator $container): void
167+
protected function configureContainer(ContainerConfigurator $containerConfigurator): void
168168
{
169169
// load common config files, such as the framework.yaml, as well as
170170
// specific configs required exclusively for the app itself
171-
$this->doConfigureContainer($container, $this->getSharedConfigDir());
172-
$this->doConfigureContainer($container, $this->getAppConfigDir());
171+
$this->doConfigureContainer($containerConfigurator, $this->getSharedConfigDir());
172+
$this->doConfigureContainer($containerConfigurator, $this->getAppConfigDir());
173173
}
174174

175175
protected function configureRoutes(RoutingConfigurator $routes): void
@@ -180,16 +180,16 @@ resources::
180180
$this->doConfigureRoutes($routes, $this->getAppConfigDir());
181181
}
182182

183-
private function doConfigureContainer(ContainerConfigurator $container, string $configDir): void
183+
private function doConfigureContainer(ContainerConfigurator $containerConfigurator, string $configDir): void
184184
{
185-
$container->import($configDir.'/{packages}/*.{php,yaml}');
186-
$container->import($configDir.'/{packages}/'.$this->environment.'/*.{php,yaml}');
185+
$containerConfigurator->import($configDir.'/{packages}/*.{php,yaml}');
186+
$containerConfigurator->import($configDir.'/{packages}/'.$this->environment.'/*.{php,yaml}');
187187

188188
if (is_file($configDir.'/services.yaml')) {
189-
$container->import($configDir.'/services.yaml');
190-
$container->import($configDir.'/{services}_'.$this->environment.'.yaml');
189+
$containerConfigurator->import($configDir.'/services.yaml');
190+
$containerConfigurator->import($configDir.'/{services}_'.$this->environment.'.yaml');
191191
} else {
192-
$container->import($configDir.'/{services}.php');
192+
$containerConfigurator->import($configDir.'/{services}.php');
193193
}
194194
}
195195

0 commit comments

Comments
 (0)
0