Skip to content

Commit

Permalink
Merge branch '2.4' into 2.5
Browse files Browse the repository at this point in the history
* 2.4:
  add note about parameters in imports
  Fixed the official name of Node.js
  Added a note about the total deprecation of YUI
  • Loading branch information
weaverryan committed Oct 1, 2014
2 parents e8a1501 + 42e243c commit 77d166b
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 3 deletions.
2 changes: 2 additions & 0 deletions book/service_container.rst
Expand Up @@ -377,6 +377,8 @@ configuration.
// app/config/config.php
$loader->import('@AcmeHelloBundle/Resources/config/services.php');
.. include:: /components/dependency_injection/_imports-parameters-note.rst.inc

The ``imports`` directive allows your application to include service container
configuration resources from any other location (most commonly from bundles).
The ``resource`` location, for files, is the absolute path to the resource
Expand Down
31 changes: 31 additions & 0 deletions components/dependency_injection/_imports-parameters-note.rst.inc
@@ -0,0 +1,31 @@
.. note::

Due to the way in which parameters are resolved, you cannot use them to
build paths in imports dynamically. This means that something like the
following doesn't work:

.. configuration-block::

.. code-block:: yaml

# app/config/config.yml
imports:
- { resource: "%kernel.root_dir%/parameters.yml" }

.. 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"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

<imports>
<import resource="%kernel.root_dir%/parameters.yml" />
</imports>
</container>

.. code-block:: php

// app/config/config.php
$loader->import('%kernel.root_dir%/parameters.yml');
12 changes: 9 additions & 3 deletions cookbook/assetic/yuicompressor.rst
Expand Up @@ -10,8 +10,13 @@ you can take advantage of this tool very easily.

.. caution::

The YUI Compressor is going through a `deprecation process`_. But don't
worry! See :doc:`/cookbook/assetic/uglifyjs` for an alternative.
The YUI Compressor is `no longer maintained by Yahoo`_ but by an independent
volunteer. Moreover, Yahoo has decided to `stop all new development on YUI`_
and to move to other modern alternatives such as Node.js.

That's why you are **strongly advised** to avoid using YUI utilities unless
strictly necessary. Read :doc:`/cookbook/assetic/uglifyjs` for a modern and
up-to-date alternative.

Download the YUI Compressor JAR
-------------------------------
Expand Down Expand Up @@ -164,4 +169,5 @@ apply this filter when debug mode is off.

.. _`YUI Compressor`: http://developer.yahoo.com/yui/compressor/
.. _`Download the JAR`: https://github.com/yui/yuicompressor/releases
.. _`deprecation process`: http://www.yuiblog.com/blog/2012/10/16/state-of-yui-compressor/
.. _`no longer maintained by Yahoo`: http://www.yuiblog.com/blog/2013/01/24/yui-compressor-has-a-new-owner/
.. _`stop all new development on YUI`: http://yahooeng.tumblr.com/post/96098168666/important-announcement-regarding-yui
2 changes: 2 additions & 0 deletions cookbook/configuration/configuration_organization.rst
Expand Up @@ -148,6 +148,8 @@ needed for the ``app/config/dev/config.yml`` file:
// ...
.. include:: /components/dependency_injection/_imports-parameters-note.rst.inc

Semantic Configuration Files
----------------------------

Expand Down
2 changes: 2 additions & 0 deletions cookbook/configuration/environments.rst
Expand Up @@ -262,6 +262,8 @@ The best way to accomplish this is via a new environment called, for example,
'profiler' => array('only-exceptions' => false),
));
.. include:: /components/dependency_injection/_imports-parameters-note.rst.inc

And with this simple addition, the application now supports a new environment
called ``benchmark``.

Expand Down

0 comments on commit 77d166b

Please sign in to comment.