mirror of
https://github.com/symfony/recipes.git
synced 2026-09-12 07:36:30 +03:00
Update Flex endpoint
This commit is contained in:
@@ -67,42 +67,11 @@
|
||||
"namespace App;",
|
||||
"",
|
||||
"use Symfony\\Bundle\\FrameworkBundle\\Kernel\\MicroKernelTrait;",
|
||||
"use Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ContainerConfigurator;",
|
||||
"use Symfony\\Component\\HttpKernel\\Kernel as BaseKernel;",
|
||||
"use Symfony\\Component\\Routing\\Loader\\Configurator\\RoutingConfigurator;",
|
||||
"",
|
||||
"class Kernel extends BaseKernel",
|
||||
"{",
|
||||
" use MicroKernelTrait;",
|
||||
"",
|
||||
" protected function configureContainer(ContainerConfigurator $container): void",
|
||||
" {",
|
||||
" $projectDir = $this->getProjectDir();",
|
||||
"",
|
||||
" $container->import($projectDir.'/config/{packages}/*.yaml');",
|
||||
" $container->import($projectDir.'/config/{packages}/'.$this->environment.'/*.yaml');",
|
||||
"",
|
||||
" if (is_file($projectDir.'/config/services.yaml')) {",
|
||||
" $container->import($projectDir.'/config/services.yaml');",
|
||||
" $container->import($projectDir.'/config/{services}_'.$this->environment.'.yaml');",
|
||||
" } else {",
|
||||
" $container->import($projectDir.'/config/{services}.php');",
|
||||
" }",
|
||||
" }",
|
||||
"",
|
||||
" protected function configureRoutes(RoutingConfigurator $routes): void",
|
||||
" {",
|
||||
" $projectDir = $this->getProjectDir();",
|
||||
"",
|
||||
" $routes->import($projectDir.'/config/{routes}/'.$this->environment.'/*.yaml');",
|
||||
" $routes->import($projectDir.'/config/{routes}/*.yaml');",
|
||||
"",
|
||||
" if (is_file($projectDir.'/config/routes.yaml')) {",
|
||||
" $routes->import($projectDir.'/config/routes.yaml');",
|
||||
" } else {",
|
||||
" $routes->import($projectDir.'/config/{routes}.php');",
|
||||
" }",
|
||||
" }",
|
||||
"}",
|
||||
""
|
||||
],
|
||||
@@ -216,7 +185,7 @@
|
||||
"executable": false
|
||||
}
|
||||
},
|
||||
"ref": "3665220abb623938e26f4696573a6eda7100b910"
|
||||
"ref": "d4131812e20853626928e73d3effef44014944c0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user