Skip to content

Commit

Permalink
[cookbook][migrations] Tweaking migrations changes
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverryan committed May 23, 2011
1 parent 3335f4f commit 35474b1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cookbook/doctrine/migrations.rst
Expand Up @@ -35,19 +35,23 @@ Update the vendor libraries:
$ php bin/vendors.php
Now ensure your libraries will be autoloaded in ``autoload.php`` and
your bundle enabled in ``AppKernel.php`` by including the following:
Next, ensure the new ``Doctrine\DBAL\Migrations`` namespace will be autoloaded
via ``autoload.php``. The new ``Migrations`` namespace *must* be placed above
the ``Doctrine\\DBAL`` entry so that the autoloader looks inside the migrations
directory for those classes:

.. code-block:: php
// app/autoload.php
$loader->registerNamespaces(array(
//...
'Symfony' => array(__DIR__.'/../vendor/symfony/src', __DIR__.'/../vendor/bundles'),
'Doctrine\\DBAL\\Migrations' => __DIR__.'/../vendor/doctrine-migrations/lib',
'Doctrine\\DBAL' => __DIR__.'/../vendor/doctrine-dbal/lib',
));
Finally, be sure to enable the bundle in ``AppKernel.php`` by including the
following:

.. code-block:: php
// app/AppKernel.php
Expand Down

0 comments on commit 35474b1

Please sign in to comment.