title: Symfony2 service container: Inject array of services parameter as an argument to another service using XML
body: <p>I have a parameter which should represent array of services in my <code>services.xml</code> file:</p>
  
  <pre><code>&lt;parameters&gt;
      &lt;parameter key="decorators.all" type="collection"&gt;
          &lt;parameter type="service" id="decorator1" /&gt;
          &lt;parameter type="service" id="decorator2" /&gt;
          &lt;parameter type="service" id="decorator3" /&gt;
      &lt;/parameter&gt;
  &lt;/parameters&gt;
  
  &lt;services&gt;
      &lt;service id="decorator1" class="\FirstDecorator" /&gt;
      &lt;service id="decorator2" class="\SecondDecorator" /&gt;
      &lt;service id="decorator3" class="\ThirdDecorator" /&gt;
  &lt;/services&gt;
  </code></pre>
  
  <p>Now I want to inject this collection to another service as an array of services:</p>
  
  <pre><code>&lt;services&gt;
      &lt;service id="notifications_decorator" class="\NotificationsDecorator"&gt;
          &lt;argument&gt;%decorators.all%&lt;/argument&gt;
      &lt;/service&gt;
  &lt;/services&gt;
  </code></pre>
  
  <p>But it doesn't work. Can't understand why. What am I missing?</p>