From c291a73f51b314bd507f5ed2b651adeeaf3736a3 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 15 Dec 2014 17:20:25 +0100 Subject: [PATCH 01/10] Rewritten from scratch the chapter about installing Symfony --- book/installation.rst | 448 +++++++++++++++++++++-------------------- book/page_creation.rst | 9 +- 2 files changed, 233 insertions(+), 224 deletions(-) diff --git a/book/installation.rst b/book/installation.rst index d83cf153ea7..aeb83a7c076 100644 --- a/book/installation.rst +++ b/book/installation.rst @@ -5,218 +5,199 @@ Installing and Configuring Symfony ================================== The goal of this chapter is to get you up and running with a working application -built on top of Symfony. Fortunately, Symfony offers "distributions", which -are functional Symfony "starter" projects that you can download and begin -developing in immediately. +built on top of Symfony. In order to simplify the process of creating new +applications, Symfony provides an installer that must be installed before +creating the first application. -.. tip:: +Installing the Symfony Installer +-------------------------------- - If you're looking for instructions on how best to create a new project - and store it via source control, see `Using Source Control`_. +Using the Symfony Installer is the only recommended way to create new Symfony +applications. This installer is a PHP application that has to be installed +only once and then it can create any number of Symfony applications. -.. _installing-a-symfony2-distribution: +.. note:: -Installing a Symfony Distribution ---------------------------------- + The installer requires PHP 5.4 or higher. If you still use the legacy + PHP 5.3 version, you cannot use the Symfony Installer. In that case, read the next + :ref:`Creating Symfony Applications without the Installer ` + section. -.. tip:: +Depending on your operating system, the installer must be installed in different +ways. - First, check that you have installed and configured a Web server (such - as Apache) with PHP. For more information on Symfony requirements, see the - :doc:`requirements reference `. +Linux and Mac OS X Systems +~~~~~~~~~~~~~~~~~~~~~~~~~~ -Symfony packages "distributions", which are fully-functional applications -that include the Symfony core libraries, a selection of useful bundles, a -sensible directory structure and some default configuration. When you download -a Symfony distribution, you're downloading a functional application skeleton -that can be used immediately to begin developing your application. +Open your command console and execute the following three commands: -Start by visiting the Symfony download page at `http://symfony.com/download`_. -On this page, you'll see the *Symfony Standard Edition*, which is the main -Symfony distribution. There are 2 ways to get your project started: +.. code-block:: bash -Option 1) Composer -~~~~~~~~~~~~~~~~~~ + $ curl -LsS http://symfony.com/installer > symfony.phar + $ sudo mv symfony.phar /usr/local/bin/symfony + $ chmod a+x /usr/local/bin/symfony -`Composer`_ is a dependency management library for PHP, which you can use -to download the Symfony Standard Edition. +This will create a global ``symfony`` command in your system that will be used +to create new Symfony applications. -Start by `downloading Composer`_ anywhere onto your local computer. If you -have curl installed, it's as easy as: +Windows Systems +~~~~~~~~~~~~~~~ -.. code-block:: bash +Open your command console and execute the following command: - $ curl -s https://getcomposer.org/installer | php - -.. note:: +.. code-block:: bash - If your computer is not ready to use Composer, you'll see some recommendations - when running this command. Follow those recommendations to get Composer - working properly. + c:\> php -r "readfile('http://symfony.com/installer');" > symfony.phar -Composer is an executable PHAR file, which you can use to download the Standard -Distribution: +Then, move the downloaded ``symfony.phar`` file to your projects directory and +execute it as follows: .. code-block:: bash - $ php composer.phar create-project symfony/framework-standard-edition /path/to/webroot/Symfony '2.3.*' + c:\> php symfony.phar -.. tip:: +Creating the Symfony Application +-------------------------------- - To download the vendor files faster, add the ``--prefer-dist`` option at - the end of any Composer command. +Once the Symfony Installer is ready, create your first Symfony application with +the ``new`` command: -.. tip:: +.. code-block:: bash - Add the ``-vvv`` flag to see everything that Composer is doing - this is - especially useful on a slow connection where it may seem that nothing is - happening. + # Linux, Mac OS X + $ symfony new my_project_name -This command may take several minutes to run as Composer downloads the Standard -Distribution along with all of the vendor libraries that it needs. When it finishes, -you should have a directory that looks something like this: + # Windows + c:\> cd projects/ + c:\projects\> php symfony.phar new my_project_name -.. code-block:: text +This command creates a new directory called ``my_project_name`` that contains a +fresh new project based on the most recent stable Symfony version available. In +addition, the installer checks if your system meets the technical requirements +to execute Symfony applications. If not, you'll see the list of changes needed +to meet those requirements. - path/to/webroot/ <- your web server directory (sometimes named htdocs or public) - Symfony/ <- the new directory - app/ - cache/ - config/ - logs/ - src/ - ... - vendor/ - ... - web/ - app.php - ... - -Option 2) Download an Archive -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can also download an archive of the Standard Edition. Here, you'll -need to make two choices: - -* Download either a ``.tgz`` or ``.zip`` archive - both are equivalent, download - whatever you're more comfortable using; - -* Download the distribution with or without vendors. If you're planning on - using more third-party libraries or bundles and managing them via Composer, - you should probably download "without vendors". - -Download one of the archives somewhere under your local web server's root -directory and unpack it. From a UNIX command line, this can be done with -one of the following commands (replacing ``###`` with your actual filename): +Basing your Project on a Specific Symfony Version +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If your project needs to be based on a specific Symfony version, pass the version +number as the second argument of the ``new`` command: .. code-block:: bash - # for .tgz file - $ tar zxvf Symfony_Standard_Vendors_2.3.###.tgz + # Linux, Mac OS X + $ symfony new my_project_name 2.3.23 - # for a .zip file - $ unzip Symfony_Standard_Vendors_2.3.###.zip + # Windows + c:\projects\> php symfony.phar new my_project_name 2.5.8 -If you've downloaded "without vendors", you'll definitely need to read the -next section. +Read the `Symfony Release process`_ to better understand why there are several +Symfony versions and which one to use for your projects. -.. note:: +.. _book-creating-applications-without-the-installer: - You can easily override the default directory structure. See - :doc:`/cookbook/configuration/override_dir_structure` for more - information. +Creating Symfony Applications without the Installer +--------------------------------------------------- -All public files and the front controller that handles incoming requests in -a Symfony application live in the ``Symfony/web/`` directory. So, assuming -you unpacked the archive into your web server's or virtual host's document root, -your application's URLs will start with ``http://localhost/Symfony/web/``. +Due to technical reasons, some of the past Symfony versions aren't compatible +with the Symfony Installer. In addition, if you still use PHP 5.3, you can't +execute the installer. In those cases, you must use the alternative installation +method based con `Composer`_. -.. note:: +Composer is the dependency manager used by modern PHP applications and it can +also be used to create new applications based on the Symfony framework. If you +don't have installed it globally, start by reading the next section. - The following examples assume you don't touch the document root settings - so all URLs start with ``http://localhost/Symfony/web/`` +Installing Composer Globally +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. _installation-updating-vendors: +On Linux and Mac OS X, execute the following two commands to install Composer +globally: + +.. code-block:: bash -Updating Vendors -~~~~~~~~~~~~~~~~ + $ curl -sS https://getcomposer.org/installer | php + $ sudo mv composer.phar /usr/local/bin/composer -At this point, you've downloaded a fully-functional Symfony project in which -you'll start to develop your own application. A Symfony project depends on -a number of external libraries. These are downloaded into the ``vendor/`` directory -of your project via a library called `Composer`_. +On Windows Systems, download the executable Composer installer that you can find +on the `Composer download page`_ and follow the steps. -Depending on how you downloaded Symfony, you may or may not need to update -your vendors right now. But, updating your vendors is always safe, and guarantees -that you have all the vendor libraries you need. +Creating a Symfony Application with Composer +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Step 1: Get `Composer`_ (The great new PHP packaging system) +Once Composer is installed on your computer, execute the ``create-project`` +command to create a new Symfony application based on its latest stable version: .. code-block:: bash - $ curl -s http://getcomposer.org/installer | php - -Make sure you download ``composer.phar`` in the same folder where -the ``composer.json`` file is located (this is your Symfony project -root by default). + $ composer create-project symfony/framework-standard-edition my_project_name -Step 2: Install vendors +If you need to base your application on a specific Symfony version, provide that +version as the second argument of the ``create-project`` command: .. code-block:: bash - $ php composer.phar install + $ composer create-project symfony/framework-standard-edition my_project_name '2.3.*' -This command downloads all of the necessary vendor libraries - including -Symfony itself - into the ``vendor/`` directory. +.. tip:: -.. note:: + If your Internet connection is slow, you may think that Composer is not + doing anything. If that's your case, add the ``-vvv`` flag to the previous + command to display a detailed output of everything that Composer is doing. - If you don't have ``curl`` installed, you can also just download the ``installer`` - file manually at http://getcomposer.org/installer. Place this file into your - project and then run: +Running the Symfony Application +------------------------------- - .. code-block:: bash +Symfony leverages the internal web server provided by PHP to run applications +while developing them. Therefore, running a Symfony application is a matter of +browsing the project directory and executing this command: - $ php installer - $ php composer.phar install +.. code-block:: bash -.. tip:: + $ cd my_project_name/ + $ php app/console server:run - When running ``php composer.phar install`` or ``php composer.phar update``, - Composer will execute post install/update commands to clear the cache - and install assets. By default, the assets will be copied into your ``web`` - directory. +Then, open your browser and access the ``http://localhost:8000`` URL to see the +Welcome page of Symfony: - Instead of copying your Symfony assets, you can create symlinks if - your operating system supports it. To create symlinks, add an entry - in the ``extra`` node of your composer.json file with the key - ``symfony-assets-install`` and the value ``symlink``: +.. image:: /images/quick_tour/welcome.png + :align: center + :alt: Symfony Welcome Page - .. code-block:: json +Instead of the Welcome Page, you may see a blank page or an error page. +This is caused by a directory permission misconfiguration. There are several +possible solutions depending on your operating system. All of them are +explained in the :ref:`Setting up Permissions ` +section. - "extra": { - "symfony-app-dir": "app", - "symfony-web-dir": "web", - "symfony-assets-install": "symlink" - } +.. note:: - When passing ``relative`` instead of ``symlink`` to symfony-assets-install, - the command will generate relative symlinks. + PHP's internal web server is available in PHP 5.4 or higher versions. If you + still use the legacy PHP 5.3 version, you'll have to configure a *virtual host* + in your web server. -Configuration and Setup -~~~~~~~~~~~~~~~~~~~~~~~ +The ``server:run`` command is only suitable while developing the application. In +order to run Symfony applications on production servers, you'll have to configure +your `Apache`_ or `Nginx`_ web server as explained in +:doc:`/cookbook/configuration/web_server_configuration`. -At this point, all of the needed third-party libraries now live in the ``vendor/`` -directory. You also have a default application setup in ``app/`` and some -sample code inside the ``src/`` directory. +When you are finished working on your Symfony application, you can stop the +server with the ``server:stop`` command: -Symfony comes with a visual server configuration tester to help make sure -your Web server and PHP are configured to use Symfony. Use the following URL -to check your configuration: +.. code-block:: bash + + $ php app/console server:stop + +Checking Symfony Application Configuration and Setup +---------------------------------------------------- + +Symfony applications come with a visual server configuration tester to show if +your environment is ready to use Symfony. Access the following URL to check your +configuration: .. code-block:: text - http://localhost/config.php + http://localhost:8000/config.php If there are any issues, correct them now before moving on. @@ -224,13 +205,21 @@ If there are any issues, correct them now before moving on. .. sidebar:: Setting up Permissions - One common issue is that the ``app/cache`` and ``app/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 run the following commands just once in your project - to ensure that permissions will be setup properly. + 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 + 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. + + **1. Use the same user for the CLI and the web server** + + In development environments, it is a common practice to use the same UNIX + user for the CLI and the web server because it avoids any of these permissions + issues when setting up new projects. This can be done by editing your web server + configuration (e.g. commonly httpd.conf or apache2.conf for Apache) and setting + its user to be the same as your CLI user (e.g. for Apache, update the ``User`` + and ``Group`` values). - **1. Using ACL on a system that supports chmod +a** + **2. Using ACL on a system that supports chmod +a** Many systems allow you to use the ``chmod +a`` command. Try this first, and if you get an error - try the next method. This uses a command to @@ -246,7 +235,7 @@ If there are any issues, correct them now before moving on. $ sudo chmod +a "`whoami` allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs - **2. Using ACL on a system that does not support chmod +a** + **3. Using ACL on a system that does not support chmod +a** Some systems don't support ``chmod +a``, but do support another utility called ``setfacl``. You may need to `enable ACL support`_ on your partition @@ -256,19 +245,18 @@ If there are any issues, correct them now before moving on. .. code-block:: bash - $ HTTPDUSER=`ps aux | 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 + $ HTTPDUSER=`ps aux | 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 If this doesn't work, try adding ``-n`` option. - **3. Without using ACL** + **4. Without using ACL** - If you don't have access to changing the ACL of the directories, you will - need to 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``, + 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``, ``web/app.php`` and ``web/app_dev.php`` files:: umask(0002); // This will let the permissions be 0775 @@ -280,37 +268,82 @@ If there are any issues, correct them now before moving on. Note that using the ACL is recommended when you have access to them on your server because changing the umask is not thread-safe. - **4. Use the same user for the CLI and the web server** +.. _installation-updating-vendors: + +Updating Symfony Applications +----------------------------- - In development environments, it is a common practice to use the same unix - user for the CLI and the web server because it avoids any of these permissions - issues when setting up new projects. This can be done by editing your web server - configuration (e.g. commonly httpd.conf or apache2.conf for Apache) and setting - its user to be the same as your CLI user (e.g. for Apache, update the User - and Group values). +At this point, you've create a fully-functional Symfony application in which +you'll start to develop your own project. A Symfony application depends on +a number of external libraries. These are downloaded into the ``vendor/`` directory +and they are managed exclusively by Composer. -When everything is fine, click on "Go to the Welcome page" to request your -first "real" Symfony webpage: +Updating those third-party libraries frequently is a good practice to prevent bugs +and security vulnerabilities. Execute the ``update`` Composer command to update +them all at once: -.. code-block:: text +.. code-block:: bash - http://localhost/app_dev.php/ + $ cd my_project_name/ + $ composer update -Symfony should welcome and congratulate you for your hard work so far! +Depending on the complexity of your project, this update process can take up to +several minutes to complete. -.. image:: /images/quick_tour/welcome.png +.. _installing-a-symfony2-distribution: -.. tip:: +Installing a Symfony Distribution +--------------------------------- + +Symfony project packages "distributions", which are fully-functional applications +that include the Symfony core libraries, a selection of useful bundles, a +sensible directory structure and some default configuration. In fact, when you +created a Symfony application in the previous sections, you actually downloaded the +default distribution provided by Symfony, which is called *Symfony Standard Edition*. + +The *Symfony Standard Edition* is by far the most popular distribution and it's +also the best choice for developers starting with Symfony. However, the Symfony +Community has published other popular distributions that you may use in your +applications: + +* The `Symfony CMF Standard Edition`_ is the best distribution to get started + with the `Symfony CMF`_ project, which is a project that makes it easier for + developers to add CMS functionality to applications built with the Symfony + framework. +* The `Symfony REST Edition`_ shows how to build an application that provides a + RESTful API using the FOSRestBundle and several other related bundles. + +Using Source Control +-------------------- + +If you're using a version control system like `Git`_, you can safely commit all your project's code. The reason is that Symfony applications already contain a +``.gitignore`` file specially prepared for Symfony. + +For specific instructions on how best to setup your project to be stored +in Git, see :doc:`/cookbook/workflow/new_project_git`. - To get nice and short urls you should point the document root of your - webserver or virtual host to the ``Symfony/web/`` directory. Though - this is not required for development it is recommended at the time your - application goes into production as all system and configuration files - become inaccessible to clients then. For information on configuring - your specific web server document root, read - :doc:`/cookbook/configuration/web_server_configuration` - or consult the official documentation of your webserver: - `Apache`_ | `Nginx`_ . +Checking out a Versioned Symfony Application +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When using Composer to manage application's dependencies, it's recommended to +ignore the entire ``vendor/`` directory before committing its code to the +repository. This means that when checking out a Symfony application from a Git +repository, there will be no ``vendor/`` directory and the application won't +work out-of-the-box. + +In order to make it work, check out the Symfony application and then execute the +``install`` Composer command to download and install all the dependencies required +by the application: + +.. code-block:: bash + + $ cd my_project_name/ + $ composer install + +How does Composer know which specific dependencies to install? Because when a +Symfony application is committed to a repository, the ``composer.json`` and +``composer.lock`` files are also committed. These files tell Composer which +dependencies (and which specific versions) to install for the application. Beginning Development --------------------- @@ -332,40 +365,13 @@ a wide variety of articles about solving specific problems with Symfony. If you want to remove the sample code from your distribution, take a look at this cookbook article: ":doc:`/cookbook/bundles/remove`" -Using Source Control --------------------- - -If you're using a version control system like ``Git`` or ``Subversion``, you -can setup your version control system and begin committing your project to -it as normal. The Symfony Standard Edition *is* the starting point for your -new project. - -For specific instructions on how best to setup your project to be stored -in Git, see :doc:`/cookbook/workflow/new_project_git`. - -Ignoring the ``vendor/`` Directory -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -If you've downloaded the archive *without vendors*, you can safely ignore -the entire ``vendor/`` directory and not commit it to source control. With -``Git``, this is done by creating and adding the following to a ``.gitignore`` -file: - -.. code-block:: text - - /vendor/ - -Now, the vendor directory won't be committed to source control. This is fine -(actually, it's great!) because when someone else clones or checks out the -project, they can simply run the ``php composer.phar install`` script to -install all the necessary project dependencies. - -.. _`enable ACL support`: https://help.ubuntu.com/community/FilePermissionsACLs -.. _`http://symfony.com/download`: http://symfony.com/download -.. _`Git`: http://git-scm.com/ -.. _`GitHub Bootcamp`: http://help.github.com/set-up-git-redirect +.. _`Symfony Release process`: http://symfony.com/doc/current/contributing/community/releases.html .. _`Composer`: http://getcomposer.org/ -.. _`downloading Composer`: http://getcomposer.org/download/ +.. _`Composer download page`: https://getcomposer.org/download/ .. _`Apache`: http://httpd.apache.org/docs/current/mod/core.html#documentroot .. _`Nginx`: http://wiki.nginx.org/Symfony -.. _`Symfony Installation Page`: http://symfony.com/download +.. _`Symfony CMF Standard Edition`: https://github.com/symfony-cmf/symfony-cmf-standard +.. _`Symfony CMF`: http://cmf.symfony.com/ +.. _`Symfony REST Edition`: https://github.com/gimler/symfony-rest-edition +.. _`FOSRestBundle`: https://github.com/FriendsOfSymfony/FOSRestBundle +.. _`Git`: http://git-scm.com/ diff --git a/book/page_creation.rst b/book/page_creation.rst index 085f98e9cc6..b3353b27596 100644 --- a/book/page_creation.rst +++ b/book/page_creation.rst @@ -489,13 +489,16 @@ Though entirely flexible, by default, each Symfony :term:`application` has the same basic and recommended directory structure: * ``app/``: This directory contains the application configuration; - * ``src/``: All the project PHP code is stored under this directory; - * ``vendor/``: Any vendor libraries are placed here by convention; - * ``web/``: This is the web root directory and contains any publicly accessible files; +.. note:: + + You can easily override the default directory structure. See + :doc:`/cookbook/configuration/override_dir_structure` for more + information. + .. _the-web-directory: The Web Directory From 8f202c6e475c4f8dc32e80663c617a73bcf38dcc Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 16 Dec 2014 08:40:57 +0100 Subject: [PATCH 02/10] Re-added a wrongly deleted link reference --- book/installation.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/book/installation.rst b/book/installation.rst index aeb83a7c076..f0b2fd79552 100644 --- a/book/installation.rst +++ b/book/installation.rst @@ -370,6 +370,7 @@ a wide variety of articles about solving specific problems with Symfony. .. _`Composer download page`: https://getcomposer.org/download/ .. _`Apache`: http://httpd.apache.org/docs/current/mod/core.html#documentroot .. _`Nginx`: http://wiki.nginx.org/Symfony +.. _`enable ACL support`: https://help.ubuntu.com/community/FilePermissionsACLs .. _`Symfony CMF Standard Edition`: https://github.com/symfony-cmf/symfony-cmf-standard .. _`Symfony CMF`: http://cmf.symfony.com/ .. _`Symfony REST Edition`: https://github.com/gimler/symfony-rest-edition From b665d8673b9c8e352eaf5b692a5fd8b8056e6145 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 17 Dec 2014 12:05:17 +0100 Subject: [PATCH 03/10] Added a note about verifying Symfony digital signatures --- book/installation.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/book/installation.rst b/book/installation.rst index f0b2fd79552..88e4becfd01 100644 --- a/book/installation.rst +++ b/book/installation.rst @@ -77,6 +77,12 @@ addition, the installer checks if your system meets the technical requirements to execute Symfony applications. If not, you'll see the list of changes needed to meet those requirements. +.. tip:: + + For security reasons, all Symfony versions are digitally signed before + distributing them. If you want to verify the integrity of any Symfony + version, follow the steps `explained in this post`_. + Basing your Project on a Specific Symfony Version ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -366,6 +372,7 @@ a wide variety of articles about solving specific problems with Symfony. at this cookbook article: ":doc:`/cookbook/bundles/remove`" .. _`Symfony Release process`: http://symfony.com/doc/current/contributing/community/releases.html +.. _`explained in this post`: http://fabien.potencier.org.nyud.net/article/73/signing-project-releases .. _`Composer`: http://getcomposer.org/ .. _`Composer download page`: https://getcomposer.org/download/ .. _`Apache`: http://httpd.apache.org/docs/current/mod/core.html#documentroot From 12eb76e57ce1b516a87390ecb496634618da4869 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 17 Dec 2014 12:12:05 +0100 Subject: [PATCH 04/10] Reworded a confusing phrase --- book/installation.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/book/installation.rst b/book/installation.rst index 88e4becfd01..3ce2cfaf639 100644 --- a/book/installation.rst +++ b/book/installation.rst @@ -19,9 +19,9 @@ only once and then it can create any number of Symfony applications. .. note:: The installer requires PHP 5.4 or higher. If you still use the legacy - PHP 5.3 version, you cannot use the Symfony Installer. In that case, read the next + PHP 5.3 version, you cannot use the Symfony Installer. Read :ref:`Creating Symfony Applications without the Installer ` - section. + section to know how to proceed. Depending on your operating system, the installer must be installed in different ways. From 12c25573d9d4a328c921390981cad7f1c117cc5b Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 17 Dec 2014 12:14:20 +0100 Subject: [PATCH 05/10] Add an explicit command to better explain that we recommend to move symfony.phar to projects directory --- book/installation.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/book/installation.rst b/book/installation.rst index 3ce2cfaf639..cb9cd176b55 100644 --- a/book/installation.rst +++ b/book/installation.rst @@ -54,7 +54,8 @@ execute it as follows: .. code-block:: bash - c:\> php symfony.phar + c:\> move symfony.phar c:\projects + c:\projects\> php symfony.phar Creating the Symfony Application -------------------------------- From 7e9cd04da2b85d9ab43f324e820072e45a39a5ca Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 17 Dec 2014 12:15:56 +0100 Subject: [PATCH 06/10] Display the same version number on Linux and Windows to avoid confusions --- book/installation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/installation.rst b/book/installation.rst index cb9cd176b55..2049d8c0139 100644 --- a/book/installation.rst +++ b/book/installation.rst @@ -96,7 +96,7 @@ number as the second argument of the ``new`` command: $ symfony new my_project_name 2.3.23 # Windows - c:\projects\> php symfony.phar new my_project_name 2.5.8 + c:\projects\> php symfony.phar new my_project_name 2.3.23 Read the `Symfony Release process`_ to better understand why there are several Symfony versions and which one to use for your projects. From 2e72138e38d586334c8ffd165e771e78439d262e Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 17 Dec 2014 12:18:13 +0100 Subject: [PATCH 07/10] Wrapped a line to follow doc standards --- book/installation.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/book/installation.rst b/book/installation.rst index 2049d8c0139..058fd7a91d9 100644 --- a/book/installation.rst +++ b/book/installation.rst @@ -323,7 +323,8 @@ applications: Using Source Control -------------------- -If you're using a version control system like `Git`_, you can safely commit all your project's code. The reason is that Symfony applications already contain a +If you're using a version control system like `Git`_, you can safely commit all +your project's code. The reason is that Symfony applications already contain a ``.gitignore`` file specially prepared for Symfony. For specific instructions on how best to setup your project to be stored From 40d77729fa2a4a21e8959aa211266804fa3a57a3 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 17 Dec 2014 15:34:02 +0100 Subject: [PATCH 08/10] Reworded the reasons why you should use Composer-based installation --- book/installation.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/book/installation.rst b/book/installation.rst index 058fd7a91d9..e1e38fe039d 100644 --- a/book/installation.rst +++ b/book/installation.rst @@ -106,10 +106,9 @@ Symfony versions and which one to use for your projects. Creating Symfony Applications without the Installer --------------------------------------------------- -Due to technical reasons, some of the past Symfony versions aren't compatible -with the Symfony Installer. In addition, if you still use PHP 5.3, you can't -execute the installer. In those cases, you must use the alternative installation -method based con `Composer`_. +If you still use PHP 5.3, or if you can't execute the installer for any reason, +you can create Symfony applications using the alternative installation method +based con `Composer`_. Composer is the dependency manager used by modern PHP applications and it can also be used to create new applications based on the Symfony framework. If you From b45c3386d6dd84a7ffebd15f097fa274ff1d8f2f Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 17 Dec 2014 17:39:57 +0100 Subject: [PATCH 09/10] Imrpoved the wording of the note about using using legacy PHP 5.3 version --- book/installation.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/book/installation.rst b/book/installation.rst index e1e38fe039d..f065473ec3f 100644 --- a/book/installation.rst +++ b/book/installation.rst @@ -19,9 +19,9 @@ only once and then it can create any number of Symfony applications. .. note:: The installer requires PHP 5.4 or higher. If you still use the legacy - PHP 5.3 version, you cannot use the Symfony Installer. Read - :ref:`Creating Symfony Applications without the Installer ` - section to know how to proceed. + PHP 5.3 version, you cannot use the Symfony Installer. Read the + :ref:`book-creating-applications-without-the-installer` section to learn how + to proceed. Depending on your operating system, the installer must be installed in different ways. From 7de83a3bf619f86226ce8d3cd997552e1148eb10 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 17 Dec 2014 18:01:09 +0100 Subject: [PATCH 10/10] Replaced a "note" by a "seealso" --- book/page_creation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/page_creation.rst b/book/page_creation.rst index b3353b27596..67915f6e639 100644 --- a/book/page_creation.rst +++ b/book/page_creation.rst @@ -493,7 +493,7 @@ the same basic and recommended directory structure: * ``vendor/``: Any vendor libraries are placed here by convention; * ``web/``: This is the web root directory and contains any publicly accessible files; -.. note:: +.. seealso:: You can easily override the default directory structure. See :doc:`/cookbook/configuration/override_dir_structure` for more