File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -91,15 +91,9 @@ files so they don't collide with the files from ``src/Kernel.php``::
9191 {
9292 use MicroKernelTrait;
9393
94- public function registerBundles()
94+ public function getProjectDir(): string
9595 {
96- // load only the bundles strictly needed for the API
97- $contents = require $this->getProjectDir().'/config/api_bundles.php';
98- foreach ($contents as $class => $envs) {
99- if ($envs[$this->environment] ?? $envs['all'] ?? false) {
100- yield new $class();
101- }
102- }
96+ return \dirname(__DIR__);
10397 }
10498
10599 public function getCacheDir(): string
@@ -131,6 +125,12 @@ files so they don't collide with the files from ``src/Kernel.php``::
131125 $routes->import('../config/api/{routes}/*.yaml');
132126 // ... load only the config routes strictly needed for the API
133127 }
128+
129+ private function getBundlesPath(): string
130+ {
131+ // load only the bundles strictly needed for the API
132+ return $this->getProjectDir().'/config/api_bundles.php';
133+ }
134134 }
135135
136136Step 3) Define the Kernel Configuration
You can’t perform that action at this time.
0 commit comments