diff --git a/changelog.rst b/changelog.rst index 30eb2360848..0fa32dc8334 100644 --- a/changelog.rst +++ b/changelog.rst @@ -13,6 +13,49 @@ documentation. Do you also want to participate in the Symfony Documentation? Take a look at the ":doc:`/contributing/documentation/overview`" article. +February, 2015 +-------------- + +New Documentation +~~~~~~~~~~~~~~~~~ + +- `a25da10 `_ #4966 [#4231] Clarify that only the main command triggers events (riperez) +- `9cce63c `_ #4924 [swiftmailer] Document whitelist option to email redirect (TerjeBr) +- `f5ff45e `_ #4712 Provide full test example (ifdattic) +- `5e83045 `_ #4657 Update assetic watch command (xtreamwayz) +- `d447b12 `_ #4556 Updated twig reference with optimizations and paths (jzawadzki) +- `018cf3f `_ #4661 Added a short cookbook about avoiding the automatic start of the sessions (javiereguiluz) +- `2305066 `_ #4902 Removed the Stable API chapter from the Symfony book (javiereguiluz) + +Fixed Documentation +~~~~~~~~~~~~~~~~~~~ + +- `b0d9c5c `_ #4978 fix wrong header-line syntax (sstok) +- `6d65564 `_ #4954 Fixed some syntax issues in Twig Reference (javiereguiluz) + +Minor Documentation Changes +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- `f75bc2b `_ #4972 Fix typos (ifdattic) +- `9fab10b `_ #4854 Removed no longer needed information about PHP 5.3 (WouterJ) +- `1726054 `_ #4500 Link to standard edition (harikt) +- `91ff6f8 `_ #4329 ensure consistency with the note (greg0ire) +- `e5dbd49 `_ #4977 Unnecessary comma (edsonmedina) +- `5d44987 `_ #4991 Fixed typo and tweaked syntax. (cdvrooman) +- `3845c9c `_ #4979 require_once path fixed (mvanmeerbeck) +- `96770aa `_ #4969 Add typehint (piotrantosik) +- `f97d01f `_ #4995 [#4965] file extension fix (hansstevens) +- `c5647dd `_ #4968 Fix typo (ifdattic) +- `c3218fc `_ #4962 cookbok/security/acl.rst (DaliusK) +- `72489a4 `_ #4963 Normalize excluded_404s in monolog cookbook (jbafford) +- `0adb6f6 `_ #4964 link to the cookbook article on avoiding to start a session (dbu) +- `5d8456f `_ #4955 Fixed wrong API link (dosten) +- `0a85053 `_ #4950 Fixes for 2.3 branch (ifdattic) +- `d3d96e1 `_ #4951 fix characters in backported patch (xabbuh) +- `208904a `_ #4949 Fixes for 2.3 branch (ifdattic) +- `42b44c4 `_ #4929 Remove block which doesn't make sense after best practices (ifdattic) +- `6f8b145 `_ #4904 Added a reference about including JS and CSS files in PHP templates (javiereguiluz) + January, 2015 ------------- diff --git a/components/dependency_injection/tags.rst b/components/dependency_injection/tags.rst index b8442c3b933..3bb349517f2 100644 --- a/components/dependency_injection/tags.rst +++ b/components/dependency_injection/tags.rst @@ -133,11 +133,11 @@ custom tag:: { public function process(ContainerBuilder $container) { - if (!$container->hasDefinition('acme_mailer.transport_chain')) { + if (!$container->has('acme_mailer.transport_chain')) { return; } - $definition = $container->getDefinition( + $definition = $container->findDefinition( 'acme_mailer.transport_chain' ); diff --git a/cookbook/bundles/extension.rst b/cookbook/bundles/extension.rst index aa2c5be8a35..78092a3f3fd 100644 --- a/cookbook/bundles/extension.rst +++ b/cookbook/bundles/extension.rst @@ -70,7 +70,7 @@ should also override :method:`Extension::getAlias() ` to return the correct DI alias. The DI alias is the name used to refer to the bundle in the container (e.g. in the ``app/config/config.yml`` file). By -default, this is done by removing the ``Extension`` prefix and converting the +default, this is done by removing the ``Extension`` suffix and converting the class name to underscores (e.g. ``AcmeHelloExtension``'s DI alias is ``acme_hello``). diff --git a/cookbook/deployment/tools.rst b/cookbook/deployment/tools.rst index 4004c06aeb8..322154ba9f2 100644 --- a/cookbook/deployment/tools.rst +++ b/cookbook/deployment/tools.rst @@ -8,9 +8,9 @@ How to Deploy a Symfony Application .. note:: - Deploying can be a complex and varied task depending on your setup and needs. - This entry doesn't try to explain everything, but rather offers the most - common requirements and ideas for deployment. + Deploying can be a complex and varied task depending on the setup and the + requirements of your application. This article is not a step-by-step guide, + but is a general list of the most common requirements and ideas for deployment. .. _symfony2-deployment-basics: @@ -19,26 +19,27 @@ Symfony Deployment Basics The typical steps taken while deploying a Symfony application include: -#. Upload your modified code to the live server; -#. Update your vendor dependencies (typically done via Composer, and may - be done before uploading); +#. Upload your code to the production server; +#. Install your vendor dependencies (typically done via Composer and may be done + before uploading); #. Running database migrations or similar tasks to update any changed data structures; -#. Clearing (and perhaps more importantly, warming up) your cache. +#. Clearing (and optionally, warming up) your cache. -A deployment may also include other things, such as: +A deployment may also include other tasks, such as: -* Tagging a particular version of your code as a release in your source control repository; +* Tagging a particular version of your code as a release in your source control + repository; * Creating a temporary staging area to build your updated setup "offline"; * Running any tests available to ensure code and/or server stability; -* Removal of any unnecessary files from ``web`` to keep your production environment clean; +* Removal of any unnecessary files from the ``web/`` directory to keep your + production environment clean; * Clearing of external cache systems (like `Memcached`_ or `Redis`_). How to Deploy a Symfony Application ----------------------------------- -There are several ways you can deploy a Symfony application. - -Start with a few basic deployment strategies and build up from there. +There are several ways you can deploy a Symfony application. Start with a few +basic deployment strategies and build up from there. Basic File Transfer ~~~~~~~~~~~~~~~~~~~ @@ -62,12 +63,39 @@ manually taking other steps (see `Common Post-Deployment Tasks`_). Using Build Scripts and other Tools ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -There are also high-quality tools to help ease the pain of deployment. There -are even a few tools which have been specifically tailored to the requirements of -Symfony, and which take special care to ensure that everything before, during, -and after a deployment has gone correctly. +There are also tools to help ease the pain of deployment. Some of them have been +specifically tailored to the requirements of Symfony. + +`Capifony`_ + This Ruby-based tool provides a specialized set of tools on top of + `Capistrano`_, tailored specifically to Symfony projects. + +`sf2debpkg`_ + Helps you build a native Debian package for your Symfony project. -See `The Tools`_ for a list of tools that can help with deployment. +`Magallanes`_ + This Capistrano-like deployment tool is built in PHP, and may be easier + for PHP developers to extend for their needs. + +`Fabric`_ + This Python-based library provides a basic suite of operations for executing + local or remote shell commands and uploading/downloading files. + +Bundles + There are some `bundles that add deployment features`_ directly into your + Symfony console. + +Basic scripting + You can of course use shell, `Ant`_ or any other build tool to script + the deploying of your project. + +Platform as a Service Providers + The Symfony Cookbook includes detailed articles for some of the most well-known + Platform as a Service (PaaS) providers: + + * :doc:`Microsoft Azure ` + * :doc:`Heroku ` + * :doc:`Platform.sh ` Common Post-Deployment Tasks ---------------------------- @@ -87,12 +115,11 @@ Check if your server meets the requirements by running: B) Configure your ``app/config/parameters.yml`` File ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This file should be customized on each system. The method you use to -deploy your source code should *not* deploy this file. Instead, you should -set it up manually (or via some build process) on your server(s). +This file should *not* be deployed, but managed through the automatic utilities +provided by Symfony. -C) Update your Vendors -~~~~~~~~~~~~~~~~~~~~~~ +C) Install/Update your Vendors +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Your vendors can be updated before transferring your source code (i.e. update the ``vendor/`` directory, then transfer that with your source @@ -105,10 +132,9 @@ as you normally do: .. tip:: - The ``--optimize-autoloader`` flag makes Composer's autoloader more - performant by building a "class map". The ``--no-dev`` flag - ensures that development packages are not installed in the production - environment. + The ``--optimize-autoloader`` flag improves Composer's autoloader performance + significantly by building a "class map". The ``--no-dev`` flag ensures that + development packages are not installed in the production environment. .. caution:: @@ -152,7 +178,7 @@ Application Lifecycle: Continuous Integration, QA, etc While this entry covers the technical details of deploying, the full lifecycle of taking code from development up to production may have a lot more steps -(think deploying to staging, QA, running tests, etc). +(think deploying to staging, QA (Quality Assurance), running tests, etc). The use of staging, testing, QA, continuous integration, database migrations and the capability to roll back in case of failure are all strongly advised. There @@ -163,51 +189,12 @@ Don't forget that deploying your application also involves updating any dependen (typically via Composer), migrating your database, clearing your cache and other potential things like pushing assets to a CDN (see `Common Post-Deployment Tasks`_). -The Tools ---------- - -`Capifony`_: - - This tool provides a specialized set of tools on top of Capistrano, tailored - specifically to symfony and Symfony projects. - -`sf2debpkg`_: - - This tool helps you build a native Debian package for your Symfony project. - -`Magallanes`_: - - This Capistrano-like deployment tool is built in PHP, and may be easier - for PHP developers to extend for their needs. - -Bundles: - - There are many `bundles that add deployment features`_ directly into your - Symfony console. - -Basic scripting: - - You can of course use shell, `Ant`_, or any other build tool to script - the deploying of your project. - -Platform as a Service Providers: - - PaaS is a relatively new way to deploy your application. Typically a PaaS - will use a single configuration file in your project's root directory to - determine how to build an environment on the fly that supports your software. - One provider with confirmed Symfony support is `PagodaBox`_. - -.. tip:: - - Looking for more? Talk to the community on the `Symfony IRC channel`_ #symfony - (on freenode) for more information. - .. _`Capifony`: http://capifony.org/ +.. _`Capistrano`: http://capistranorb.com/ .. _`sf2debpkg`: https://github.com/liip/sf2debpkg -.. _`Ant`: http://blog.sznapka.pl/deploying-symfony2-applications-with-ant -.. _`PagodaBox`: https://github.com/jmather/pagoda-symfony-sonata-distribution/blob/master/Boxfile +.. _`Fabric`: http://www.fabfile.org/ .. _`Magallanes`: https://github.com/andres-montanez/Magallanes +.. _`Ant`: http://blog.sznapka.pl/deploying-symfony2-applications-with-ant .. _`bundles that add deployment features`: http://knpbundles.com/search?q=deploy -.. _`Symfony IRC channel`: http://webchat.freenode.net/?channels=symfony .. _`Memcached`: http://memcached.org/ .. _`Redis`: http://redis.io/