Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes "replaces" section #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Removes "replaces" section #2

wants to merge 1 commit into from

Conversation

schmittjoh
Copy link

This removes the "replaces" section from the composer file.

I'm not sure why you added it, but it causes trouble for anyone who tries to install the original guzzle version who might now instead get your forked version. If you want to require your package instead of the original, you can add your repository in the "repositories" section instead.

@Danack
Copy link
Owner

Danack commented Jun 27, 2013

Hi Schmittjoh,

Sorry, I don't understand what this pull request is for. I don't see how someone can 'accidentally' get this fork of guzzle unless they list it as a require in a project, or another project that requires it.

If you can give me an example composer.json file to see a problem happening, that would be fantastic.

cheers
Dan

@schmittjoh
Copy link
Author

If you set the replaces configuration, it tells composer to treat this package just like "guzzle/guzzle" which in consequence means that someone who puts "guzzle/guzzle" in his configuration might get your package instead (as you told composer that it is equivalent). I don't know the specific circumstances when this happens, you would need to ask @Seldaek or @naderman.

Anyway, I think @Seldaek already removed your package from packagist, so everything is fine again. However, if you plan to re-submit it, please first merge this patch.

@Danack
Copy link
Owner

Danack commented Jun 27, 2013

Hi,

Thanks for the reply, but I'm still confused.

i) You didn't say how Composer would see this project unless someone required it in their project.

ii) This project doesn't actually have guzzle/guzzle listed as a replace, so don't see Composer can get confused between the fork and the original anyway.

iii) The replaces in the composer.json are there because (for whatever reason) Mtdonling also has the sub-components of Guzzle listed as separate projects https://github.com/guzzle/batch -> https://packagist.org/packages/guzzle/batch Although these components can be installed separately, they are also included (as source code, not a dependency) in guzzle/guzzle. To prevent that happening Mtdowling added the replace statements in his composer.json in the main Guzzle repository: https://github.com/guzzle/guzzle/blob/master/composer.json#L21

The only changes I made to the composer.json are to change the name of the project and to add a conflicts to prevent both guzzle/danackguzzle and guzzle/guzzle being installed at the same time.

so everything is fine again.

Except that no-one can use my project https://packagist.org/packages/intahwebz/flickrguzzle which depends on my fork of Guzzle and any project that includes FlickrGuzzle also can't run 'composer update' successfully either.

@Danack
Copy link
Owner

Danack commented Jun 27, 2013

Hi,

I've just had a chat with igorw who explained how replaces works and how it doesn't just affect this package, or dependent packages. So I now understand the problem that I was causing.

I won't merge this just yet. There's no point as it would only be appropriate if I was going to put this project back on packagist, and it's currently just not feasible to do that, as the infrastructure around 'replaces' just doesn't allow that.

cheers
Dan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants