FOS User update error
<p>I am working on a Symfony 2,8 project with Sonata. 
I found that the users are managed with FOS : </p>

<pre><code>namespace Voyage\AdminBundle\Admin;

use Sonata\AdminBundle\Admin\Admin;
use Sonata\AdminBundle\Form\FormMapper;
use Sonata\AdminBundle\Datagrid\DatagridMapper;
use Sonata\AdminBundle\Datagrid\ListMapper;
use Sonata\AdminBundle\Show\ShowMapper;
use Sonata\UserBundle\Model\UserInterface;
use FOS\UserBundle\Model\UserManagerInterface;

class UserCoreAdmin extends Admin {

    /**
     * {@inheritdoc}
     */
    public function getFormBuilder() {
        //...
    }

    /**
     * {@inheritdoc}
     */
    public function getExportFields() {
        // avoid security field to be exported
    }

    /**
     * {@inheritdoc}
     */
    protected function configureListFields(ListMapper $listMapper) {
        //...
    }

    /**
     * {@inheritdoc}
     */
    protected function configureDatagridFilters(DatagridMapper $filterMapper) {
       //...
    }

    /**
     * {@inheritdoc}
     */
    protected function configureShowFields(ShowMapper $showMapper) {
    //...
    }

    /**
     * {@inheritdoc}
     */
    protected function configureFormFields(FormMapper $formMapper) {
        //...
    }
    /**
     * {@inheritdoc}
     */
    public function preUpdate($user) {
        $this-&gt;getUserManager()-&gt;updateCanonicalFields($user);
        $this-&gt;getUserManager()-&gt;updatePassword($user);
    }
    /**
     * @param UserManagerInterface $userManager
     */
    public function setUserManager(UserManagerInterface $userManager) {
        $this-&gt;userManager = $userManager;
    }
    /**
     * @return UserManagerInterface
     */
    public function getUserManager() {
        return $this-&gt;userManager;
    }
}
</code></pre>

<p>And i get this error while doing a user update : </p>

<blockquote>
  <p>Notice: Undefined property:
  Voyage\AdminBundle\Admin\UserCoreAdmin::$userManager</p>
  
  <p>500 Internal Server Error - ContextErrorException</p>
</blockquote>