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

Unexpected behaviour for VCS repository #7747

Open
alcohol opened this issue Oct 25, 2018 · 3 comments
Open

Unexpected behaviour for VCS repository #7747

alcohol opened this issue Oct 25, 2018 · 3 comments
Milestone

Comments

@alcohol
Copy link
Member

@alcohol alcohol commented Oct 25, 2018

When defining a custom VCS repository, the package name is determined by the root identifier (often the master branch). When scanning tags of said repository, we do not verify if the composer.json of each tag contains the same package name.

I know this scenario is unlikely to occur; but I actually had someone in my team run into this (by mistake).

Short (simplified) description:

  • Master branch was name foo/bar.
  • They were working on a branch 2.x, where they changed the name to foo/baz (not sure why, irrelevant).
  • They were tagging 2.x.x releases from the 2.x branch for a while which Composer gladly picked up as new versions for foo/bar, but once they merged the 2.x branch into master, everything broke.

This of course was a mistake on the user's end, but it seems like we could guard against this by rejecting tags with composer.json schemas that do not contain the same package name as the root identifier.

@Seldaek
Copy link
Member

@Seldaek Seldaek commented Oct 31, 2018

What do you mean by "everything broke"? AFAIK packagist and I believe composer too will ignore the name entirely except for in the default branch.

@sbuzonas
Copy link
Contributor

@sbuzonas sbuzonas commented Oct 31, 2018

I noticed in #7756 (comment) that weird things may happen if the package name changes.

If there is a root identifier, it's applied to everything. If there is not, the name is pulled from every tag/branch.

@Seldaek
Copy link
Member

@Seldaek Seldaek commented Oct 31, 2018

Hmm in a composer vcs repo maybe.. on packagist though the name must be present when submitting and then we just keep that forever.

@Seldaek Seldaek added this to the Bugs milestone Oct 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.