diff --git a/README.md b/README.md index e055a9e..dde38c3 100644 --- a/README.md +++ b/README.md @@ -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), diff --git a/composer.json b/composer.json index 260b6c0..a73ab2e 100644 --- a/composer.json +++ b/composer.json @@ -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", diff --git a/composer.lock b/composer.lock index 40871b3..ea54c37 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "1ce229ab06638216a042c65690eb1ade", + "content-hash": "a860adfa586407d1df2fc15ae9f0de23", "packages": [ { "name": "brick/math", @@ -1370,42 +1370,43 @@ }, { "name": "leroy-merlin-br/mongolid", - "version": "v2.4.0", + "version": "v4.0.0-beta", "source": { "type": "git", - "url": "https://github.com/leroy-merlin-br/mongolid.git", - "reference": "50c637d3cd20a6092c8b04f3fef120c4369e5b2f" + "url": "git@github.com:leroy-merlin-br/mongolid.git", + "reference": "40a59e12ba64ed8f20ab377b323d79ea9ea8067b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/leroy-merlin-br/mongolid/zipball/50c637d3cd20a6092c8b04f3fef120c4369e5b2f", - "reference": "50c637d3cd20a6092c8b04f3fef120c4369e5b2f", + "url": "https://api.github.com/repos/leroy-merlin-br/mongolid/zipball/40a59e12ba64ed8f20ab377b323d79ea9ea8067b", + "reference": "40a59e12ba64ed8f20ab377b323d79ea9ea8067b", "shasum": "" }, "require": { - "illuminate/container": "^5.8 || ^6.0 || ^7.0 || ^8.0", + "ext-mongodb": "*", + "illuminate/container": "^5.4 || ^6.0 || ^7.0 || ^8.0", + "illuminate/support": "^5.4 || ^6.0 || ^7.0 || ^8.0", "mongodb/mongodb": "1.8.0", - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.4", - "sami/sami": "^4.0", - "squizlabs/php_codesniffer": "^2.0" + "leroy-merlin-br/coding-standard": "^1.0", + "mockery/mockery": "^1.2", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + }, + "suggest": { + "leroy-merlin-br/mongolid-laravel": "Easy, powerful and ultrafast MongoDB ODM for Laravel." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "v2.1.x-dev" + "dev-master": "v4.0.x-dev" } }, "autoload": { "psr-4": { - "Mongolid\\": "src/Mongolid" - }, - "classmap": [ - "tests/TestCase.php" - ] + "Mongolid\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1419,39 +1420,42 @@ { "name": "Guilherme Guitte", "email": "guilherme.guitte@gmail.com" + }, + { + "name": "Boitatá", + "email": "boitata@leroymerlin.com.br" } ], "description": "Easy, powerful and ultrafast ODM for PHP and MongoDB.", "keywords": [ + "Active Record", + "laravel", + "mongo", "mongodb", "nosql", "odm" ], - "support": { - "issues": "https://github.com/leroy-merlin-br/mongolid/issues", - "source": "https://github.com/leroy-merlin-br/mongolid/tree/v2.4.0" - }, - "time": "2022-02-15T14:31:50+00:00" + "time": "2022-02-18T12:17:10+00:00" }, { "name": "leroy-merlin-br/mongolid-laravel", - "version": "v2.3.0", + "version": "v3.0.0-beta", "source": { "type": "git", - "url": "https://github.com/leroy-merlin-br/mongolid-laravel.git", - "reference": "c3a88d3b1922deb790832266248860ea31cdfd9e" + "url": "git@github.com:leroy-merlin-br/mongolid-laravel.git", + "reference": "5911b72094ab1e1f0c9c274602cfb31e252cc61b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/leroy-merlin-br/mongolid-laravel/zipball/c3a88d3b1922deb790832266248860ea31cdfd9e", - "reference": "c3a88d3b1922deb790832266248860ea31cdfd9e", + "url": "https://api.github.com/repos/leroy-merlin-br/mongolid-laravel/zipball/5911b72094ab1e1f0c9c274602cfb31e252cc61b", + "reference": "5911b72094ab1e1f0c9c274602cfb31e252cc61b", "shasum": "" }, "require": { "illuminate/auth": "^5.4 || ^6.0 || ^7.0 || ^8.0", "illuminate/queue": "^5.4 || ^6.0 || ^7.0 || ^8.0", "illuminate/support": "^5.4 || ^6.0 || ^7.0 || ^8.0", - "leroy-merlin-br/mongolid": "^2.0", + "leroy-merlin-br/mongolid": "v4.0.0-beta", "php": ">=7.1" }, "require-dev": { @@ -1502,11 +1506,7 @@ "nosql", "odm" ], - "support": { - "issues": "https://github.com/leroy-merlin-br/mongolid-laravel/issues", - "source": "https://github.com/leroy-merlin-br/mongolid-laravel/tree/v2.3.0" - }, - "time": "2022-02-15T17:02:36+00:00" + "time": "2022-02-18T12:43:57+00:00" }, { "name": "mongodb/mongodb", diff --git a/docs/upgrade/upgrade-10.x-11.0.md b/docs/upgrade/upgrade-10.x-11.0.md new file mode 100644 index 0000000..8a16350 --- /dev/null +++ b/docs/upgrade/upgrade-10.x-11.0.md @@ -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. diff --git a/docs/upgrade/upgrade-7.x-8.0.md b/docs/upgrade/upgrade-7.x-8.0.md new file mode 100644 index 0000000..e7eafb6 --- /dev/null +++ b/docs/upgrade/upgrade-7.x-8.0.md @@ -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. diff --git a/UPGRADE.md b/docs/upgrade/upgrade-8.x-9.0.md similarity index 61% rename from UPGRADE.md rename to docs/upgrade/upgrade-8.x-9.0.md index 5a778a1..5509297 100644 --- a/UPGRADE.md +++ b/docs/upgrade/upgrade-8.x-9.0.md @@ -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 @@ -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. diff --git a/docs/upgrade/upgrade-9.x-10.0.md b/docs/upgrade/upgrade-9.x-10.0.md new file mode 100644 index 0000000..a5aa99e --- /dev/null +++ b/docs/upgrade/upgrade-9.x-10.0.md @@ -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`. diff --git a/docs/upgrade/upgrade-guide.md b/docs/upgrade/upgrade-guide.md new file mode 100644 index 0000000..a171659 --- /dev/null +++ b/docs/upgrade/upgrade-guide.md @@ -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) |