From cab159813ac18c7950467fe358b82e181d423379 Mon Sep 17 00:00:00 2001 From: ezandonai Date: Fri, 18 Feb 2022 10:03:21 -0300 Subject: [PATCH 1/6] chore(mongolid-v4): upgrade to mongolid v4 beta --- composer.json | 4 +-- composer.lock | 68 +++++++++++++++++++++++++-------------------------- 2 files changed, 36 insertions(+), 36 deletions(-) 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", From 8501ec801dbc4a81dfb4b3fd13b10467acddb383 Mon Sep 17 00:00:00 2001 From: ezandonai Date: Fri, 18 Feb 2022 10:42:25 -0300 Subject: [PATCH 2/6] docs(versions): write versions compatibily and guides to upgrade --- README.md | 8 ++++ docs/upgrade/upgrade-10.x-11.0.md | 14 ++++++ docs/upgrade/upgrade-7.x-8.0.md | 25 ++++++++++ UPGRADE.md => docs/upgrade/upgrade-8.x-9.0.md | 47 ------------------- docs/upgrade/upgrade-9.x-10.0.md | 15 ++++++ docs/upgrade/upgrade-guide.md | 11 +++++ 6 files changed, 73 insertions(+), 47 deletions(-) create mode 100644 docs/upgrade/upgrade-10.x-11.0.md create mode 100644 docs/upgrade/upgrade-7.x-8.0.md rename UPGRADE.md => docs/upgrade/upgrade-8.x-9.0.md (61%) create mode 100644 docs/upgrade/upgrade-9.x-10.0.md create mode 100644 docs/upgrade/upgrade-guide.md diff --git a/README.md b/README.md index e055a9e..3e743f1 100644 --- a/README.md +++ b/README.md @@ -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 | + +[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/docs/upgrade/upgrade-10.x-11.0.md b/docs/upgrade/upgrade-10.x-11.0.md new file mode 100644 index 0000000..b534a73 --- /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. + +### 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. 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) | From 57fd39075205540e8a036e71f1077913aa27acc1 Mon Sep 17 00:00:00 2001 From: ezandonai Date: Fri, 18 Feb 2022 10:42:25 -0300 Subject: [PATCH 3/6] docs(versions): write versions compatibily and guides to upgrade --- docs/upgrade/upgrade-10.x-11.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/upgrade/upgrade-10.x-11.0.md b/docs/upgrade/upgrade-10.x-11.0.md index b534a73..cd0f73d 100644 --- a/docs/upgrade/upgrade-10.x-11.0.md +++ b/docs/upgrade/upgrade-10.x-11.0.md @@ -8,7 +8,7 @@ PHP 7.3 is now the minimum required version. Laravel 8.0 is now the minimum required version. -### Old Static Personal Client Methods Removed +### Why this new version 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. From cfa8c6bf801c7f4aa43e6865e0f249c55c83fe8d Mon Sep 17 00:00:00 2001 From: ezandonai Date: Fri, 18 Feb 2022 11:15:44 -0300 Subject: [PATCH 4/6] Update docs/upgrade/upgrade-10.x-11.0.md Co-authored-by: Diego Felix --- docs/upgrade/upgrade-10.x-11.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/upgrade/upgrade-10.x-11.0.md b/docs/upgrade/upgrade-10.x-11.0.md index cd0f73d..8a16350 100644 --- a/docs/upgrade/upgrade-10.x-11.0.md +++ b/docs/upgrade/upgrade-10.x-11.0.md @@ -11,4 +11,4 @@ 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 impact the use of mongolid-passport package, so this upgrade is made to keep up with. +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. From 38d5bcc71533aeb9b9e440a61c84c64fb11dba1d Mon Sep 17 00:00:00 2001 From: ezandonai Date: Fri, 18 Feb 2022 11:24:41 -0300 Subject: [PATCH 5/6] docs(versions): add laravel-passport compatibility --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3e743f1..9f254af 100644 --- a/README.md +++ b/README.md @@ -16,9 +16,10 @@ Documentation for Passport can be found on the [Laravel website](https://laravel ## Compatibility -| mongolid-passport | mongolid-laravel | mongolid | -|-------------------|------------------|------------| -| 11.0.0-beta | 3.0.0-beta | 4.0.0-beta | +| mongolid-passport | laravel-passport | mongolid-laravel | mongolid | +|-------------------|------------------|------------------|------------| +| 11.0.0-beta | 10.1.1 | 3.0.0-beta | 4.0.0-beta | +| 10.1.1 | 10.1.1 | 2.3.x | 2.4.x | [Here](docs/upgrade/upgrade-guide.md) you find guides to upgrade versions. From 299da21ffeb700d770b3188a5d3adcf79fe70c3c Mon Sep 17 00:00:00 2001 From: ezandonai Date: Fri, 18 Feb 2022 11:43:12 -0300 Subject: [PATCH 6/6] docs(versions): update versions compatibility --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9f254af..dde38c3 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,10 @@ Documentation for Passport can be found on the [Laravel website](https://laravel | mongolid-passport | laravel-passport | mongolid-laravel | mongolid | |-------------------|------------------|------------------|------------| | 11.0.0-beta | 10.1.1 | 3.0.0-beta | 4.0.0-beta | -| 10.1.1 | 10.1.1 | 2.3.x | 2.4.x | +| 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.