Composer, minimal stability and dependency dependencies

I'm in quite a pickle with a new project and Symfony 2 dependencies using composer.

First of all, I install symfony / framework-standard-edition v2.1.5 using composer. This gives a composer file that has these requirements and does not have a minimum node stability.

"require": { "php": ">=5.3.3", "symfony/symfony": "2.1.*", "doctrine/orm": ">=2.2.3,<2.4-dev", "doctrine/doctrine-bundle": "1.0.*", "twig/extensions": "1.0.*@dev", "symfony/assetic-bundle": "2.1.*", "symfony/swiftmailer-bundle": "2.1.*", "symfony/monolog-bundle": "2.1.*", "sensio/distribution-bundle": "2.1.*", "sensio/framework-extra-bundle": "2.1.*", "sensio/generator-bundle": "2.1.*", "jms/security-extra-bundle": "1.2.*", "jms/di-extra-bundle": "1.1.*", "kriswallsmith/assetic": "1.1.*@dev" }, 

This works great, it installs all the latest stable versions, as expected.

Then I add the package -> https://packagist.org/packages/kunstmaan/admin-bundle

 "require": { "php": ">=5.3.3", "symfony/symfony": "2.1.*", "doctrine/orm": ">=2.2.3,<2.4-dev", "doctrine/doctrine-bundle": "1.0.*", "twig/extensions": "1.0.*@dev", "symfony/assetic-bundle": "2.1.*", "symfony/swiftmailer-bundle": "2.1.*", "symfony/monolog-bundle": "2.1.*", "sensio/distribution-bundle": "2.1.*", "sensio/framework-extra-bundle": "2.1.*", "sensio/generator-bundle": "2.1.*", "jms/security-extra-bundle": "1.2.*", "jms/di-extra-bundle": "1.1.*", "kriswallsmith/assetic": "1.1.*@dev", "kunstmaan/admin-bundle": "dev-master" }, 

This package depends on the "doctrines / doctrines-fixtures-beams" in "dev-master" ( https://packagist.org/packages/doctrine/doctrine-fixtures-bundle )

And this bundle depends on doctrine / data using * ( https://packagist.org/packages/doctrine/data-fixtures )

Now, when I start the composer update in the project, he tells me that there is nothing to satisfy the doctrine / data dependency. Either a typo in the name, or there is no "stable" version available with minimal stability by default.

He wants to install the doctrine-fixtures package in "dev", since installing dev-master automatically sets this dependency to the stability of "dev". But this does nothing for the depot of this depot, they still want to establish as stable, since this is my minimum stability.

At this point, I can fix this by adding the doctrine / data-appliances: dev-master or using @dev to my composer.json in the project.

But since this is just one example (knpmenubundle, fosuserbundle, etc. etc.), I will have to manually go over and add all the depot prints that are not installed in my own composer file.

Another solution would be to reduce the minimum stability of my project to dev, but at that time all my depots, including stable ones like Symfony2, will install their version of dev, not the tagged version.

+7
source share
1 answer

There is only one good way out of this: nag people to celebrate more releases. If you really need to work with unstable things, then for everyone else using "@dev" is the best alternative to IMO. If you have more unstable than stable, you can always mark @stable and set the minimum stability for dev. In most cases, the lock file is saved to save the ass;)

+13
source

All Articles