1

I added the docrtine-fixtures and the doctrine-fixtures-bundle to my dependencies in the composer.json, as follow:

 {
    "require": {
        "php": ">=5.3.3",
        "symfony/finder": "2.3.*",
        "doctrine/orm": "~2.2,>=2.2.3",
        "doctrine/doctrine-bundle": "~1.2",
        "incenteev/composer-parameter-handler": "~2.0",
        "doctrine/data-fixtures": "~1.1",
        "doctrine/doctrine-fixtures-bundle": "~2.2",
        "twig/extensions": "~1.0",
        "symfony/assetic-bundle": "~2.3",
        "symfony/swiftmailer-bundle": "~2.3",
        "symfony/monolog-bundle": "~2.4",
        "sensio/distribution-bundle": "~2.3",
        "sensio/framework-extra-bundle": "~3.0"

    }
}

And then I did php-cli composer.phar update, which worked and displayed the right message on my terminal:

Loading composer repositories with package information Updating dependencies (including require-dev) - Updating doctrine/data-fixtures (dev-master bd44f6b => v1.1.1) Checking out bd44f6b6e40247b6530bc8abe802e4e4d914976a

Writing lock file

Generating autoload files

Bu when I go to the folder vendor/doctrine, I cannot find any data-fixtures repository. What is the issue? Why does composer not load it and why does it display success messages?

(PS: My solution was to add the doctrine-fixture repository manually but it doesn't solve the composer issue).

Matteo
  • 37,680
  • 11
  • 100
  • 115
Nadjib
  • 311
  • 6
  • 17
  • Add the output of `COMPOSER_CACHE_DIR=/dev/null composer require 'doctrine/data-fixtures:~1.1' && doctrine update doctrine/data-fixtures && ls -la ./vendor/doctrine/` to the question please. Run the command with the CWD where your `composer.json` is located. – Nicolai Fröhlich Jul 17 '15 at 11:15
  • Hi Matteo, I cannot figure out where exactly I should add the output you are suggesting. I tried to put "COMPOSER_CACHE_DIR":"/dev/null," in my composer.json juste before "require":{} and then type php-cli composer.json update data-fixtures but it did the same thing. The commande doctrine update doesn't exist, so I did php-cli app/console doctrine:update:data-fixtures but it displayed a fatal error message. Could you help me out? What should I write and where (terminal, file?). Thanks. – Nadjib Jul 18 '15 at 14:19
  • I tried to "rm -rf ~/.composer/cache" as GM suggested, and then delete the doctrine-fixtures-bundle" and do php-cli composer.phar require 'doctrine/doctrine-fixtures-bundle:~2.2' and then php-cli composer.phar update but it keeps displaying: > Loading composer repositories with package information Updating dependencies (including require-dev) Nothing to install or update Generating autoload files But it doesn't download any repository to the vendor/doctrine. – Nadjib Jul 18 '15 at 14:31

1 Answers1

2

It could be a Composer caching issue. Try removing Composer's cache directory:

rm -rf ~/.composer/cache
Maltronic
  • 1,782
  • 10
  • 21
  • Hi GM, I tried to delete the cache but it would do exactly the same thing, without doanloading the right repositories to MyApp/vendor/doctrine. – Nadjib Jul 18 '15 at 14:29
  • You could also try the procedure described in http://stackoverflow.com/questions/25462185/composer-not-downloading-src-directory-for-packages If that doesn't work it might be necessary to reinstall composer. Hope that helps. – Maltronic Jul 18 '15 at 16:15