-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Rename Package for Composer/Packagist #159
Comments
I'm willing to take a 24M hit as, looking at the stats, I think we'll be back on that number in a year or two anyway.
I haven't done a proof-of-concept for this so I don't know how viable an idea this is, but could a complementary or intermediate solution be to make the old package a metapackage (including only the renamed package) after the rename? That would at least resolve the issue regarding repositories for which this package is a root dependency, although I think they would still need to "allow" the new plugin. It would also give us an idea (through stats) how many packages still use the old name. |
I'm not entirely sure what you mean by that, though I seem to recall some discussion on this in one of the threads regarding renaming in the Packagist repo. You may want to have a read through those: |
Note - using the current official procedure a second (new) package would be created for the new name. The old name would be marked as abandoned with replacement. As the old package name still exists, the stats will still update and we will still be able to see how many packages use the old name. To illustrate:
For perspective regarding the stats, the rename of PHPCompatibility was done in version 8.2.0 / July 2018. As a lot of repos "inherit" the dependency via an external standard, we could try to help smooth over the transition by sending in some PRs to some of the bigger packages which While that would help a lot in moving users to the new package, each "end-user" package would still need to update the "allow-plugins" configuration. |
Open question: if we do rename the package, do we also want to rename the namespace ? |
One the one hand I don't see much need for it, on the other hand its just the one file (not counting test files) 🤷 |
Well, the argumentation for doing so would be largely the same as the argumentation for changing the Composer package name: consistency, identity and findability. |
Okay... so what I originally intended with my meta-package idea was this: In the current situation, we have one repo (on GitHub) and one package (on Packagist) After deprecating the original package and creating a new package (on Packagist) that points to the existing repo, we would create a meta-package in a new repo and point the original package to the new repo: Users that Something similar could be done, keeping the Drawing the diagram did point out that "consistency" issue to me, so yeah, lets change the namespace as well. Otherwise things might be confusing to users not familiar with the projects history. 👍 |
Copying over my comment about this from #187 (comment) for visibility:
|
Some of this can be mitigated by moving this to the new name, and creating a meta-package at the old name that requires the new package. Something like: {
"name": "old/name",
"description": "Transition package to aid migrating to new/name",
"type": "metapackage",
"require": {
"new/name": "^1.0"
},
"abandonned": "new/name"
} |
@fredden Thanks for pitching in. Unfortunately, AFAICS, such a construct is not going to help much. While renaming the package in The biggest end-user impact of a rename would be that every project which directly or indirectly requires the plugin, will have to update the |
Yes, I can see the main pain-point will be |
Well, I'm pretty sure that it is technically feasible, we effectively do something like that in the test suite of this project. Having said that, IMO, I don't think it is desirable to do this as it would effectively bypass and undermine this security feature Composer put in place, which I don't think is the right thing™ to do. It would also create a lot of questions and possibly uproar when people would suddenly see their Aside from the above, it would also require a new
The decision has not been made for definite yet, this should be a decision from all maintainers with input from the community, though I think it's pretty clear where I stand on it. |
This comes back to my original comment regarding meta-packages and wrapper repos. The only possible solution for two packages is creating two repos: a renamed package repo which contains the actual code and the original named package repo with only a transparent PHP proxy class (which extends the code from the renamed package). That would work by keeping the name, functionality and The question is if that effort is worth the cost... |
To clarify what I mean, I've made an example implementation: 7570527 (branch The most relevant changes are src/Plugin.php and composer.json (as almost everything else is deleted). |
I wonder about the |
We'll have to try (with a dummy) to see what actually happens, I think. (Or try and see by reading the Composer codebase. Or both? 🤷 ) I'll see when I can make some time to try. |
I'm inclined to scrap this for v1, so we can get that out of the door. Either we'll find a backward-compitable way to do this (and then the release version/date won't matter), bump it to v2, or indefinitely postpone it. |
…omposer-installer` package See PHPCSStandards#159
I'm inclined to close this issue as not feasible, nor desirable for end-users. |
Agree. 👍 Better things to focus on IMHO. |
Follow up on #113 and #146, which contain mentions/discussions about this as well.
Now the repository has moved to the PHPCSStandards organisation and been renamed to
composer-installer
, the question arises whether or not to rename the Composer package too.Currently the Composer package name is:
dealerdirect/phpcodesniffer-composer-installer
The proposed new Composer package name would be:
phpcsstandards/composer-installer
(in line with the new repo home)Advantages:
Disadvantages:
and users may not benefit of improvements made in the package until they have updated their(looks like the old package will still update).composer.json
configIf it would be decided to rename the package, this link was mentioned by @GaryJones in #113 containing information on how to manage this on the Packagist side of things: composer/packagist#47
Tasks if the package would be renamed:
The text was updated successfully, but these errors were encountered: