Composer installed a fork instead if this bundle #177

Closed
hpatoio opened this Issue Feb 18, 2014 · 4 comments

Comments

Projects
None yet
4 participants
@hpatoio
Contributor

hpatoio commented Feb 18, 2014

Hello, I'm not sure this is a JMSTranslationBundle or a Composer bug but something strange happened.

I just wanted to install version 1.0 of JMSTranslationBundle but latest version of a fork of it was installed instead.

Here what happened

simone@mypc:/var/www/myprj$ composer require jms/translation-bundle
Please provide a version constraint for the jms/translation-bundle requirement: 1.0
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)             
  - Installing nikic/php-parser (v0.9.2)
    Downloading: 100%         

  - Installing znanylekarz/translation-bundle (dev-master ec65665)
    Cloning ec656651d16a02585229827fce13b75c6b7aef4a

Writing lock file
Generating autoload files
[..]

So, my question is: Is it normal that I got this bundle https://github.com/ZnanyLekarz/JMSTranslationBundle installed instead of JMSTranslationBundle ?

Thanks

@Seldaek and @naderman might be interested

@Seldaek

This comment has been minimized.

Show comment
Hide comment
@Seldaek

Seldaek Feb 18, 2014

It's not ok no, but it's related to composer/composer#2690

Anyway I deleted the offending fork, @mlebkowski @nediam please take notice and use https://getcomposer.org/doc/05-repositories.md#vcs instead of abusing packagist to fork packages. If it's a real fork you intend to maintain you can submit it to packagist but then you should not use replace and you should definitely add a note explaining what your version does differently.

Seldaek commented Feb 18, 2014

It's not ok no, but it's related to composer/composer#2690

Anyway I deleted the offending fork, @mlebkowski @nediam please take notice and use https://getcomposer.org/doc/05-repositories.md#vcs instead of abusing packagist to fork packages. If it's a real fork you intend to maintain you can submit it to packagist but then you should not use replace and you should definitely add a note explaining what your version does differently.

@mlebkowski

This comment has been minimized.

Show comment
Hide comment
@mlebkowski

mlebkowski Feb 18, 2014

Yeah, breaking our build because someone has unmet dependencies is the best way to go. 👍

As far as I understand, if we switched to provides it could work for us. Anyway, thanks for the notice, we'll handle it on our side.

Yeah, breaking our build because someone has unmet dependencies is the best way to go. 👍

As far as I understand, if we switched to provides it could work for us. Anyway, thanks for the notice, we'll handle it on our side.

@Seldaek

This comment has been minimized.

Show comment
Hide comment
@Seldaek

Seldaek Feb 19, 2014

@mlebkowski sorry if it caused you problems, but we have to be fairly reactive with those packages otherwise it can cause problems for many more people. Anyway using provide is going to cause the same problem I'm afraid. http://blog.naderman.de/2014/02/17/replace-conflict-forks-explained/ explains some more. Basically using replace/provide on packagist is not really allowed unless you are really replacing a package 1:1. Valid examples are symfony or zend framework that have big all-in-one packages replacing the individual packages for every component. For forks, you can not say you replace or provide it, since it is effectively not the same code. In the future if we manage to improve on that situation though it should be possible to use replace on public packages without interfering with other users that did not explicitly require your fork, so hopefully this will resolve your use case.

Seldaek commented Feb 19, 2014

@mlebkowski sorry if it caused you problems, but we have to be fairly reactive with those packages otherwise it can cause problems for many more people. Anyway using provide is going to cause the same problem I'm afraid. http://blog.naderman.de/2014/02/17/replace-conflict-forks-explained/ explains some more. Basically using replace/provide on packagist is not really allowed unless you are really replacing a package 1:1. Valid examples are symfony or zend framework that have big all-in-one packages replacing the individual packages for every component. For forks, you can not say you replace or provide it, since it is effectively not the same code. In the future if we manage to improve on that situation though it should be possible to use replace on public packages without interfering with other users that did not explicitly require your fork, so hopefully this will resolve your use case.

@schmittjoh

This comment has been minimized.

Show comment
Hide comment
@schmittjoh

schmittjoh Feb 19, 2014

Owner

I guess we can close this. Thanks for the quick response @Seldaek.

Owner

schmittjoh commented Feb 19, 2014

I guess we can close this. Thanks for the quick response @Seldaek.

@schmittjoh schmittjoh closed this Feb 19, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment