Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Installation with composer #37

Merged
merged 2 commits into from

4 participants

@gajdaw

How to install DoctrineMigrationsBundle with composer.

Resources/doc/index.rst
((23 lines not shown))
Update the vendor libraries:
.. code-block:: bash
- $ php bin/vendors install
+ $ php composer.phar install
@stof Collaborator
stof added a note

you need to use update. install will use the lock file, not the new composer.json (and it will tell you your lock file is outdated)

@gajdaw
gajdaw added a note

Corrected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@stof stof merged commit 66f239d into from
@gchokeen

I unable to install using

"doctrine/doctrine-migrations-bundle": "dev-master"

What is the correct way to install ?

I am getting error

Problem 1
- The requested package doctrine/doctrine-migrations-bundle could not be found in any version, there may be a typo in the package name.

@gajdaw

I don't know, what is the reason of your problem. But I've checked:

"require": {
    "doctrine/doctrine-migrations-bundle": "dev-master"
}

When I issue:

composer update

everything is fine:

Updating dependencies
  - Installing doctrine/migrations (dev-master c1d875c)
    Cloning c1d875ce7d092dd1bc7508c3867b5c6b97431e43

  - Installing doctrine/doctrine-migrations-bundle (dev-master e494ace)
    Cloning e494aceebe05200c3f5e7b54c9facf2cf0b2099c

Maybe you should update composer? (It's just a random suggestion.)

@pawelnowak

Had a similar issue. In my case the error message was as follows:

Problem 1
    - Installation request for doctrine/doctrine-migrations-bundle dev-master -> satisfiable by doctrine/doctrine-migrations-bundle dev-master.
    - doctrine/doctrine-migrations-bundle dev-master requires doctrine/migrations * -> no matching package found.

I managed to resolve the issue by manually adding "doctrine/migrations": "dev-master", into the composer.json file.

@stof
Collaborator

see #44 for the explanation

@pawelnowak

My bad, sorry about the hassle.

@gchokeen

Thank you I already resolved this issue and blogged as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 21, 2012
  1. @gajdaw

    Installation with composer

    gajdaw authored
  2. @gajdaw
This page is out of date. Refresh to see the latest.
Showing with 15 additions and 21 deletions.
  1. +15 −21 Resources/doc/index.rst
View
36 Resources/doc/index.rst
@@ -18,37 +18,31 @@ Make sure you have both the ``doctrine-migrations`` and ``DoctrineMigrationsBund
libraries configured in your project. Follow these steps to install the
libraries in the Symfony Standard distribution.
-Add the following to ``deps``. This will register the Migrations Bundle
-and the doctrine-migrations library as dependencies in your application:
+If you're using the Standard Distribution, add the following to your
+``composer.json`` file:
-.. code-block:: text
+.. code-block:: json
- [doctrine-migrations]
- git=http://github.com/doctrine/migrations.git
-
- [DoctrineMigrationsBundle]
- git=http://github.com/doctrine/DoctrineMigrationsBundle.git
- target=/bundles/Doctrine/Bundle/MigrationsBundle
+{
+ "require": {
+ "doctrine/doctrine-migrations-bundle": "dev-master"
+ }
+}
Update the vendor libraries:
.. code-block:: bash
- $ php bin/vendors install
+ $ php composer.phar update
-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:
+If everything worked, the ``DoctrineMigrationsBundle`` can now be found
+at ``vendor/doctrine/doctrine-migrations-bundle``.
-.. code-block:: php
+.. note::
- // app/autoload.php
- $loader->registerNamespaces(array(
- //...
- 'Doctrine\\DBAL\\Migrations' => __DIR__.'/../vendor/doctrine-migrations/lib',
- 'Doctrine\\DBAL' => __DIR__.'/../vendor/doctrine-dbal/lib',
- ));
+ ``DoctrineMigrationsBundle`` installs
+ `Doctrine Migrations`_ library. The library can be found
+ at ``vendor/doctrine/migrations``.
Finally, be sure to enable the bundle in ``AppKernel.php`` by including the
following:
Something went wrong with that request. Please try again.