Why this code? Using the following would not require using the Kernel:

``new RegisterXmlMappingsPass('FOS\UserBundle\Model',  realpath(__DIR__.'/Resources/config/doctrine/model'));``

Then if the Doctrine ORM Bundle has ``RegisteRxmlMappingsPass``, the ``FOSUserBundle`` uses it with its own mapping details, and so on...