Install symfony2 package (DoctrineCouchDBBundle)

I want to install the package in my symfony project. However, I run into a few problems. Accept my ignorance if the answer is trivial, but I tried to find a solution, but, alas, I did not find anything.

In my deps file , I have:

[doctrine-couchdb]
  git=http://github.com/doctrine/couchdb-odm.git
[DoctrineCouchDBBundle]
  git=http://github.com/doctrine/DoctrineCouchDBBundle.git
  target=/bundles/Symfony/Bundle/DoctrineCouchDBBundle

I run the bin / vendors install command

In my autoload.php file , I have:

'Doctrine\\ODM\\CouchDB'=> __DIR__.'/../vendor/doctrine-couchdb/lib',

I registered the package:

new Doctrine\Bundle\CouchDBBundle\DoctrineCouchDBBundle()

When I run php app / console, I get an error message:

Fatal error: Class 'Doctrine\Bundle\CouchDBBundle\DoctrineCouchDBBundle' not found in /var/www/symfony2.test/app/AppKernel.php on line 22

I noticed that for MongoDB ODM you have:

[doctrine-mongodb]
    git=http://github.com/doctrine/mongodb.git

is there a reduction of doctrine-couchdb? Have you used this kit?

+5
source share
2 answers

    target= /bundles/Doctrine/Bundle/CouchDBBundle

:

    [DoctrineCouchDBBundle]
      git=http://github.com/doctrine/DoctrineCouchDBBundle.git
      target=/bundles/Doctrine/Bundle/CouchDBBundle

, couchdb

    namespace Doctrine\Bundle\CouchDBBundle;

    new Doctrine\Bundle\CouchDBBundle\DoctrineCouchDBBundle()

AppKernel , namespace/class_name.

DoctrineCouchDBBundle Git

, Symfony 2, , , , . :

    bundle_dir/bundle_name/.../configuration.php

+1

:

1.) , Doctrine\CouchDB

2.) git

target=/bundles/Symfony/Bundle/DoctrineCouchDBBundle

target=/bundles/Doctrine/Bundle/DoctrineCouchDBBundle ( Symfony = > Doctrine)

3.)

'Doctrine' => __DIR__.'/../vendor/doctrine/lib',

'Doctrine' => array(__DIR__.'/../vendor/doctrine/lib', __DIR__.'/../vendor/bundles'),


:

1.)

2.) 'Doctrine\\ODM\\CouchDB'=> __DIR__.'/../vendor/doctrine-couchdb/lib', ( "", "\" )

:

'Doctrine\\ODM\\CouchDB'=> __DIR__.'/../vendor/doctrine-couchdb/lib',
'Doctrine\\DBAL'   => __DIR__.'/../vendor/doctrine-dbal/lib',
'Doctrine'         => __DIR__.'/../vendor/doctrine/lib',

3.) config.yml

+1

All Articles