Use config.yml parameters in service's tag definition
<p>I'd like to put a class name (which has been configured in <code>app/config/config.yml</code> by the user) in the tag definition of my Bundle's service configuration.</p>

<p><code>app/config/config.yml</code> :</p>

<pre><code>my:
    class_name: AppBundle\Entity\Product
</code></pre>

<p>My bundle's configuration : <code>services.xml</code></p>

<pre><code>&lt;service id="my.entity_listener" class="My\EventListener\MyListener"&gt;
    &lt;tag name="doctrine.orm.entity_listener" entity="%my.class_name%" event="preUpdate" /&gt;
&lt;/service&gt;
</code></pre>

<p>Is that possible in any way ? All I can get is %my.class_name%. It isn't replaced in the tag definition. Although, my dependency injection is working as it replaces it well just above, in the same config file :</p>

<pre><code>&lt;service id="my.param_converter" class="My\ParamConverter\MyParamConverter"&gt;
    &lt;tag name="request.param_converter" converter="user" priority="10" /&gt;
    &lt;argument type="service" id="doctrine.orm.default_entity_manager" /&gt;
    &lt;argument&gt;%my.class_name%&lt;/argument&gt; &lt;!-- Replaced by AppBundle\Entity\Product --&gt;
&lt;/service&gt;
</code></pre>