symfony - Cannot load doctrine:config , services.xml -


i trying build eventlistener project , followed instruction of guide: how register eventlisteners edited services.xml in tutorial , error message, when want test it:

invalidargumentexception: there no extension able load configuration "doctrine:config" (in /var/www/symfony/src/acme/appbundle/dependencyinjection/../resources/config/services.xml). looked namespace "http://symfony.com/schema/dic/doctrine", found none 

my services.xml :

    <?xml version="1.0" ?>  <container xmlns="http://symfony.com/schema/dic/services"     xmlns:doctrine="http://symfony.com/schema/dic/doctrine"     xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"     xsi:schemalocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">        <doctrine:config>         <doctrine:dbal default-connection="default">             <doctrine:connection driver="pdo_sqlite" memory="true" />         </doctrine:dbal>     </doctrine:config>      <services>         <service id="my.listener" class="acme\appbundle\eventlistener\confirmer">             <tag name="doctrine.event_listener" event="preupdate" />         </service>      </services>   </container> 

where problem?

you don't need doctrine configuration in service config.

the connection driver being configured inside app/config/config.yml. listener configuration looks though - remove doctrine:config stuff.

have @ doctrine configuration reference.

symfony automatically use default connection listener/subscriber if don't specify 1 using connectionoption. documentation bit confusing here doctrine connection there show how use different connection.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -