Skip to content

Docs re-org and removal of small sections #8537

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 21 additions & 11 deletions _build/redirection_map
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,20 @@
/book/configuration /configuration
/book/propel /propel/propel
/book/performance /performance
/cookbook/assetic/apply_to_option /assetic/apply_to_option
/cookbook/assetic/asset_management /assetic/asset_management
/cookbook/assetic/index /assetic
/cookbook/assetic/jpeg_optimize /assetic/jpeg_optimize
/cookbook/assetic/php /assetic/php
/cookbook/assetic/uglifyjs /assetic/uglifyjs
/cookbook/assetic/yuicompressor /assetic/yuicompressor
/cookbook/assetic/apply_to_option /frontend/assetic/apply_to_option
/cookbook/assetic/asset_management /frontend/assetic/asset_management
/cookbook/assetic/index /frontend/assetic
/cookbook/assetic/jpeg_optimize /frontend/assetic/jpeg_optimize
/cookbook/assetic/php /frontend/assetic/php
/cookbook/assetic/uglifyjs /frontend/assetic/uglifyjs
/cookbook/assetic/yuicompressor /frontend/assetic/yuicompressor
/assetic /frontend/assetic
/assetic/apply_to_option /frontend/assetic/apply_to_option
/assetic/asset_management /frontend/assetic/asset_management
/assetic/jpeg_optimize /frontend/assetic/jpeg_optimize
/assetic/php /frontend/assetic/php
/assetic/uglifyjs /frontend/assetic/uglifyjs
/assetic/yuicompressor /frontend/assetic/yuicompressor
/cookbook/bundles/best_practices /bundles/best_practices
/cookbook/bundles/configuration /bundles/configuration
/cookbook/bundles/extension /bundles/extension
Expand Down Expand Up @@ -150,7 +157,8 @@
/cookbook/event_dispatcher/event_listener /event_dispatcher
/cookbook/event_dispatcher/index /event_dispatcher
/cookbook/event_dispatcher/method_behavior /event_dispatcher/method_behavior
/cookbook/expressions /expressions/expressions
/cookbook/expressions /security/expressions
/expressions /security/expressions
/cookbook/form/create_custom_field_type /form/create_custom_field_type
/cookbook/form/create_form_type_extension /form/create_form_type_extension
/cookbook/form/data_transformers /form/data_transformers
Expand Down Expand Up @@ -181,10 +189,10 @@
/cookbook/profiler/matchers /profiler/matchers
/cookbook/profiler/profiling_data /profiler/profiling_data
/cookbook/profiler/storage /profiler/storage
/cookbook/psr7 /request/psr7
/cookbook/psr7 /components/psr7
/cookbook/request/index /request
/cookbook/request/load_balancer_reverse_proxy /request/load_balancer_reverse_proxy
/cookbook/request/mime_type /request/mime_type
/cookbook/request/load_balancer_reverse_proxy /deployment/proxies
/cookbook/request/mime_type /reference/configuration/framework#formats
/cookbook/routing/conditions /routing/conditions
/cookbook/routing/custom_route_loader /routing/custom_route_loader
/cookbook/routing/debug /routing/debug
Expand Down Expand Up @@ -303,6 +311,7 @@
/components/form/type_guesser /form/type_guesser
/components/http_foundation/index /components/http_foundation
/components/http_foundation/introduction /components/http_foundation
/components/http_foundation/trusting_proxies /deployment/proxies
/components/http_kernel/introduction /components/http_kernel
/components/http_kernel/index /components/http_kernel
/components/property_access/introduction /components/property_access
Expand All @@ -327,3 +336,4 @@
/form /forms
/testing/simulating_authentication /testing/http_authentication
/validation/group_service_resolver /form/validation_group_service_resolver
/request/load_balancer_reverse_proxy /deployment/proxies
6 changes: 3 additions & 3 deletions best_practices/web-assets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ tools like GruntJS.
Use Assetic to compile, combine and minimize web assets, unless you're
comfortable with frontend tools like GruntJS.

:doc:`Assetic </assetic/asset_management>` is an asset manager capable
:doc:`Assetic </frontend/assetic/asset_management>` is an asset manager capable
of compiling assets developed with a lot of different frontend technologies
like LESS, Sass and CoffeeScript. Combining all your assets with Assetic is a
matter of wrapping all the assets with a single Twig tag:
Expand Down Expand Up @@ -87,8 +87,8 @@ Learn More about Assetic
------------------------

Assetic can also minimize CSS and JavaScript assets
:doc:`using UglifyCSS/UglifyJS </assetic/uglifyjs>` to speed up your
websites. You can even :doc:`compress images </assetic/jpeg_optimize>`
:doc:`using UglifyCSS/UglifyJS </frontend/assetic/uglifyjs>` to speed up your
websites. You can even :doc:`compress images </frontend/assetic/jpeg_optimize>`
with Assetic to reduce their size before serving them to the user. Check out
the `official Assetic documentation`_ to learn more about all the available
features.
Expand Down
1 change: 0 additions & 1 deletion components/expression_language.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ Learn More
:maxdepth: 1
:glob:

/expressions
/components/expression_language/*
/service_container/expression_language
/reference/constraints/Expression
Expand Down
1 change: 0 additions & 1 deletion components/http_foundation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,6 @@ Learn More
/components/http_foundation/*
/controller
/controller/*
/request/*
/session/*
/http_cache/*

Expand Down
2 changes: 1 addition & 1 deletion components/http_foundation/trusting_proxies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Trusting Proxies
.. tip::

If you're using the Symfony Framework, start by reading
:doc:`/request/load_balancer_reverse_proxy`.
:doc:`/deployment/proxies`.

If you find yourself behind some sort of proxy - like a load balancer - then
certain header information may be sent to you using special ``X-Forwarded-*``
Expand Down
3 changes: 2 additions & 1 deletion request/psr7.rst → components/psr7.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Installation

You can install the component in 2 different ways:

* :doc:`Install it via Composer </components/using_components>` (`symfony/psr-http-message-bridge on Packagist <https://packagist.org/packages/symfony/psr-http-message-bridge>`_);
* :doc:`Install it via Composer </components/using_components>` (`symfony/psr-http-message-bridge on Packagist`_);
* Use the official Git repository (https://github.com/symfony/psr-http-message-bridge).

The bridge also needs a PSR-7 implementation to allow converting HttpFoundation
Expand Down Expand Up @@ -87,3 +87,4 @@ to a :class:`Symfony\\Component\\HttpFoundation\\Response` instance::

.. _`PSR-7`: http://www.php-fig.org/psr/psr-7/
.. _`Zend Diactoros`: https://github.com/zendframework/zend-diactoros
.. _`symfony/psr-http-message-bridge on Packagist`: https://packagist.org/packages/symfony/psr-http-message-bridge
File renamed without changes.
8 changes: 7 additions & 1 deletion frontend.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@ Front-end
=========

See the latest version of the docs for frontend tools. Or, see
:doc:`/assetic`.
:doc:`/frontend/assetic`.

.. toctree::
:maxdepth: 1
:glob:
:hidden:

frontend/*
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ To include an image you can use the ``image`` tag.
<?php endforeach ?>

You can also use Assetic for image optimization. More information in
:doc:`/assetic/jpeg_optimize`.
:doc:`/frontend/assetic/jpeg_optimize`.

.. tip::

Expand Down Expand Up @@ -441,7 +441,7 @@ into your template:
<?php endforeach ?>

A more detailed guide about configuring and using Assetic filters as well as
details of Assetic's debug mode can be found in :doc:`/assetic/uglifyjs`.
details of Assetic's debug mode can be found in :doc:`/frontend/assetic/uglifyjs`.

Controlling the URL Used
------------------------
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ How to Minify JavaScripts and Stylesheets with YUI Compressor

The YUI Compressor is `no longer maintained by Yahoo`_. That's why you are
**strongly advised to avoid using YUI utilities** unless strictly necessary.
Read :doc:`/assetic/uglifyjs` for a modern and up-to-date alternative.
Read :doc:`/frontend/assetic/uglifyjs` for a modern and up-to-date alternative.

Yahoo! provides an excellent utility for minifying JavaScripts and stylesheets
so they travel over the wire faster, the `YUI Compressor`_. Thanks to Assetic,
Expand Down
3 changes: 0 additions & 3 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,19 @@ Topics
.. toctree::
:maxdepth: 1

assetic
bundles
console
doctrine
debug
deployment
email
event_dispatcher
expressions
forms
frontend
http_cache
logging
performance
profiler
request
routing
security
session
Expand Down
2 changes: 1 addition & 1 deletion quick_tour/the_view.rst
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ Symfony provides the ``asset()`` function to deal with them easily:

The ``asset()`` function looks for the web assets inside the ``web/`` directory.
If you store them in another directory, read
:doc:`this article </assetic/asset_management>`
:doc:`this article </frontend/assetic/asset_management>`
to learn how to manage web assets.

Using the ``asset()`` function, your application is more portable. The reason
Expand Down
67 changes: 66 additions & 1 deletion reference/configuration/framework.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ Configuration
* `ip`_
* :ref:`path <reference-profiler-matcher-path>`
* `service`_
* `request`_:
* `formats`_
* `router`_
* `resource`_
* `type`_
Expand Down Expand Up @@ -178,7 +180,7 @@ trusted_proxies
**type**: ``array``

Configures the IP addresses that should be trusted as proxies. For more
details, see :doc:`/request/load_balancer_reverse_proxy`.
details, see :doc:`/deployment/proxies`.

.. versionadded:: 2.3
CIDR notation support was introduced in Symfony 2.3, so you can whitelist
Expand Down Expand Up @@ -647,6 +649,69 @@ service

This setting contains the service id of a custom matcher.

request
~~~~~~~

formats
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we include here the configuration example of the original request/mime_type.rst article?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea - done!

.......

**type**: ``array`` **default**: ``[]``

This setting is used to associate additional request formats (e.g. ``html``)
to one or more mime types (e.g. ``text/html``), which will allow you to use the
format & mime types to call
:method:`Request::getFormat($mimeType) <Symfony\\Component\\HttpFoundation\\Request::getFormat>` or
:method:`Request::getMimeType($format) <Symfony\\Component\\HttpFoundation\\Request::getMimeType>`.

In practice, this is important because Symfony uses it to automatically set the
``Content-Type`` header on the ``Response`` (if you don't explicitly set one).
If you pass an array of mime types, the first will be used for the header.

To configure a ``jsonp`` format:

.. configuration-block::

.. code-block:: yaml

# app/config/config.yml
framework:
request:
formats:
jsonp: 'application/javascript'

.. code-block:: xml

<!-- app/config/config.xml -->
<?xml version="1.0" encoding="UTF-8" ?>

<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:framework="http://symfony.com/schema/dic/symfony"
xsi:schemaLocation="http://symfony.com/schema/dic/services
http://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/symfony
http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">

<framework:config>
<framework:request>
<framework:format name="jsonp">
<framework:mime-type>application/javascript</framework:mime-type>
</framework:format>
</framework:request>
</framework:config>
</container>

.. code-block:: php

// app/config/config.php
$container->loadFromExtension('framework', array(
'request' => array(
'formats' => array(
'jsonp' => 'application/javascript',
),
),
));

router
~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion reference/dic_tags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ Finally, apply the filter:
{% endjavascripts %}

You can also apply your filter via the ``assetic.filters.my_filter.apply_to``
config option as it's described here: :doc:`/assetic/apply_to_option`.
config option as it's described here: :doc:`/frontend/assetic/apply_to_option`.
In order to do that, you must define your filter service in a separate xml
config file and point to this file's path via the ``assetic.filters.my_filter.resource``
configuration key.
Expand Down
2 changes: 1 addition & 1 deletion reference/twig_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ Those bundles can have other Twig extensions:

* **Assetic** adds the ``{% stylesheets %}``, ``{% javascripts %}`` and
``{% image %}`` tags. You can read more about them in
:doc:`the Assetic Documentation </assetic/asset_management>`.
:doc:`the Assetic Documentation </frontend/assetic/asset_management>`.

.. _`Twig Reference`: http://twig.sensiolabs.org/documentation#reference
.. _`Twig Extensions repository`: https://github.com/twigphp/Twig-extensions
Expand Down
8 changes: 0 additions & 8 deletions request.rst

This file was deleted.

Loading