Skip to content

Commit

Permalink
Merge pull request #20 from leroy-merlin-br/chore/upgrade-mongolid-v4
Browse files Browse the repository at this point in the history
chore(mongolid-v4): upgrade to mongolid v4 beta
  • Loading branch information
diegofelix authored Feb 18, 2022
2 parents 2e7cea2 + 299da21 commit 62c46ce
Show file tree
Hide file tree
Showing 8 changed files with 113 additions and 83 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ 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 | laravel-passport | mongolid-laravel | mongolid |
|-------------------|------------------|------------------|------------|
| 11.0.0-beta | 10.1.1 | 3.0.0-beta | 4.0.0-beta |
| 10.x | 10.x | 2.3.x | 2.4.x |
| 9.x | 9.x | 2.2.x | 2.3.x |
| 8.x | 8.x | 2.2.x | 2.2.x |
| 7.x | 7.x | 2.2.x | 2.2.x |

[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.

### Why this new version

Mongolid package was upgraded to version 4.x and bring with some breaking changes.
We believe that this changes will not impact the use of mongolid-passport package, but, using this package along with mongolid will may bring the breaking changes to your project, for this reason we are bumpimp up the version.
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) |

0 comments on commit 62c46ce

Please sign in to comment.