From 8794a4d04327f56a39107a40d5b3ee67b0748bc1 Mon Sep 17 00:00:00 2001 From: WouterJ Date: Sat, 28 Nov 2015 10:33:16 +0100 Subject: [PATCH 1/7] app/console -> bin/console --- book/bundles.rst | 2 +- book/configuration.rst | 6 +++--- book/controller.rst | 2 +- book/doctrine.rst | 24 ++++++++++++------------ book/installation.rst | 10 +++++----- book/page_creation.rst | 4 ++-- book/routing.rst | 6 +++--- book/security.rst | 2 +- book/service_container.rst | 6 +++--- book/templating.rst | 8 ++++---- book/translation.rst | 10 +++++----- 11 files changed, 40 insertions(+), 40 deletions(-) diff --git a/book/bundles.rst b/book/bundles.rst index ff09cc6fc3e..0fdfcfc088f 100644 --- a/book/bundles.rst +++ b/book/bundles.rst @@ -122,7 +122,7 @@ generating a basic bundle skeleton: .. code-block:: bash - $ php app/console generate:bundle --namespace=Acme/TestBundle + $ php bin/console generate:bundle --namespace=Acme/TestBundle The bundle skeleton generates a basic controller, template and routing resource that can be customized. You'll learn more about Symfony's command-line diff --git a/book/configuration.rst b/book/configuration.rst index da32a0e1afe..e307d464e26 100644 --- a/book/configuration.rst +++ b/book/configuration.rst @@ -122,13 +122,13 @@ FrameworkBundle configuration: .. code-block:: bash - $ app/console config:dump-reference FrameworkBundle + $ bin/console config:dump-reference FrameworkBundle The extension alias (configuration key) can also be used: .. code-block:: bash - $ app/console config:dump-reference framework + $ bin/console config:dump-reference framework .. note:: @@ -177,7 +177,7 @@ cached files and allow them to rebuild: .. code-block:: bash - $ php app/console cache:clear --env=prod --no-debug + $ php bin/console cache:clear --env=prod --no-debug .. note:: diff --git a/book/controller.rst b/book/controller.rst index cc7774d85b2..449e98b69e8 100644 --- a/book/controller.rst +++ b/book/controller.rst @@ -532,7 +532,7 @@ console command: .. code-block:: bash - $ php app/console debug:container + $ php bin/console debug:container .. versionadded:: 2.6 Prior to Symfony 2.6, this command was called ``container:debug``. diff --git a/book/doctrine.rst b/book/doctrine.rst index 87e894c1f45..e91ce4ec729 100644 --- a/book/doctrine.rst +++ b/book/doctrine.rst @@ -116,7 +116,7 @@ for you: .. code-block:: bash - $ php app/console doctrine:database:create + $ php bin/console doctrine:database:create .. sidebar:: Setting up the Database to be UTF8 @@ -128,8 +128,8 @@ for you: .. code-block:: bash - $ php app/console doctrine:database:drop --force - $ php app/console doctrine:database:create + $ php bin/console doctrine:database:drop --force + $ php bin/console doctrine:database:create There's no way to configure these defaults inside Doctrine, as it tries to be as agnostic as possible in terms of environment configuration. One way to solve @@ -227,7 +227,7 @@ just a simple PHP class. .. code-block:: bash - $ php app/console doctrine:generate:entity + $ php bin/console doctrine:generate:entity .. index:: single: Doctrine; Adding mapping metadata @@ -392,7 +392,7 @@ a regular PHP class, you need to create getter and setter methods (e.g. ``getNam .. code-block:: bash - $ php app/console doctrine:generate:entities AppBundle/Entity/Product + $ php bin/console doctrine:generate:entities AppBundle/Entity/Product This command makes sure that all the getters and setters are generated for the ``Product`` class. This is a safe command - you can run it over and @@ -434,10 +434,10 @@ mapping information) of a bundle or an entire namespace: .. code-block:: bash # generates all entities in the AppBundle - $ php app/console doctrine:generate:entities AppBundle + $ php bin/console doctrine:generate:entities AppBundle # generates all entities of bundles in the Acme namespace - $ php app/console doctrine:generate:entities Acme + $ php bin/console doctrine:generate:entities Acme .. note:: @@ -459,7 +459,7 @@ in your application. To do this, run: .. code-block:: bash - $ php app/console doctrine:schema:update --force + $ php bin/console doctrine:schema:update --force .. tip:: @@ -852,7 +852,7 @@ used earlier to generate the missing getter and setter methods: .. code-block:: bash - $ php app/console doctrine:generate:entities AppBundle + $ php bin/console doctrine:generate:entities AppBundle Next, add a new method - ``findAllOrderedByName()`` - to the newly generated repository class. This method will query for all the ``Product`` entities, @@ -906,7 +906,7 @@ you can let Doctrine create the class for you. .. code-block:: bash - $ php app/console doctrine:generate:entity --no-interaction \ + $ php bin/console doctrine:generate:entity --no-interaction \ --entity="AppBundle:Category" \ --fields="name:string(255)" @@ -1063,7 +1063,7 @@ methods for you: .. code-block:: bash - $ php app/console doctrine:generate:entities AppBundle + $ php bin/console doctrine:generate:entities AppBundle Ignore the Doctrine metadata for a moment. You now have two classes - ``Category`` and ``Product`` with a natural one-to-many relationship. The ``Category`` @@ -1092,7 +1092,7 @@ table, and ``product.category_id`` column, and new foreign key: .. code-block:: bash - $ php app/console doctrine:schema:update --force + $ php bin/console doctrine:schema:update --force .. note:: diff --git a/book/installation.rst b/book/installation.rst index 407cfc36704..898aeb24e1a 100644 --- a/book/installation.rst +++ b/book/installation.rst @@ -164,7 +164,7 @@ browsing the project directory and executing this command: .. code-block:: bash $ cd my_project_name/ - $ php app/console server:run + $ php bin/console server:run Then, open your browser and access the ``http://localhost:8000/`` URL to see the Welcome Page of Symfony: @@ -195,7 +195,7 @@ server with the ``server:stop`` command: .. code-block:: bash - $ php app/console server:stop + $ php bin/console server:stop Checking Symfony Application Configuration and Setup ---------------------------------------------------- @@ -265,7 +265,7 @@ If there are any issues, correct them now before moving on. If none of the previous methods work for you, change the umask so that the cache and log directories will be group-writable or world-writable (depending if the web server user and the command line user are in the same group or not). - To achieve this, put the following line at the beginning of the ``app/console``, + To achieve this, put the following line at the beginning of the ``bin/console``, ``web/app.php`` and ``web/app_dev.php`` files:: umask(0002); // This will let the permissions be 0775 @@ -306,7 +306,7 @@ several minutes to complete. .. code-block:: bash - $ php app/console security:check + $ php bin/console security:check A good security practice is to execute this command regularly to be able to update or replace compromised dependencies as soon as possible. @@ -331,7 +331,7 @@ of the Symfony Installer anywhere in your system: c:\projects\> php symfony demo Once downloaded, enter into the ``symfony_demo/`` directory and run the PHP's -built-in web server executing the ``php app/console server:run`` command. Access +built-in web server executing the ``php bin/console server:run`` command. Access to the ``http://localhost:8000`` URL in your browser to start using the Symfony Demo application. diff --git a/book/page_creation.rst b/book/page_creation.rst index c062182d5f8..e450fbd61e9 100644 --- a/book/page_creation.rst +++ b/book/page_creation.rst @@ -544,11 +544,11 @@ by changing one option in this configuration file. To find out how, see the :doc:`Configuration Reference ` section. Or, to get a big example dump of all of the valid configuration under a key, -use the handy ``app/console`` command: +use the handy ``bin/console`` command: .. code-block:: bash - $ app/console config:dump-reference framework + $ bin/console config:dump-reference framework There's a lot more power behind Symfony's configuration system, including environments, imports and parameters. To learn all of it, see the diff --git a/book/routing.rst b/book/routing.rst index ed0b4bf809c..e9cc99fc127 100644 --- a/book/routing.rst +++ b/book/routing.rst @@ -1393,7 +1393,7 @@ the command by running the following from the root of your project. .. code-block:: bash - $ php app/console debug:router + $ php bin/console debug:router .. versionadded:: 2.6 Prior to Symfony 2.6, this command was called ``router:debug``. @@ -1415,14 +1415,14 @@ the route name after the command: .. code-block:: bash - $ php app/console debug:router article_show + $ php bin/console debug:router article_show Likewise, if you want to test whether a URL matches a given route, you can use the ``router:match`` console command: .. code-block:: bash - $ php app/console router:match /blog/my-latest-post + $ php bin/console router:match /blog/my-latest-post This command will print which route the URL matches. diff --git a/book/security.rst b/book/security.rst index 094bb487bfe..5f410cac2ac 100644 --- a/book/security.rst +++ b/book/security.rst @@ -1363,7 +1363,7 @@ security vulnerability in your installed dependencies: .. code-block:: bash - $ php app/console security:check + $ php bin/console security:check A good security practice is to execute this command regularly to be able to update or replace compromised dependencies as soon as possible. Internally, diff --git a/book/service_container.rst b/book/service_container.rst index 2cb08ae4078..07845abad72 100644 --- a/book/service_container.rst +++ b/book/service_container.rst @@ -1147,7 +1147,7 @@ console. To show all services and the class for each service, run: .. code-block:: bash - $ php app/console debug:container + $ php bin/console debug:container .. versionadded:: 2.6 Prior to Symfony 2.6, this command was called ``container:debug``. @@ -1156,7 +1156,7 @@ By default, only public services are shown, but you can also view private servic .. code-block:: bash - $ php app/console debug:container --show-private + $ php bin/console debug:container --show-private .. note:: @@ -1170,7 +1170,7 @@ its id: .. code-block:: bash - $ php app/console debug:container my_mailer + $ php bin/console debug:container my_mailer Learn more ---------- diff --git a/book/templating.rst b/book/templating.rst index 4c1de72f752..26bfde3daee 100644 --- a/book/templating.rst +++ b/book/templating.rst @@ -1211,7 +1211,7 @@ should use the ``parent()`` Twig function to include everything from the ``style block of the base template. You can also include assets located in your bundles' ``Resources/public`` folder. -You will need to run the ``php app/console assets:install target [--symlink]`` +You will need to run the ``php bin/console assets:install target [--symlink]`` command, which moves (or symlinks) files into the correct location. (target is by default "web"). @@ -1391,7 +1391,7 @@ to create it). You're now free to customize the template. .. caution:: If you add a template in a new location, you *may* need to clear your - cache (``php app/console cache:clear``), even if you are in debug mode. + cache (``php bin/console cache:clear``), even if you are in debug mode. This logic also applies to base bundle templates. Suppose also that each template in AcmeBlogBundle inherits from a base template called @@ -1641,10 +1641,10 @@ console command: .. code-block:: bash # You can check by filename: - $ php app/console lint:twig app/Resources/views/article/recent_list.html.twig + $ php bin/console lint:twig app/Resources/views/article/recent_list.html.twig # or by directory: - $ php app/console lint:twig app/Resources/views + $ php bin/console lint:twig app/Resources/views .. _template-formats: diff --git a/book/translation.rst b/book/translation.rst index 7cd2fe0e8a9..3e02f2e65bf 100644 --- a/book/translation.rst +++ b/book/translation.rst @@ -387,7 +387,7 @@ For more options, see :ref:`component-translator-message-catalogs`. .. code-block:: bash - $ php app/console cache:clear + $ php bin/console cache:clear .. _book-translation-fallback: @@ -815,7 +815,7 @@ To inspect all messages in the ``fr`` locale for the AcmeDemoBundle, run: .. code-block:: bash - $ php app/console debug:translation fr AcmeDemoBundle + $ php bin/console debug:translation fr AcmeDemoBundle You will get this output: @@ -856,15 +856,15 @@ By default all domains are inspected, but it is possible to specify a single dom .. code-block:: bash - $ php app/console debug:translation en AcmeDemoBundle --domain=messages + $ php bin/console debug:translation en AcmeDemoBundle --domain=messages When bundles have a lot of messages, it is useful to display only the unused or only the missing messages, by using the ``--only-unused`` or ``--only-missing`` switches: .. code-block:: bash - $ php app/console debug:translation en AcmeDemoBundle --only-unused - $ php app/console debug:translation en AcmeDemoBundle --only-missing + $ php bin/console debug:translation en AcmeDemoBundle --only-unused + $ php bin/console debug:translation en AcmeDemoBundle --only-missing Summary ------- From 1461bdcf4e7ac8d7a0304ad30782e1987a03443b Mon Sep 17 00:00:00 2001 From: WouterJ Date: Sat, 28 Nov 2015 10:35:16 +0100 Subject: [PATCH 2/7] app/phpunit.xml.dist -> phpunit.xml.dist --- book/testing.rst | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/book/testing.rst b/book/testing.rst index 9dc85d4cba8..59d2c2c5428 100644 --- a/book/testing.rst +++ b/book/testing.rst @@ -28,11 +28,10 @@ command: .. code-block:: bash # specify the configuration directory on the command line - $ phpunit -c app/ + $ phpunit -The ``-c`` option tells PHPUnit to look in the ``app/`` directory for a configuration -file. If you're curious about the PHPUnit options, check out the ``app/phpunit.xml.dist`` -file. +PHPunit is configured by the ``phpunit.xml.dist`` file in the root of your +Symfony application. .. tip:: @@ -93,23 +92,23 @@ of your bundle:: Just like in your real application - autoloading is automatically enabled via the ``bootstrap.php.cache`` file (as configured by default in the -``app/phpunit.xml.dist`` file). +``phpunit.xml.dist`` file). Running tests for a given file or directory is also very easy: .. code-block:: bash # run all tests of the application - $ phpunit -c app + $ phpunit # run all tests in the Util directory - $ phpunit -c app src/AppBundle/Tests/Util + $ phpunit src/AppBundle/Tests/Util # run tests for the Calculator class - $ phpunit -c app src/AppBundle/Tests/Util/CalculatorTest.php + $ phpunit src/AppBundle/Tests/Util/CalculatorTest.php # run all tests for the entire Bundle - $ phpunit -c app src/AppBundle/ + $ phpunit src/AppBundle/ .. index:: single: Tests; Functional tests @@ -802,23 +801,23 @@ PHPUnit Configuration ~~~~~~~~~~~~~~~~~~~~~ Each application has its own PHPUnit configuration, stored in the -``app/phpunit.xml.dist`` file. You can edit this file to change the defaults or -create an ``app/phpunit.xml`` file to set up a configuration for your local -machine only. +``phpunit.xml.dist`` file. You can edit this file to change the defaults or +create an ``phpunit.xml`` file to set up a configuration for your local machine +only. .. tip:: - Store the ``app/phpunit.xml.dist`` file in your code repository and ignore - the ``app/phpunit.xml`` file. + Store the ``phpunit.xml.dist`` file in your code repository and ignore + the ``phpunit.xml`` file. By default, only the tests from your own custom bundles stored in the standard directories ``src/*/*Bundle/Tests``, ``src/*/Bundle/*Bundle/Tests``, ``src/*Bundle/Tests`` are run by the ``phpunit`` command, as configured -in the ``app/phpunit.xml.dist`` file: +in the ``phpunit.xml.dist`` file: .. code-block:: xml - + @@ -836,7 +835,7 @@ configuration adds tests from a custom ``lib/tests`` directory: .. code-block:: xml - + @@ -853,7 +852,7 @@ section: .. code-block:: xml - + From 3318f2e42ac6139cbe57cda1bf5cc9468e5b4cb3 Mon Sep 17 00:00:00 2001 From: WouterJ Date: Sat, 28 Nov 2015 10:37:15 +0100 Subject: [PATCH 3/7] app/(cache|logs) -> var/(cache|logs) --- book/installation.rst | 16 ++++++++-------- book/templating.rst | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/book/installation.rst b/book/installation.rst index 898aeb24e1a..5983a8f39ec 100644 --- a/book/installation.rst +++ b/book/installation.rst @@ -214,8 +214,8 @@ If there are any issues, correct them now before moving on. .. sidebar:: Setting up Permissions - One common issue when installing Symfony is that the ``app/cache`` and - ``app/logs`` directories must be writable both by the web server and the + One common issue when installing Symfony is that the ``var/cache`` and + ``var/logs`` directories must be writable both by the web server and the command line user. On a UNIX system, if your web server user is different from your command line user, you can try one of the following solutions. @@ -236,12 +236,12 @@ If there are any issues, correct them now before moving on. .. code-block:: bash - $ rm -rf app/cache/* - $ rm -rf app/logs/* + $ rm -rf var/cache/* + $ rm -rf var/logs/* $ HTTPDUSER=`ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1` - $ sudo chmod +a "$HTTPDUSER allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs - $ sudo chmod +a "`whoami` allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs + $ sudo chmod +a "$HTTPDUSER allow delete,write,append,file_inherit,directory_inherit" var/cache var/logs + $ sudo chmod +a "`whoami` allow delete,write,append,file_inherit,directory_inherit" var/cache var/logs **3. Using ACL on a system that does not support chmod +a** @@ -255,8 +255,8 @@ If there are any issues, correct them now before moving on. .. code-block:: bash $ HTTPDUSER=`ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1` - $ sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX app/cache app/logs - $ sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX app/cache app/logs + $ sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX var/cache var/logs + $ sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX var/cache var/logs If this doesn't work, try adding ``-n`` option. diff --git a/book/templating.rst b/book/templating.rst index 26bfde3daee..d54495273b3 100644 --- a/book/templating.rst +++ b/book/templating.rst @@ -159,7 +159,7 @@ Twig Template Caching Twig is fast. Each Twig template is compiled down to a native PHP class that is rendered at runtime. The compiled classes are located in the -``app/cache/{environment}/twig`` directory (where ``{environment}`` is the +``var/cache/{environment}/twig`` directory (where ``{environment}`` is the environment, such as ``dev`` or ``prod``) and in some cases can be useful while debugging. See :ref:`environments-summary` for more information on environments. From 6b5c97737052c5666b0dd3c0674caf8e9ac69ff7 Mon Sep 17 00:00:00 2001 From: WouterJ Date: Sat, 28 Nov 2015 10:40:37 +0100 Subject: [PATCH 4/7] app/bootstrap.php.cache -> var/bootstrap.php.cache --- book/http_cache.rst | 5 +---- book/performance.rst | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/book/http_cache.rst b/book/http_cache.rst index bf91ff2345d..24a5b23982f 100644 --- a/book/http_cache.rst +++ b/book/http_cache.rst @@ -145,12 +145,9 @@ To enable caching, modify the code of a front controller to use the caching kernel:: // web/app.php - require_once __DIR__.'/../app/bootstrap.php.cache'; - require_once __DIR__.'/../app/AppKernel.php'; - require_once __DIR__.'/../app/AppCache.php'; - use Symfony\Component\HttpFoundation\Request; + // ... $kernel = new AppKernel('prod', false); $kernel->loadClassCache(); // wrap the default AppKernel with the AppCache one diff --git a/book/performance.rst b/book/performance.rst index c73ed68c1ee..c60554015b8 100644 --- a/book/performance.rst +++ b/book/performance.rst @@ -75,16 +75,18 @@ If you're using the Standard Distribution, this code should already be available as comments in this file:: // app.php - // ... - - $loader = require_once __DIR__.'/../app/bootstrap.php.cache'; - // Use APC for autoloading to improve performance - // Change 'sf2' by the prefix you want in order - // to prevent key conflict with another application + // ... + $loader = require __DIR__.'/../app/autoload.php'; + include_once __DIR__.'/../var/bootstrap.php.cache'; + // Enable APC for autoloading to improve performance. + // You should change the ApcClassLoader first argument to a unique prefix + // in order to prevent cache key conflicts with other applications + // also using APC. /* - $loader = new ApcClassLoader('sf2', $loader); - $loader->register(true); + $apcLoader = new Symfony\Component\ClassLoader\ApcClassLoader(sha1(__FILE__), $loader); + $loader->unregister(); + $apcLoader->register(true); */ // ... @@ -119,7 +121,7 @@ If you're using the Symfony Standard Edition, then you're probably already using the bootstrap file. To be sure, open your front controller (usually ``app.php``) and check to make sure that the following line exists:: - require_once __DIR__.'/../app/bootstrap.php.cache'; + include_once __DIR__.'/../var/bootstrap.php.cache'; Note that there are two disadvantages when using a bootstrap file: From 0d6941483ea756c2a00a71bd9aa7b5ce3d0c9783 Mon Sep 17 00:00:00 2001 From: WouterJ Date: Sat, 28 Nov 2015 10:49:31 +0100 Subject: [PATCH 5/7] Updating 'Exploring the Project' --- book/bundles.rst | 1 + book/page_creation.rst | 49 ++++++++++++++++++++++++++---------------- 2 files changed, 31 insertions(+), 19 deletions(-) diff --git a/book/bundles.rst b/book/bundles.rst index 0fdfcfc088f..db7994795c2 100644 --- a/book/bundles.rst +++ b/book/bundles.rst @@ -107,6 +107,7 @@ Now that you've created the bundle, enable it via the ``AppKernel`` class:: { $bundles = array( // ... + // register your bundle new Acme\TestBundle\AcmeTestBundle(), ); diff --git a/book/page_creation.rst b/book/page_creation.rst index e450fbd61e9..c676a0f39ed 100644 --- a/book/page_creation.rst +++ b/book/page_creation.rst @@ -102,8 +102,8 @@ Suppose you want to create a JSON endpoint that returns the lucky number. Just add a second method to ``LuckyController``:: // src/AppBundle/Controller/LuckyController.php - // ... + // ... class LuckyController extends Controller { // ... @@ -132,8 +132,8 @@ Try this out in your browser: You can even shorten this with the handy :class:`Symfony\\Component\\HttpFoundation\\JsonResponse`:: // src/AppBundle/Controller/LuckyController.php - // ... + // ... // --> don't forget this new use statement use Symfony\Component\HttpFoundation\JsonResponse; @@ -168,8 +168,8 @@ at the end: .. code-block:: php-annotations // src/AppBundle/Controller/LuckyController.php - // ... + // ... class LuckyController extends Controller { /** @@ -192,7 +192,7 @@ at the end: .. code-block:: xml - + add this new use statement use Symfony\Bundle\FrameworkBundle\Controller\Controller; @@ -296,8 +296,8 @@ Twig templates, another that can log messages and many more. To render a Twig template, use a service called ``templating``:: // src/AppBundle/Controller/LuckyController.php - // ... + // ... class LuckyController extends Controller { /** @@ -329,8 +329,8 @@ But this can get even easier! By extending the ``Controller`` class, you also get a lot of shortcut methods, like ``render()``:: // src/AppBundle/Controller/LuckyController.php - // ... + // ... /** * @Route("/lucky/number/{count}") */ @@ -434,30 +434,41 @@ worked inside the two most important directories: else). As you get more advanced, you'll learn what can be done inside each of these. -The ``app/`` directory also holds a few other things, like the cache directory -``app/cache/``, the logs directory ``app/logs/`` and ``app/AppKernel.php``, -which you'll use to enable new bundles (and one of a *very* short list of +The ``app/`` directory also holds some other things, like ``app/AppKernel.php``, +which you'll use to enable new bundles (this is one of a *very* short list of PHP files in ``app/``). The ``src/`` directory has just one directory - ``src/AppBundle`` - and everything lives inside of it. A bundle is like a "plugin" and you can `find open source bundles`_ and install them into your project. But even -*your* code lives in a bundle - typically ``AppBundle`` (though there's -nothing special about ``AppBundle``). To find out more about bundles and +*your* code lives in a bundle - typically *AppBundle* (though there's +nothing special about AppBundle). To find out more about bundles and why you might create multiple bundles (hint: sharing code between projects), see the :doc:`Bundles ` chapter. So what about the other directories in the project? -``vendor/`` - Vendor (i.e. third-party) libraries and bundles are downloaded here by - the `Composer`_ package manager. - ``web/`` This is the document root for the project and contains any publicly accessible files, like CSS, images and the Symfony front controllers that execute the app (``app_dev.php`` and ``app.php``). +``tests/`` + The automatic tests (e.g. Unit tests) of your application live here. + +``bin/`` + The "binary" files live here. The most important one is the ``console`` + file which is used to execute Symfony commands via the console. + +``var/`` + This is were automatically created files are stored, like cache files + (``var/cache/``) and logs (``var/logs/``). + +``vendor/`` + Vendor (i.e. third-party) libraries and bundles are downloaded here by + the `Composer`_ package manager. You should never need to manually edit + something in this directory. + .. seealso:: Symfony is flexible. If you need to, you can easily override the default @@ -475,8 +486,8 @@ is ``app/config/config.yml``: .. code-block:: yaml # app/config/config.yml - # ... + # ... framework: secret: "%secret%" router: @@ -548,7 +559,7 @@ use the handy ``bin/console`` command: .. code-block:: bash - $ bin/console config:dump-reference framework + $ php bin/console config:dump-reference framework There's a lot more power behind Symfony's configuration system, including environments, imports and parameters. To learn all of it, see the From ed430157ae1e07eddf15670d7d44993bd1eddd94 Mon Sep 17 00:00:00 2001 From: WouterJ Date: Sat, 28 Nov 2015 10:51:55 +0100 Subject: [PATCH 6/7] Prefix commands with 'php' --- book/configuration.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/book/configuration.rst b/book/configuration.rst index e307d464e26..da96b334947 100644 --- a/book/configuration.rst +++ b/book/configuration.rst @@ -122,13 +122,13 @@ FrameworkBundle configuration: .. code-block:: bash - $ bin/console config:dump-reference FrameworkBundle + $ php bin/console config:dump-reference FrameworkBundle The extension alias (configuration key) can also be used: .. code-block:: bash - $ bin/console config:dump-reference framework + $ php bin/console config:dump-reference framework .. note:: From 25ae8c11b715d70c2e9d77ad68ddd5794e83491b Mon Sep 17 00:00:00 2001 From: WouterJ Date: Sat, 28 Nov 2015 13:38:51 +0100 Subject: [PATCH 7/7] Applied suggestions --- book/page_creation.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/book/page_creation.rst b/book/page_creation.rst index c676a0f39ed..dc763c45a76 100644 --- a/book/page_creation.rst +++ b/book/page_creation.rst @@ -461,13 +461,13 @@ So what about the other directories in the project? file which is used to execute Symfony commands via the console. ``var/`` - This is were automatically created files are stored, like cache files + This is where automatically created files are stored, like cache files (``var/cache/``) and logs (``var/logs/``). ``vendor/`` - Vendor (i.e. third-party) libraries and bundles are downloaded here by - the `Composer`_ package manager. You should never need to manually edit - something in this directory. + Third-party libraries, packages and bundles are downloaded here by + the `Composer`_ package manager. You should never edit something in this + directory. .. seealso::