Symfony bundle inheritance - How to override/extend a service class
<p>In my <code>Symfony 2.8</code> project I use bundle inheritance to override/extend the <code>FOSUserBundle</code>: Files with the same path and name in the custom bundle override the original files in the <code>FOSUserBundle</code>.</p>

<p>While this works fine with controllers and resources like translations and views, it does not seem to work with service classes. </p>

<p>For example the <code>FOSUserBundle</code> uses <code>Resources\config\util.xml</code> to define the <code>fos_user.util.password_updater</code> service to use the class defined in <code>Util\PasswordUpdater.php</code>.</p>

<p>Simply adding a <code>Util\PasswordUpdater.php</code> to the inherited bundle does not work. This file is ignored and the bundle still uses the original version.</p>

<p><strong>Is this an indented behavior for services (since the original service definition still points to the original file), or am I doing something wrong?</strong></p>

<p>What is the correct way to override/extend services? I found the <a href="http://symfony.com/doc/current/bundles/override.html#services-configuration" rel="nofollow noreferrer">information</a>, that using a <code>compiler pass</code> is the best solution in general. But is this also true/intended when already using bundle inheritance?  </p>