Skip to content

Commit

Permalink
Merge branch '2.3' into 2.5
Browse files Browse the repository at this point in the history
* 2.3:
  Added February changelog
  Minor fixes and added Fabric tool
  Fixed case where definition service is an alias
  Fixed grammar issues
  Improved the text of the links
  Updated the contents of the generic Deployment article
  Fixed semantic error
  • Loading branch information
weaverryan committed Mar 2, 2015
2 parents ff44111 + 6b66f03 commit 747696a
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 73 deletions.
43 changes: 43 additions & 0 deletions changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/symfony/symfony-docs/commit/a25da10d010fbd547239099b0fe1accd0fc9f6ca>`_ #4966 [#4231] Clarify that only the main command triggers events (riperez)
- `9cce63c <https://github.com/symfony/symfony-docs/commit/9cce63cbe3d2899bab00da14ce29a998e87cd14d>`_ #4924 [swiftmailer] Document whitelist option to email redirect (TerjeBr)
- `f5ff45e <https://github.com/symfony/symfony-docs/commit/f5ff45eba45bb4d87f5b49959eb6b9f7051157c0>`_ #4712 Provide full test example (ifdattic)
- `5e83045 <https://github.com/symfony/symfony-docs/commit/5e83045ad129e0139ca01c3339717ebad4ee6acb>`_ #4657 Update assetic watch command (xtreamwayz)
- `d447b12 <https://github.com/symfony/symfony-docs/commit/d447b12d6eeb44db0befa8d30ebd2ba67a1880e9>`_ #4556 Updated twig reference with optimizations and paths (jzawadzki)
- `018cf3f <https://github.com/symfony/symfony-docs/commit/018cf3fc6558f6b85993be8eacff9ba008eb9bb4>`_ #4661 Added a short cookbook about avoiding the automatic start of the sessions (javiereguiluz)
- `2305066 <https://github.com/symfony/symfony-docs/commit/23050662fa728edf3c6971bbeef15b2dd6339111>`_ #4902 Removed the Stable API chapter from the Symfony book (javiereguiluz)

Fixed Documentation
~~~~~~~~~~~~~~~~~~~

- `b0d9c5c <https://github.com/symfony/symfony-docs/commit/b0d9c5c639ef520076491aa9e688e9b4184a263e>`_ #4978 fix wrong header-line syntax (sstok)
- `6d65564 <https://github.com/symfony/symfony-docs/commit/6d655649d78b810cf3e459035a04671d40659791>`_ #4954 Fixed some syntax issues in Twig Reference (javiereguiluz)

Minor Documentation Changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~

- `f75bc2b <https://github.com/symfony/symfony-docs/commit/f75bc2bf6d52a5480ba056af06c59844ec8934ba>`_ #4972 Fix typos (ifdattic)
- `9fab10b <https://github.com/symfony/symfony-docs/commit/9fab10bde02daae0af6f2848eb5888fa95026e76>`_ #4854 Removed no longer needed information about PHP 5.3 (WouterJ)
- `1726054 <https://github.com/symfony/symfony-docs/commit/1726054212bda98d4d63edb7f1364472fe91c7fe>`_ #4500 Link to standard edition (harikt)
- `91ff6f8 <https://github.com/symfony/symfony-docs/commit/91ff6f8198d17eda5f837c5f1c1725b8030862a1>`_ #4329 ensure consistency with the note (greg0ire)
- `e5dbd49 <https://github.com/symfony/symfony-docs/commit/e5dbd49deb1cc6d25d4b89c4967a6511192a22ec>`_ #4977 Unnecessary comma (edsonmedina)
- `5d44987 <https://github.com/symfony/symfony-docs/commit/5d4498707f7fc72653fc135a3e3caee675901ee9>`_ #4991 Fixed typo and tweaked syntax. (cdvrooman)
- `3845c9c <https://github.com/symfony/symfony-docs/commit/3845c9c7ad4c23f76f2f1ba26bc650df72baf84d>`_ #4979 require_once path fixed (mvanmeerbeck)
- `96770aa <https://github.com/symfony/symfony-docs/commit/96770aa48406f139986f987ccc0bd277501bc4e2>`_ #4969 Add typehint (piotrantosik)
- `f97d01f <https://github.com/symfony/symfony-docs/commit/f97d01f26dabbbb11e4a6e8a0adc865e791dea0a>`_ #4995 [#4965] file extension fix (hansstevens)
- `c5647dd <https://github.com/symfony/symfony-docs/commit/c5647ddad3a13d32e1591e5fc08d9c9b70ed4239>`_ #4968 Fix typo (ifdattic)
- `c3218fc <https://github.com/symfony/symfony-docs/commit/c3218fced746bfd40c27aa75c5332eacb977fb4e>`_ #4962 cookbok/security/acl.rst (DaliusK)
- `72489a4 <https://github.com/symfony/symfony-docs/commit/72489a414f40fefca9553d0ffd8fabebbccf8d9e>`_ #4963 Normalize excluded_404s in monolog cookbook (jbafford)
- `0adb6f6 <https://github.com/symfony/symfony-docs/commit/0adb6f6a62625c9875be57d102c814721c5b83c8>`_ #4964 link to the cookbook article on avoiding to start a session (dbu)
- `5d8456f <https://github.com/symfony/symfony-docs/commit/5d8456fe3ca6f6bd30cf13d6317e0776c629ed0c>`_ #4955 Fixed wrong API link (dosten)
- `0a85053 <https://github.com/symfony/symfony-docs/commit/0a85053cb7344e4b0c1950a46c51e7f9a9683ac0>`_ #4950 Fixes for 2.3 branch (ifdattic)
- `d3d96e1 <https://github.com/symfony/symfony-docs/commit/d3d96e104dea4b670e873543f189b18f3c93d4c6>`_ #4951 fix characters in backported patch (xabbuh)
- `208904a <https://github.com/symfony/symfony-docs/commit/208904acc6d82b7e602360dbea66ea35d81d15c5>`_ #4949 Fixes for 2.3 branch (ifdattic)
- `42b44c4 <https://github.com/symfony/symfony-docs/commit/42b44c4eb75d7a53cf094fe8cef4f2a847ec83c1>`_ #4929 Remove block which doesn't make sense after best practices (ifdattic)
- `6f8b145 <https://github.com/symfony/symfony-docs/commit/6f8b14558aa8dceb1030f49b9fb47164ccd4b8ff>`_ #4904 Added a reference about including JS and CSS files in PHP templates (javiereguiluz)

January, 2015
-------------

Expand Down
4 changes: 2 additions & 2 deletions components/dependency_injection/tags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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'
);

Expand Down
2 changes: 1 addition & 1 deletion cookbook/bundles/extension.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ should also override
:method:`Extension::getAlias() <Symfony\\Component\\DependencyInjection\\Extension\\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``).

Expand Down
127 changes: 57 additions & 70 deletions cookbook/deployment/tools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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
~~~~~~~~~~~~~~~~~~~
Expand All @@ -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 </cookbook/deployment/azure-website>`
* :doc:`Heroku </cookbook/deployment/heroku>`
* :doc:`Platform.sh </cookbook/deployment/platformsh>`

Common Post-Deployment Tasks
----------------------------
Expand All @@ -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
Expand All @@ -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::

Expand Down Expand Up @@ -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
Expand All @@ -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/

0 comments on commit 747696a

Please sign in to comment.