-
Notifications
You must be signed in to change notification settings - Fork 116
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
docs: add info on migration from tymon's package #56
docs: add info on migration from tymon's package #56
Conversation
Thanks, was looking for this! Will give the steps a try and report back! |
Quick first impression of the guide:
|
One downside of running |
README.md
Outdated
1) Replace `"tymon/jwt-auth": "^1.0"` with `"php-open-source-saver/jwt-auth": "^1.2"` in your `composer.json` | ||
2) Run `composer update` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One downside of running
composer update
this way is that it will upgrade all packages
I did some tests to figure out what would have the least amount of impact on existing packages:
composer update
works, but updates all packages which may not be desired- Running first
composer remove tymon/jwt-auth
and thencomposer require php-open-source-saver/jwt-auth
seems to work nicely, one does not even have to manually touch thecomposer.json
- Keeping manually changing the
composer.json
but still avoiding updating unrelated packages, this also worked in my test:composer update php-open-source-saver/jwt-auth --with-dependencies
Sincetymon/jwt-auth
is not referenced incomposer.json
, this will remove it too
My preference would be 2): even though it's not as nice looking and is essentially two commands, it does not require manually changing anything and will automatically chose the best version to install (^1.2
currently) so is "maintenance free" insofar we don't need to update the reference in the README regarding the version number:
1) Replace `"tymon/jwt-auth": "^1.0"` with `"php-open-source-saver/jwt-auth": "^1.2"` in your `composer.json` | |
2) Run `composer update` | |
1) Run `composer remove tymon/jwt-auth` | |
2) Run `composer require php-open-source-saver/jwt-auth` |
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll re-check once again, might be possile, that it is needed to add --no-scripts
, since if composer will trigger package discovery, it can throw an error about non-existing classes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my case, special snowflake scenario, I've actually disabled the auto-discovery for the (previous name of the) package because I register my own serviceprovider, which extends the one from the package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It LGTM but since this adds a "Migration" chapter, we should mention the incompatibility of the constructor I pointed out in #56 (comment) and we should probably strive to make the 1.* series not less compatible
Look good for me too. |
❤️Thank you 🙏🏼 |
Close #54