diff --git a/assetic/yuicompressor.rst b/assetic/yuicompressor.rst index 9b83aa99f48..92a3ed0348d 100644 --- a/assetic/yuicompressor.rst +++ b/assetic/yuicompressor.rst @@ -38,9 +38,9 @@ stylesheets: # java: '/usr/bin/java' filters: yui_css: - jar: '%kernel.root_dir%/Resources/java/yuicompressor.jar' + jar: '%kernel.project_dir%/app/Resources/java/yuicompressor.jar' yui_js: - jar: '%kernel.root_dir%/Resources/java/yuicompressor.jar' + jar: '%kernel.project_dir%/app/Resources/java/yuicompressor.jar' .. code-block:: xml @@ -57,10 +57,10 @@ stylesheets: + jar="%kernel.project_dir%/app/Resources/java/yuicompressor.jar" /> + jar="%kernel.project_dir%/app/Resources/java/yuicompressor.jar" /> @@ -71,10 +71,10 @@ stylesheets: // 'java' => '/usr/bin/java', 'filters' => array( 'yui_css' => array( - 'jar' => '%kernel.root_dir%/Resources/java/yuicompressor.jar', + 'jar' => '%kernel.project_dir%/app/Resources/java/yuicompressor.jar', ), 'yui_js' => array( - 'jar' => '%kernel.root_dir%/Resources/java/yuicompressor.jar', + 'jar' => '%kernel.project_dir%/app/Resources/java/yuicompressor.jar', ), ), )); diff --git a/bundles/installation.rst b/bundles/installation.rst index 755b050f3fd..c37752b8388 100644 --- a/bundles/installation.rst +++ b/bundles/installation.rst @@ -125,7 +125,7 @@ The output will look like this: use_controller: enabled: '%kernel.debug%' profiler: false - read_from: '%kernel.root_dir%/../web' + read_from: '%kernel.project_dir%/web' write_to: '%assetic.read_from%' java: /usr/bin/java node: /usr/local/bin/node diff --git a/components/dependency_injection/_imports-parameters-note.rst.inc b/components/dependency_injection/_imports-parameters-note.rst.inc index dc9917d370e..bcaff4c1bfc 100644 --- a/components/dependency_injection/_imports-parameters-note.rst.inc +++ b/components/dependency_injection/_imports-parameters-note.rst.inc @@ -10,7 +10,7 @@ # app/config/config.yml imports: - - { resource: '%kernel.root_dir%/parameters.yml' } + - { resource: '%kernel.project_dir%/app/parameters.yml' } .. code-block:: xml @@ -22,11 +22,11 @@ http://symfony.com/schema/dic/services/services-1.0.xsd"> - + .. code-block:: php // app/config/config.php - $loader->import('%kernel.root_dir%/parameters.yml'); + $loader->import('%kernel.project_dir%/app/parameters.yml'); diff --git a/configuration.rst b/configuration.rst index 65c64908f70..e6a4358210a 100644 --- a/configuration.rst +++ b/configuration.rst @@ -25,7 +25,7 @@ The main configuration file is called ``config.yml``: framework: secret: '%secret%' - router: { resource: '%kernel.root_dir%/config/routing.yml' } + router: { resource: '%kernel.project_dir%/app/config/routing.yml' } # ... # Twig Configuration @@ -57,7 +57,7 @@ The main configuration file is called ``config.yml``: - + @@ -77,7 +77,7 @@ The main configuration file is called ``config.yml``: $container->loadFromExtension('framework', array( 'secret' => '%secret%', 'router' => array( - 'resource' => '%kernel.root_dir%/config/routing.php', + 'resource' => '%kernel.project_dir%/app/config/routing.php', ), // ... )); diff --git a/configuration/configuration_organization.rst b/configuration/configuration_organization.rst index 7d5a6074e4d..5c22dfc2572 100644 --- a/configuration/configuration_organization.rst +++ b/configuration/configuration_organization.rst @@ -23,7 +23,7 @@ class:: public function registerContainerConfiguration(LoaderInterface $loader) { - $loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml'); + $loader->load($this->getProjectDir().'/app/config/config_'.$this->getEnvironment().'.yml'); } } @@ -99,7 +99,7 @@ method:: public function registerContainerConfiguration(LoaderInterface $loader) { - $loader->load($this->getRootDir().'/config/'.$this->getEnvironment().'/config.yml'); + $loader->load($this->getProjectDir().'/app/config/'.$this->getEnvironment().'/config.yml'); } } @@ -196,7 +196,7 @@ make Symfony aware of the new file organization:: public function registerContainerConfiguration(LoaderInterface $loader) { - $loader->load($this->getRootDir().'/config/environments/'.$this->getEnvironment().'.yml'); + $loader->load($this->getProjectDir().'/app/config/environments/'.$this->getEnvironment().'.yml'); } } diff --git a/configuration/environments.rst b/configuration/environments.rst index 2e095d4057d..a726ecf2a65 100644 --- a/configuration/environments.rst +++ b/configuration/environments.rst @@ -45,7 +45,7 @@ class: public function registerContainerConfiguration(LoaderInterface $loader) { - $loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml'); + $loader->load($this->getProjectDir().'/app/config/config_'.$this->getEnvironment().'.yml'); } } diff --git a/configuration/multiple_kernels.rst b/configuration/multiple_kernels.rst index 02666493c09..b9159e7dc4f 100644 --- a/configuration/multiple_kernels.rst +++ b/configuration/multiple_kernels.rst @@ -101,7 +101,7 @@ they don't collide with the files from ``AppKernel``:: public function registerContainerConfiguration(LoaderInterface $loader) { - $loader->load($this->getRootDir().'/config/api/config_'.$this->getEnvironment().'.yml'); + $loader->load($this->getProjectDir().'/app/config/api/config_'.$this->getEnvironment().'.yml'); } } @@ -176,7 +176,7 @@ In order to solve this issue, add the following configuration to your kernel: twig: paths: # allows to use app/Resources/views/ templates in the ApiKernel - "%kernel.root_dir%/../app/Resources/views": ~ + "%kernel.project_dir%/app/Resources/views": ~ Adding more Kernels to the Application -------------------------------------- diff --git a/configuration/override_dir_structure.rst b/configuration/override_dir_structure.rst index 4299af5b975..5bcea693383 100644 --- a/configuration/override_dir_structure.rst +++ b/configuration/override_dir_structure.rst @@ -135,7 +135,7 @@ You also need to change the ``extra.symfony-web-dir`` option in the # ... assetic: # ... - read_from: '%kernel.root_dir%/../../public_html' + read_from: '%kernel.project_dir%/../public_html' .. code-block:: xml @@ -150,7 +150,7 @@ You also need to change the ``extra.symfony-web-dir`` option in the http://symfony.com/schema/dic/assetic/assetic-1.0.xsd"> - + .. code-block:: php @@ -160,7 +160,7 @@ You also need to change the ``extra.symfony-web-dir`` option in the // ... $container->loadFromExtension('assetic', array( // ... - 'read_from' => '%kernel.root_dir%/../../public_html', + 'read_from' => '%kernel.project_dir%/../public_html', )); Now you just need to clear the cache and dump the assets again and your diff --git a/controller/upload_file.rst b/controller/upload_file.rst index c2be4805f8a..e91db665b16 100644 --- a/controller/upload_file.rst +++ b/controller/upload_file.rst @@ -165,7 +165,7 @@ controller to specify the directory in which the brochures should be stored: # ... parameters: - brochures_directory: '%kernel.root_dir%/../web/uploads/brochures' + brochures_directory: '%kernel.project_dir%/web/uploads/brochures' There are some important things to consider in the code of the above controller: diff --git a/doctrine.rst b/doctrine.rst index c342d2d9c08..398aa521b02 100644 --- a/doctrine.rst +++ b/doctrine.rst @@ -207,7 +207,7 @@ can automatically generate an empty ``test_project`` database for you: doctrine: dbal: driver: pdo_sqlite - path: '%kernel.root_dir%/sqlite.db' + path: '%kernel.project_dir%/app/sqlite.db' charset: UTF8 .. code-block:: xml @@ -225,7 +225,7 @@ can automatically generate an empty ``test_project`` database for you: @@ -236,7 +236,7 @@ can automatically generate an empty ``test_project`` database for you: $container->loadFromExtension('doctrine', array( 'dbal' => array( 'driver' => 'pdo_sqlite', - 'path' => '%kernel.root_dir%/sqlite.db', + 'path' => '%kernel.project_dir%/app/sqlite.db', 'charset' => 'UTF-8', ), )); diff --git a/email/spool.rst b/email/spool.rst index 829c9f789ee..3e441d764d7 100644 --- a/email/spool.rst +++ b/email/spool.rst @@ -111,12 +111,12 @@ In order to use the spool with files, use the following configuration: .. tip:: If you want to store the spool somewhere with your project directory, - remember that you can use the ``%kernel.root_dir%`` parameter to reference + remember that you can use the ``%kernel.project_dir%`` parameter to reference the project's root: .. code-block:: yaml - path: '%kernel.root_dir%/spool' + path: '%kernel.project_dir%/app/spool' Now, when your app sends an email, it will not actually be sent but instead added to the spool. Sending the messages from the spool is done separately. diff --git a/frontend/custom_version_strategy.rst b/frontend/custom_version_strategy.rst index 12f9aafefcd..2b402372603 100644 --- a/frontend/custom_version_strategy.rst +++ b/frontend/custom_version_strategy.rst @@ -117,7 +117,7 @@ After creating the strategy PHP class, register it as a Symfony service. app.assets.versioning.gulp_buster: class: AppBundle\Asset\VersionStrategy\GulpBusterVersionStrategy arguments: - - "%kernel.root_dir%/../busters.json" + - "%kernel.project_dir%/busters.json" - "%%s?version=%%s" public: false @@ -133,7 +133,7 @@ After creating the strategy PHP class, register it as a Symfony service. - %kernel.root_dir%/../busters.json + %kernel.project_dir%/busters.json %%s?version=%%s @@ -147,7 +147,7 @@ After creating the strategy PHP class, register it as a Symfony service. $definition = new Definition( 'AppBundle\Asset\VersionStrategy\GulpBusterVersionStrategy', array( - '%kernel.root_dir%/../busters.json', + '%kernel.project_dir%/busters.json', '%%s?version=%%s', ) ); diff --git a/quick_tour/the_architecture.rst b/quick_tour/the_architecture.rst index 426618396d6..ea0713def34 100644 --- a/quick_tour/the_architecture.rst +++ b/quick_tour/the_architecture.rst @@ -156,7 +156,7 @@ or PHP. Have a look at this sample of the default Symfony configuration: #translator: { fallbacks: ['%locale%'] } secret: '%secret%' router: - resource: '%kernel.root_dir%/config/routing.yml' + resource: '%kernel.project_dir%/app/config/routing.yml' strict_requirements: '%kernel.debug%' form: true csrf_protection: true @@ -198,7 +198,7 @@ the ``config_dev.yml`` file, which loads the main configuration (i.e. - { resource: config.yml } framework: - router: { resource: '%kernel.root_dir%/config/routing_dev.yml' } + router: { resource: '%kernel.project_dir%/app/config/routing_dev.yml' } profiler: { only_exceptions: false } web_profiler: diff --git a/reference/configuration/assetic.rst b/reference/configuration/assetic.rst index b0a9f40993a..4331d8117a7 100644 --- a/reference/configuration/assetic.rst +++ b/reference/configuration/assetic.rst @@ -20,7 +20,7 @@ Full Default Configuration enabled: '%kernel.debug%' profiler: false read_from: '%assetic.read_from%' - write_to: '%kernel.root_dir%/../web' + write_to: '%kernel.project_dir%/web' java: /usr/bin/java node: /usr/bin/node ruby: /usr/bin/ruby @@ -78,7 +78,7 @@ Full Default Configuration debug="%kernel.debug%" use-controller="%kernel.debug%" read-from="%assetic.read_from%" - write-to="%kernel.root_dir%/../web" + write-to="%kernel.project_dir%/web" java="/usr/bin/java" node="/usr/bin/node" sass="/usr/bin/sass"> diff --git a/reference/configuration/doctrine.rst b/reference/configuration/doctrine.rst index 8d9c25cb5e4..9aa3df3d73b 100644 --- a/reference/configuration/doctrine.rst +++ b/reference/configuration/doctrine.rst @@ -205,7 +205,7 @@ Full Default Configuration password="secret" driver="pdo_mysql" driver-class="MyNamespace\MyDriverImpl" - path="%kernel.root_dir%/../var/data/data.sqlite" + path="%kernel.project_dir%/var/data/data.sqlite" memory="true" unix-socket="/tmp/mysql.sock" wrapper-class="MyDoctrineDbalConnectionWrapper" @@ -264,7 +264,7 @@ Full Default Configuration @@ -340,7 +340,7 @@ Path to the mapping or entity files (depending on the driver). If this path is relative it is assumed to be relative to the bundle root. This only works if the name of your mapping is a bundle name. If you want to use this option to specify absolute paths you should prefix the path with the kernel parameters -that exist in the DIC (for example ``%kernel.root_dir%``). +that exist in the DIC (for example ``%kernel.project_dir%``). prefix ...... @@ -398,7 +398,7 @@ The following block shows all possible configuration keys: # the DBAL driverOptions option options: foo: bar - path: '%kernel.root_dir%/data/data.sqlite' + path: '%kernel.project_dir%/app/data/data.sqlite' memory: true unix_socket: /tmp/mysql.sock # the DBAL wrapperClass option @@ -434,7 +434,7 @@ The following block shows all possible configuration keys: password="secret" driver="pdo_mysql" driver-class="MyNamespace\MyDriverImpl" - path="%kernel.root_dir%/../var/data/data.sqlite" + path="%kernel.project_dir%/var/data/data.sqlite" memory="true" unix-socket="/tmp/mysql.sock" wrapper-class="MyDoctrineDbalConnectionWrapper" @@ -605,7 +605,7 @@ namespace in the ``src/Entity`` directory and gives them an ``App`` alias # ... SomeEntityNamespace: type: annotation - dir: '%kernel.root_dir%/../src/Entity' + dir: '%kernel.project_dir%/src/Entity' is_bundle: false prefix: App\Entity alias: App @@ -620,7 +620,7 @@ namespace in the ``src/Entity`` directory and gives them an ``App`` alias array( 'SomeEntityNamespace' => array( 'type' => 'annotation', - 'dir' => '%kernel.root_dir%/../src/Entity', + 'dir' => '%kernel.project_dir%/src/Entity', 'is_bundle' => false, 'prefix' => 'App\Entity', 'alias' => 'App', diff --git a/reference/configuration/twig.rst b/reference/configuration/twig.rst index 3e44d69b31e..f09d05fe319 100644 --- a/reference/configuration/twig.rst +++ b/reference/configuration/twig.rst @@ -53,7 +53,7 @@ TwigBundle Configuration ("twig") auto_reload: ~ optimizations: ~ paths: - '%kernel.root_dir%/../vendor/acme/foo-bar/templates': foo_bar + '%kernel.project_dir%/vendor/acme/foo-bar/templates': foo_bar .. code-block:: xml @@ -81,7 +81,7 @@ TwigBundle Configuration ("twig") 3.14 AcmeFooBundle:Exception:showException - %kernel.root_dir%/../vendor/acme/foo-bar/templates + %kernel.project_dir%/vendor/acme/foo-bar/templates @@ -107,7 +107,7 @@ TwigBundle Configuration ("twig") 'exception_controller' => 'AcmeFooBundle:Exception:showException', 'optimizations' => true, 'paths' => array( - '%kernel.root_dir%/../vendor/acme/foo-bar/templates' => 'foo_bar', + '%kernel.project_dir%/vendor/acme/foo-bar/templates' => 'foo_bar', ), )); @@ -269,7 +269,7 @@ The values of the ``paths`` option are defined as ``key: value`` pairs where the twig: # ... paths: - '%kernel.root_dir%/../vendor/acme/foo-bar/templates': ~ + '%kernel.project_dir%/vendor/acme/foo-bar/templates': ~ .. code-block:: xml @@ -282,7 +282,7 @@ The values of the ``paths`` option are defined as ``key: value`` pairs where the - %kernel.root_dir%/../vendor/acme/foo-bar/templates + %kernel.project_dir%/vendor/acme/foo-bar/templates @@ -292,7 +292,7 @@ The values of the ``paths`` option are defined as ``key: value`` pairs where the $container->loadFromExtension('twig', array( // ... 'paths' => array( - '%kernel.root_dir%/../vendor/acme/foo-bar/templates' => null, + '%kernel.project_dir%/vendor/acme/foo-bar/templates' => null, ), )); @@ -312,7 +312,7 @@ for that directory: twig: # ... paths: - '%kernel.root_dir%/../vendor/acme/foo-bar/templates': 'foo_bar' + '%kernel.project_dir%/vendor/acme/foo-bar/templates': 'foo_bar' .. code-block:: xml @@ -325,7 +325,7 @@ for that directory: - %kernel.root_dir%/../vendor/acme/foo-bar/templates + %kernel.project_dir%/vendor/acme/foo-bar/templates @@ -335,7 +335,7 @@ for that directory: $container->loadFromExtension('twig', array( // ... 'paths' => array( - '%kernel.root_dir%/../vendor/acme/foo-bar/templates' => 'foo_bar', + '%kernel.project_dir%/vendor/acme/foo-bar/templates' => 'foo_bar', ), )); diff --git a/session/sessions_directory.rst b/session/sessions_directory.rst index 4bfedda6304..bf57234dcf6 100644 --- a/session/sessions_directory.rst +++ b/session/sessions_directory.rst @@ -109,7 +109,7 @@ session directory to ``app/sessions``: framework: session: handler_id: session.handler.native_file - save_path: '%kernel.root_dir%/sessions' + save_path: '%kernel.project_dir%/app/sessions' .. code-block:: xml @@ -125,7 +125,7 @@ session directory to ``app/sessions``: > @@ -136,7 +136,7 @@ session directory to ``app/sessions``: $container->loadFromExtension('framework', array( 'session' => array( 'handler_id' => 'session.handler.native_file', - 'save_path' => '%kernel.root_dir%/sessions', + 'save_path' => '%kernel.project_dir%/app/sessions', ), )); diff --git a/templating/namespaced_paths.rst b/templating/namespaced_paths.rst index f3da711362b..cdd635623bf 100644 --- a/templating/namespaced_paths.rst +++ b/templating/namespaced_paths.rst @@ -46,7 +46,7 @@ directory: twig: # ... paths: - '%kernel.root_dir%/../vendor/acme/foo-bar/templates': foo_bar + '%kernel.project_dir%/vendor/acme/foo-bar/templates': foo_bar .. code-block:: xml @@ -58,7 +58,7 @@ directory: > - %kernel.root_dir%/../vendor/acme/foo-bar/templates + %kernel.project_dir%/vendor/acme/foo-bar/templates @@ -67,7 +67,7 @@ directory: // app/config/config.php $container->loadFromExtension('twig', array( 'paths' => array( - '%kernel.root_dir%/../vendor/acme/foo-bar/templates' => 'foo_bar', + '%kernel.project_dir%/vendor/acme/foo-bar/templates' => 'foo_bar', ), )); @@ -96,9 +96,9 @@ specific template doesn't exist. twig: # ... paths: - '%kernel.root_dir%/../vendor/acme/themes/theme1': theme - '%kernel.root_dir%/../vendor/acme/themes/theme2': theme - '%kernel.root_dir%/../vendor/acme/themes/common': theme + '%kernel.project_dir%/vendor/acme/themes/theme1': theme + '%kernel.project_dir%/vendor/acme/themes/theme2': theme + '%kernel.project_dir%/vendor/acme/themes/common': theme .. code-block:: xml @@ -109,9 +109,9 @@ specific template doesn't exist. > - %kernel.root_dir%/../vendor/acme/themes/theme1 - %kernel.root_dir%/../vendor/acme/themes/theme2 - %kernel.root_dir%/../vendor/acme/themes/common + %kernel.project_dir%/vendor/acme/themes/theme1 + %kernel.project_dir%/vendor/acme/themes/theme2 + %kernel.project_dir%/vendor/acme/themes/common @@ -120,9 +120,9 @@ specific template doesn't exist. // app/config/config.php $container->loadFromExtension('twig', array( 'paths' => array( - '%kernel.root_dir%/../vendor/acme/themes/theme1' => 'theme', - '%kernel.root_dir%/../vendor/acme/themes/theme2' => 'theme', - '%kernel.root_dir%/../vendor/acme/themes/common' => 'theme', + '%kernel.project_dir%/vendor/acme/themes/theme1' => 'theme', + '%kernel.project_dir%/vendor/acme/themes/theme2' => 'theme', + '%kernel.project_dir%/vendor/acme/themes/common' => 'theme', ), )); diff --git a/translation.rst b/translation.rst index dc63e407eb9..ab9cc438385 100644 --- a/translation.rst +++ b/translation.rst @@ -385,7 +385,7 @@ For more options, see :ref:`component-translator-message-catalogs`. framework: translator: paths: - - '%kernel.root_dir%/../translations' + - '%kernel.project_dir%/translations' .. code-block:: xml @@ -402,7 +402,7 @@ For more options, see :ref:`component-translator-message-catalogs`. - %kernel.root_dir%/../translations + %kernel.project_dir%/translations @@ -413,7 +413,7 @@ For more options, see :ref:`component-translator-message-catalogs`. $container->loadFromExtension('framework', array( 'translator' => array( 'paths' => array( - '%kernel.root_dir%/../translations', + '%kernel.project_dir%/translations', ), ), ));