Skip to content

Commit

Permalink
Merge branch '2.8' into 3.0
Browse files Browse the repository at this point in the history
Conflicts:
	bundles/best_practices.rst
	components/console/helpers/dialoghelper.rst
	console/console_command.rst
	form/direct_submit.rst
	form/validation_groups.rst
	forms.rst
	http_cache.rst
	reference/dic_tags.rst
	security/api_key_authentication.rst
	translation.rst
  • Loading branch information
wouterj committed Jul 16, 2016
2 parents 4715fa6 + a27789d commit be33b86
Show file tree
Hide file tree
Showing 120 changed files with 2,150 additions and 2,266 deletions.
3 changes: 1 addition & 2 deletions _build/_theme/_templates/globaltoc.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<div class=submenu>
{% set menu = [
('The Book', 'book/index'),
('The Cookbook', 'cookbook/index'),
('Home', 'index'),
('The Components', 'components/index'),
('The Best Practices', 'best_practices/index'),
('The Quick Tour', 'quick_tour/index'),
Expand Down
2 changes: 1 addition & 1 deletion assetic/apply_to_option.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ You can also combine multiple CoffeeScript files into a single output file:

Both files will now be served up as a single file compiled into regular JavaScript.

.. _cookbook-assetic-apply-to:
.. _assetic-apply-to:

Filtering Based on a File Extension
-----------------------------------
Expand Down
34 changes: 17 additions & 17 deletions assetic/asset_management.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ your application:
Introducing Assetic
-------------------

Assetic combines two major ideas: :ref:`assets <cookbook-assetic-assets>` and
:ref:`filters <cookbook-assetic-filters>`. The assets are files such as CSS,
Assetic combines two major ideas: :ref:`assets <assetic-assets>` and
:ref:`filters <assetic-filters>`. The assets are files such as CSS,
JavaScript and image files. The filters are things that can be applied to
these files before they are served to the browser. This allows a separation
between the asset files stored in the application and the files actually presented
Expand Down Expand Up @@ -117,7 +117,7 @@ load them from anywhere) before serving them. This means you can:

* Run image optimizations on your images

.. _cookbook-assetic-assets:
.. _assetic-assets:

Assets
------
Expand All @@ -126,12 +126,12 @@ Using Assetic provides many advantages over directly serving the files.
The files do not need to be stored where they are served from and can be
drawn from various sources such as from within a bundle.

You can use Assetic to process :ref:`CSS stylesheets <cookbook-assetic-including-css>`,
:ref:`JavaScript files <cookbook-assetic-including-javascript>` and
:ref:`images <cookbook-assetic-including-image>`. The philosophy
You can use Assetic to process :ref:`CSS stylesheets <assetic-including-css>`,
:ref:`JavaScript files <assetic-including-javascript>` and
:ref:`images <assetic-including-image>`. The philosophy
behind adding either is basically the same, but with a slightly different syntax.

.. _cookbook-assetic-including-javascript:
.. _assetic-including-javascript:

Including JavaScript Files
~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -172,7 +172,7 @@ To include JavaScript files, use the ``javascripts`` tag in any template:
.. tip::

You can also include CSS stylesheets: see :ref:`cookbook-assetic-including-css`.
You can also include CSS stylesheets: see :ref:`assetic-including-css`.

In this example, all files in the ``Resources/public/js/`` directory of the
AppBundle will be loaded and served from a different location. The actual
Expand All @@ -184,9 +184,9 @@ rendered tag might simply look like:

This is a key point: once you let Assetic handle your assets, the files are
served from a different location. This *will* cause problems with CSS files
that reference images by their relative path. See :ref:`cookbook-assetic-cssrewrite`.
that reference images by their relative path. See :ref:`assetic-cssrewrite`.

.. _cookbook-assetic-including-css:
.. _assetic-including-css:

Including CSS Stylesheets
~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -229,7 +229,7 @@ except with the ``stylesheets`` tag:
But because Assetic changes the paths to your assets, this *will* break any
background images (or other paths) that uses relative paths, unless you use
the :ref:`cssrewrite <cookbook-assetic-cssrewrite>` filter.
the :ref:`cssrewrite <assetic-cssrewrite>` filter.

.. note::

Expand All @@ -240,7 +240,7 @@ the :ref:`cssrewrite <cookbook-assetic-cssrewrite>` filter.
that there is a known issue that causes the ``cssrewrite`` filter to fail
when using the ``@AppBundle`` syntax for CSS stylesheets.

.. _cookbook-assetic-including-image:
.. _assetic-including-image:

Including Images
~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -272,7 +272,7 @@ You can also use Assetic for image optimization. More information in
`LiipImagineBundle`_ community bundle, which allows to compress and
manipulate images (rotate, resize, watermark, etc.) before serving them.

.. _cookbook-assetic-cssrewrite:
.. _assetic-cssrewrite:

Fixing CSS Paths with the ``cssrewrite`` Filter
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -333,7 +333,7 @@ the JavaScript files.
If you're new to Assetic and try to use your application in the ``prod``
environment (by using the ``app.php`` controller), you'll likely see
that all of your CSS and JS breaks. Don't worry! This is on purpose.
For details on using Assetic in the ``prod`` environment, see :ref:`cookbook-assetic-dumping`.
For details on using Assetic in the ``prod`` environment, see :ref:`assetic-dumping`.

And combining files doesn't only apply to *your* files. You can also use Assetic to
combine third party assets, such as jQuery, with your own into a single file:
Expand Down Expand Up @@ -437,7 +437,7 @@ with the ``@named_asset`` notation:
<script src="<?php echo $view->escape($url) ?>"></script>
<?php endforeach ?>
.. _cookbook-assetic-filters:
.. _assetic-filters:

Filters
-------
Expand Down Expand Up @@ -557,7 +557,7 @@ done from the template and is relative to the public document root:
via configuration on each deployment. For more information, see the
:ref:`reference-framework-assets-version` configuration option.

.. _cookbook-assetic-dumping:
.. _assetic-dumping:

Dumping Asset Files
-------------------
Expand Down Expand Up @@ -591,7 +591,7 @@ by Symfony (as the asset files are in the ``dev`` environment). This is on
purpose - letting Symfony generate these files dynamically in a production
environment is just too slow.

.. _cookbook-assetic-dump-prod:
.. _assetic-dump-prod:

Instead, each time you use your application in the ``prod`` environment (and therefore,
each time you deploy), you should run the following command:
Expand Down
8 changes: 4 additions & 4 deletions assetic/uglifyjs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ to combine and minify JavaScript assets so that they require less HTTP requests
and make your site load faster. `UglifyCSS`_ is a CSS compressor/beautifier
that is very similar to UglifyJS.

In this cookbook, the installation, configuration and usage of UglifyJS is
In this article, the installation, configuration and usage of UglifyJS is
shown in detail. UglifyCSS works pretty much the same way and is only
talked about briefly.

Expand Down Expand Up @@ -236,14 +236,14 @@ apply this filter when debug mode is off (e.g. ``app.php``):
<?php endforeach ?>
To try this out, switch to your ``prod`` environment (``app.php``). But before
you do, don't forget to :ref:`clear your cache <book-page-creation-prod-cache-clear>`
and :ref:`dump your assetic assets <cookbook-assetic-dump-prod>`.
you do, don't forget to :ref:`clear your cache <page-creation-prod-cache-clear>`
and :ref:`dump your assetic assets <assetic-dump-prod>`.

.. tip::

Instead of adding the filters to the asset tags, you can also configure which
filters to apply for each file in your application configuration file.
See :ref:`cookbook-assetic-apply-to` for more details.
See :ref:`assetic-apply-to` for more details.

Install, Configure and Use UglifyCSS
------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion assetic/yuicompressor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ apply this filter when debug mode is off.
example in the ``yui_js`` filter ``apply_to: "\.js$"``. To only have the filter
applied in production, add this to the ``config_prod`` file rather than the
common config file. For details on applying filters by file extension,
see :ref:`cookbook-assetic-apply-to`.
see :ref:`assetic-apply-to`.

.. _`YUI Compressor`: http://yui.github.io/yuicompressor/
.. _`Download the JAR`: https://github.com/yui/yuicompressor/releases
Expand Down
4 changes: 2 additions & 2 deletions best_practices/creating-the-project.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Installer**, which has to be installed before creating your first project.

Use the Symfony Installer to create new Symfony-based projects.

Read the :doc:`installation & setup chapter </setup>` of the Symfony Book to
learn how to install and use the Symfony Installer.
Read the :doc:`/setup` article learn how to install and use the Symfony
Installer.

.. _linux-and-mac-os-x-systems:
.. _windows-systems:
Expand Down
8 changes: 3 additions & 5 deletions best_practices/forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ To use the class, use ``createForm()`` and pass the fully qualified class name::
Registering Forms as Services
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You can also
:ref:`register your form type as a service <form-cookbook-form-field-service>`.
You can also :ref:`register your form type as a service <form-field-service>`.
This is only needed if your form type requires some dependencies to be injected
by the container, otherwise it is unnecessary overhead and therefore *not*
recommended to do this for all form type classes.
Expand Down Expand Up @@ -167,9 +166,8 @@ all of the fields:

If you need more control over how your fields are rendered, then you should
remove the ``form_widget(form)`` function and render your fields individually.
See the :doc:`/form/form_customization` cookbook article for more information
on this and how you can control *how* the form renders at a global level
using form theming.
See :doc:`/form/form_customization` for more information on this and how you
can control *how* the form renders at a global level using form theming.

Handling Form Submits
---------------------
Expand Down
2 changes: 1 addition & 1 deletion best_practices/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Authentication and Firewalls (i.e. Getting the User's Credentials)

You can configure Symfony to authenticate your users using any method you
want and to load user information from any source. This is a complex topic, but
the :doc:`Security Cookbook Section </security>` has a lot of information about
the :doc:`Security guide</security>` has a lot of information about
this.

Regardless of your needs, authentication is configured in ``security.yml``,
Expand Down
14 changes: 7 additions & 7 deletions bundles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ in your application and to optimize them the way you want.

.. note::

While you'll learn the basics here, an entire cookbook entry is devoted
to the organization and best practices of :doc:`bundles </bundles/best_practices>`.
While you'll learn the basics here, an entire article is devoted to the
organization and best practices of :doc:`bundles </bundles/best_practices>`.

A bundle is simply a structured set of files within a directory that implement
a single feature. You might create a BlogBundle, a ForumBundle or
Expand Down Expand Up @@ -167,12 +167,12 @@ of the most common elements of a bundle:
A bundle can be as small or large as the feature it implements. It contains
only the files you need and nothing else.

As you move through the book, you'll learn how to persist objects to a database,
create and validate forms, create translations for your application, write
tests and much more. Each of these has their own place and role within the
bundle.
As you move through the guides, you'll learn how to persist objects to a
database, create and validate forms, create translations for your application,
write tests and much more. Each of these has their own place and role within
the bundle.

Learn More
Learn more
----------

.. toctree::
Expand Down
7 changes: 4 additions & 3 deletions bundles/best_practices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This article is all about how to structure your **reusable bundles** so that
they're easy to configure and extend. Many of these recommendations do not
apply to application bundles because you'll want to keep those as simple
as possible. For application bundles, just follow the practices shown throughout
the book and cookbook.
the guides.

.. seealso::

Expand Down Expand Up @@ -414,10 +414,11 @@ The ``composer.json`` file should include at least the following metadata:
In order to make it easier for developers to find your bundle, register it on
`Packagist`_, the official repository for Composer packages.

Learn more from the Cookbook
----------------------------
Learn more
----------

* :doc:`/bundles/extension`
* :doc:`/bundles/configuration`

.. _`PSR-0`: http://www.php-fig.org/psr/psr-0/
.. _`PSR-4`: http://www.php-fig.org/psr/psr-4/
Expand Down
Loading

0 comments on commit be33b86

Please sign in to comment.