mirror of
https://github.com/symfony/recipes.git
synced 2026-09-17 18:16:34 +03:00
moved etc/ to config/ and web/ to public/
This commit is contained in:
@@ -21,7 +21,7 @@ serve_as_php:
|
||||
@printf "\033[32;49mServer listening on http://127.0.0.1:8000\033[39m\n";
|
||||
@printf "Quit the server with CTRL-C.\n"
|
||||
@printf "Run \033[32mcomposer require symfony/web-server-bundle\033[39m for a better web server\n"
|
||||
php -S 127.0.0.1:8000 -t web
|
||||
php -S 127.0.0.1:8000 -t public
|
||||
|
||||
serve:
|
||||
@${MAKE} serve_as_sf
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
"Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle": ["all"]
|
||||
},
|
||||
"copy-from-recipe": {
|
||||
"etc/": "%ETC_DIR%/",
|
||||
"src/": "%SRC_DIR%/",
|
||||
"web/": "%WEB_DIR%/"
|
||||
"config/": "%CONFIG_DIR%/",
|
||||
"public/": "%PUBLIC_DIR%/",
|
||||
"src/": "%SRC_DIR%/"
|
||||
},
|
||||
"composer-scripts": {
|
||||
"make cache-warmup": "script",
|
||||
"assets:install --symlink --relative %WEB_DIR%": "symfony-cmd"
|
||||
"assets:install --symlink --relative %PUBLIC_DIR%": "symfony-cmd"
|
||||
},
|
||||
"env": {
|
||||
"APP_ENV": "dev",
|
||||
@@ -18,8 +18,8 @@
|
||||
},
|
||||
"gitignore": [
|
||||
".env",
|
||||
"/public/bundles/",
|
||||
"/var/",
|
||||
"/vendor/",
|
||||
"/web/bundles/"
|
||||
"/vendor/"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ final class Kernel extends BaseKernel
|
||||
|
||||
public function registerBundles(): iterable
|
||||
{
|
||||
$contents = require dirname(__DIR__).'/etc/bundles.php';
|
||||
$contents = require dirname(__DIR__).'/config/bundles.php';
|
||||
foreach ($contents as $class => $envs) {
|
||||
if (isset($envs['all']) || isset($envs[$this->environment])) {
|
||||
yield new $class();
|
||||
@@ -39,7 +39,7 @@ final class Kernel extends BaseKernel
|
||||
|
||||
protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader): void
|
||||
{
|
||||
$confDir = dirname(__DIR__).'/etc';
|
||||
$confDir = dirname(__DIR__).'/config';
|
||||
$loader->load($confDir.'/packages/*'.self::CONFIG_EXTS, 'glob');
|
||||
if (is_dir($confDir.'/packages/'.$this->environment)) {
|
||||
$loader->load($confDir.'/packages/'.$this->environment.'/**/*'.self::CONFIG_EXTS, 'glob');
|
||||
@@ -49,7 +49,7 @@ final class Kernel extends BaseKernel
|
||||
|
||||
protected function configureRoutes(RouteCollectionBuilder $routes): void
|
||||
{
|
||||
$confDir = dirname(__DIR__).'/etc';
|
||||
$confDir = dirname(__DIR__).'/config';
|
||||
if (is_dir($confDir.'/routing/')) {
|
||||
$routes->import($confDir.'/routing/*'.self::CONFIG_EXTS, '/', 'glob');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user