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

chore(mongolid-v4): upgrade to mongolid v4 beta #20

Merged
merged 6 commits into from
Feb 18, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ ported for [Mongolid Laravel](https://github.com/leroy-merlin-br/mongolid-larave

Documentation for Passport can be found on the [Laravel website](https://laravel.com/docs/master/passport).

## Compatibility

| mongolid-passport | mongolid-laravel | mongolid |
|-------------------|------------------|------------|
| 11.0.0-beta | 3.0.0-beta | 4.0.0-beta |
ezandonai marked this conversation as resolved.
Show resolved Hide resolved

[Here](docs/upgrade/upgrade-guide.md) you find guides to upgrade versions.

## License

Mongolid Passport is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT),
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"illuminate/support": "^8.2",
"lcobucci/jwt": "^3.4|^4.0",
"league/oauth2-server": "~8.2.0",
"leroy-merlin-br/mongolid": "^2.4.0",
"leroy-merlin-br/mongolid-laravel": "^2.3.0",
"leroy-merlin-br/mongolid": "v4.0.0-beta",
"leroy-merlin-br/mongolid-laravel": "v3.0.0-beta",
"mongodb/mongodb": "1.8.0",
"nyholm/psr7": "^1.3",
"phpseclib/phpseclib": "^2.0",
Expand Down
68 changes: 34 additions & 34 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions docs/upgrade/upgrade-10.x-11.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Upgrading To 11.0 From 10.x

### Minimum PHP Version

PHP 7.3 is now the minimum required version.

### Minimum Laravel Version

Laravel 8.0 is now the minimum required version.

### Old Static Personal Client Methods Removed

Mongolid package was upgraded to version 4.x and bring with some breaking changes.
We believe that this changes will impact the use of mongolid-passport package, so this upgrade is made to keep up with.
ezandonai marked this conversation as resolved.
Show resolved Hide resolved
25 changes: 25 additions & 0 deletions docs/upgrade/upgrade-7.x-8.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## Upgrading To 8.0 From 7.x

### Minimum & Upgraded Versions

Commit: https://github.com/laravel/passport/commit/97e3026790d953d7a67fe487e30775cd995e93df

The minimum Laravel version is now v6.0 and the minimum PHP version is now 7.2. The underlying `league/oauth2-server` has also been updated to v8.

### Public Clients

PR: https://github.com/laravel/passport/pull/1065

Passport now supports public clients and PCKE. To leverage this feature, you should update the the `secret` column of the `oauth_clients` table to be `nullable`:

### Renderable Exceptions For OAuth Errors

PR: https://github.com/laravel/passport/pull/1066

OAuth exceptions can now be rendered. They will first be converted to Passport exceptions. If you are explicitly handling `League\OAuth2\Server\Exception\OAuthServerException` in your exception handler's report method you will now need to check for an instance of `Laravel\Passport\Exceptions\OAuthServerException` instead.

### Fixed Credential Checking

PR: https://github.com/laravel/passport/pull/1040

In the previous versions of Passport, you could pass tokens granted by a different client type to the `CheckClientCredential` and `CheckClientCredentialForAnyScope` middleware. This behavior has been corrected and an exception will be thrown if you attempt to pass a token generated by a different client type.
47 changes: 0 additions & 47 deletions UPGRADE.md → docs/upgrade/upgrade-8.x-9.0.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
# Upgrade Guide

## General Notes

## Upgrading To 10.0 From 9.x

### Minimum PHP Version

PHP 7.3 is now the minimum required version.

### Minimum Laravel Version

Laravel 8.0 is now the minimum required version.

### Old Static Personal Client Methods Removed

PR: https://github.com/laravel/passport/pull/1325

The personal client configuration methods have been removed from the `Passport` class since they are no longer necessary. You should remove calls to these methods from your `AuthServiceProvider`.

## Upgrading To 9.0 From 8.x

### Support For Multiple Guards
Expand Down Expand Up @@ -73,30 +53,3 @@ Internally, Passport will now use the `getAuthIdentifier` method to determine a
PR: https://github.com/laravel/passport/pull/1235

The deprecated `revokeOtherTokens` and `pruneRevokedTokens` methods and the `revokeOtherTokens` and `pruneRevokedTokens` properties were removed from the `Passport` object.


## Upgrading To 8.0 From 7.x

### Minimum & Upgraded Versions

Commit: https://github.com/laravel/passport/commit/97e3026790d953d7a67fe487e30775cd995e93df

The minimum Laravel version is now v6.0 and the minimum PHP version is now 7.2. The underlying `league/oauth2-server` has also been updated to v8.

### Public Clients

PR: https://github.com/laravel/passport/pull/1065

Passport now supports public clients and PCKE. To leverage this feature, you should update the the `secret` column of the `oauth_clients` table to be `nullable`:

### Renderable Exceptions For OAuth Errors

PR: https://github.com/laravel/passport/pull/1066

OAuth exceptions can now be rendered. They will first be converted to Passport exceptions. If you are explicitly handling `League\OAuth2\Server\Exception\OAuthServerException` in your exception handler's report method you will now need to check for an instance of `Laravel\Passport\Exceptions\OAuthServerException` instead.

### Fixed Credential Checking

PR: https://github.com/laravel/passport/pull/1040

In the previous versions of Passport, you could pass tokens granted by a different client type to the `CheckClientCredential` and `CheckClientCredentialForAnyScope` middleware. This behavior has been corrected and an exception will be thrown if you attempt to pass a token generated by a different client type.
15 changes: 15 additions & 0 deletions docs/upgrade/upgrade-9.x-10.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Upgrading To 10.0 From 9.x

### Minimum PHP Version

PHP 7.3 is now the minimum required version.

### Minimum Laravel Version

Laravel 8.0 is now the minimum required version.

### Old Static Personal Client Methods Removed

PR: https://github.com/laravel/passport/pull/1325

The personal client configuration methods have been removed from the `Passport` class since they are no longer necessary. You should remove calls to these methods from your `AuthServiceProvider`.
11 changes: 11 additions & 0 deletions docs/upgrade/upgrade-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Upgrade Guide

## General Notes

### How do it
| Old Version | New Version | |
|-------------|-------------|--------------------------------|
| 10.x | 11.0 | [guide](upgrade-10.x-11.0.md) |
| 9.x | 10.0 | [guide](upgrade-9.x-10.0.md) |
| 8.x | 9.0 | [guide](upgrade-8.x-9.0.md) |
| 7.x | 8.0 | [guide](upgrade-7.x-8.0.md) |