From 985577cec359d57df15ac641bfaed84fdc222824 Mon Sep 17 00:00:00 2001 From: Alexander Karlstad Date: Thu, 14 Jan 2021 15:11:49 +0100 Subject: [PATCH 01/55] [10.x] Add purging of invalid refresh tokens to command (#1396) * Delete invalid refresh tokens Delete refresh tokens referring to non-existing access tokens. * Use whereDoesntHave() instead * Add test for purge command * Update description and output of command * Update PurgeCommand.php Co-authored-by: Taylor Otwell --- src/Console/PurgeCommand.php | 11 ++++--- tests/Feature/Console/PurgeCommand.php | 45 ++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 tests/Feature/Console/PurgeCommand.php diff --git a/src/Console/PurgeCommand.php b/src/Console/PurgeCommand.php index 7854c6a..7b97783 100644 --- a/src/Console/PurgeCommand.php +++ b/src/Console/PurgeCommand.php @@ -22,7 +22,7 @@ class PurgeCommand extends Command * * @var string */ - protected $description = 'Purge revoked and / or expired tokens and authentication codes'; + protected $description = 'Purge revoked and / or expired tokens, authentication codes, and refresh tokens.'; /** * Execute the console command. @@ -36,20 +36,23 @@ public function handle() Passport::token()->where('revoked', 1)->orWhereDate('expires_at', '<', $expired)->delete(); Passport::authCode()->where('revoked', 1)->orWhereDate('expires_at', '<', $expired)->delete(); Passport::refreshToken()->where('revoked', 1)->orWhereDate('expires_at', '<', $expired)->delete(); + Passport::refreshToken()->whereDoesntHave('accessToken')->delete(); - $this->info('Purged revoked items and items expired for more than seven days.'); + $this->info('Purged invalid refresh tokens, revoked tokens, and tokens expired for more than seven days.'); } elseif ($this->option('revoked')) { Passport::token()->where('revoked', 1)->delete(); Passport::authCode()->where('revoked', 1)->delete(); Passport::refreshToken()->where('revoked', 1)->delete(); + Passport::refreshToken()->whereDoesntHave('accessToken')->delete(); - $this->info('Purged revoked items.'); + $this->info('Purged invalid refresh tokens and revoked tokens.'); } elseif ($this->option('expired')) { Passport::token()->whereDate('expires_at', '<', $expired)->delete(); Passport::authCode()->whereDate('expires_at', '<', $expired)->delete(); Passport::refreshToken()->whereDate('expires_at', '<', $expired)->delete(); + Passport::refreshToken()->whereDoesntHave('accessToken')->delete(); - $this->info('Purged items expired for more than seven days.'); + $this->info('Purged invalid refresh tokens and tokens expired for more than seven days.'); } } } diff --git a/tests/Feature/Console/PurgeCommand.php b/tests/Feature/Console/PurgeCommand.php new file mode 100644 index 0000000..baed342 --- /dev/null +++ b/tests/Feature/Console/PurgeCommand.php @@ -0,0 +1,45 @@ +subDays(8); + $notExpired = now(); + + $accessTokenExpired = Token::create(['id' => 'a', 'user_id' => 1, 'client_id' => 1, 'revoked' => 0, 'expires_at' => $expired]); + $accessTokenRevoked = Token::create(['id' => 'b', 'user_id' => 1, 'client_id' => 1, 'revoked' => 1, 'expires_at' => $notExpired]); + $accessTokenOk = Token::create(['id' => 'c', 'user_id' => 1, 'client_id' => 1, 'revoked' => 0, 'expires_at' => $notExpired]); + + $authCodeExpired = AuthCode::create(['id' => 'a', 'user_id' => 1, 'client_id' => 1, 'revoked' => 0, 'expires_at' => $expired]); + $authCodeRevoked = AuthCode::create(['id' => 'b', 'user_id' => 1, 'client_id' => 1, 'revoked' => 1, 'expires_at' => $notExpired]); + $authCodeOk = AuthCode::create(['id' => 'c', 'user_id' => 1, 'client_id' => 1, 'revoked' => 0, 'expires_at' => $notExpired]); + + $refreshTokenExpired = RefreshToken::create(['id' => 'a', 'access_token_id' => $accessTokenExpired->id, 'revoked' => 0, 'expires_at' => $expired]); + $refreshTokenRevoked = RefreshToken::create(['id' => 'b', 'access_token_id' => $accessTokenRevoked->id, 'revoked' => 1, 'expires_at' => $notExpired]); + $refreshTokenInvalidAccessToken = RefreshToken::create(['id' => 'c', 'access_token_id' => 'xyz', 'revoked' => 0, 'expires_at' => $notExpired]); + $refreshTokenOk = RefreshToken::create(['id' => 'd', 'access_token_id' => $accessTokenOk->id, 'revoked' => 0, 'expires_at' => $notExpired]); + + $this->artisan('passport:purge'); + + $this->assertFalse(Token::whereKey($accessTokenExpired->id)->exists()); + $this->assertFalse(Token::whereKey($accessTokenRevoked->id)->exists()); + $this->assertTrue(Token::whereKey($accessTokenOk->id)->exists()); + + $this->assertFalse(AuthCode::whereKey($authCodeExpired->id)->exists()); + $this->assertFalse(AuthCode::whereKey($authCodeRevoked->id)->exists()); + $this->assertTrue(AuthCode::whereKey($authCodeOk->id)->exists()); + + $this->assertFalse(RefreshToken::whereKey($refreshTokenExpired->id)->exists()); + $this->assertFalse(RefreshToken::whereKey($refreshTokenRevoked->id)->exists()); + $this->assertFalse(RefreshToken::whereKey($refreshTokenInvalidAccessToken->id)->exists()); + $this->assertTrue(RefreshToken::whereKey($refreshTokenOk->id)->exists()); + } +} From 8b792b4f614bd1b955d24a3ceec3521dba727e35 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Thu, 14 Jan 2021 17:28:55 +0100 Subject: [PATCH 02/55] Revert "[10.x] Add purging of invalid refresh tokens to command (#1396)" (#1397) This reverts commit 985577cec359d57df15ac641bfaed84fdc222824. --- src/Console/PurgeCommand.php | 11 +++---- tests/Feature/Console/PurgeCommand.php | 45 -------------------------- 2 files changed, 4 insertions(+), 52 deletions(-) delete mode 100644 tests/Feature/Console/PurgeCommand.php diff --git a/src/Console/PurgeCommand.php b/src/Console/PurgeCommand.php index 7b97783..7854c6a 100644 --- a/src/Console/PurgeCommand.php +++ b/src/Console/PurgeCommand.php @@ -22,7 +22,7 @@ class PurgeCommand extends Command * * @var string */ - protected $description = 'Purge revoked and / or expired tokens, authentication codes, and refresh tokens.'; + protected $description = 'Purge revoked and / or expired tokens and authentication codes'; /** * Execute the console command. @@ -36,23 +36,20 @@ public function handle() Passport::token()->where('revoked', 1)->orWhereDate('expires_at', '<', $expired)->delete(); Passport::authCode()->where('revoked', 1)->orWhereDate('expires_at', '<', $expired)->delete(); Passport::refreshToken()->where('revoked', 1)->orWhereDate('expires_at', '<', $expired)->delete(); - Passport::refreshToken()->whereDoesntHave('accessToken')->delete(); - $this->info('Purged invalid refresh tokens, revoked tokens, and tokens expired for more than seven days.'); + $this->info('Purged revoked items and items expired for more than seven days.'); } elseif ($this->option('revoked')) { Passport::token()->where('revoked', 1)->delete(); Passport::authCode()->where('revoked', 1)->delete(); Passport::refreshToken()->where('revoked', 1)->delete(); - Passport::refreshToken()->whereDoesntHave('accessToken')->delete(); - $this->info('Purged invalid refresh tokens and revoked tokens.'); + $this->info('Purged revoked items.'); } elseif ($this->option('expired')) { Passport::token()->whereDate('expires_at', '<', $expired)->delete(); Passport::authCode()->whereDate('expires_at', '<', $expired)->delete(); Passport::refreshToken()->whereDate('expires_at', '<', $expired)->delete(); - Passport::refreshToken()->whereDoesntHave('accessToken')->delete(); - $this->info('Purged invalid refresh tokens and tokens expired for more than seven days.'); + $this->info('Purged items expired for more than seven days.'); } } } diff --git a/tests/Feature/Console/PurgeCommand.php b/tests/Feature/Console/PurgeCommand.php deleted file mode 100644 index baed342..0000000 --- a/tests/Feature/Console/PurgeCommand.php +++ /dev/null @@ -1,45 +0,0 @@ -subDays(8); - $notExpired = now(); - - $accessTokenExpired = Token::create(['id' => 'a', 'user_id' => 1, 'client_id' => 1, 'revoked' => 0, 'expires_at' => $expired]); - $accessTokenRevoked = Token::create(['id' => 'b', 'user_id' => 1, 'client_id' => 1, 'revoked' => 1, 'expires_at' => $notExpired]); - $accessTokenOk = Token::create(['id' => 'c', 'user_id' => 1, 'client_id' => 1, 'revoked' => 0, 'expires_at' => $notExpired]); - - $authCodeExpired = AuthCode::create(['id' => 'a', 'user_id' => 1, 'client_id' => 1, 'revoked' => 0, 'expires_at' => $expired]); - $authCodeRevoked = AuthCode::create(['id' => 'b', 'user_id' => 1, 'client_id' => 1, 'revoked' => 1, 'expires_at' => $notExpired]); - $authCodeOk = AuthCode::create(['id' => 'c', 'user_id' => 1, 'client_id' => 1, 'revoked' => 0, 'expires_at' => $notExpired]); - - $refreshTokenExpired = RefreshToken::create(['id' => 'a', 'access_token_id' => $accessTokenExpired->id, 'revoked' => 0, 'expires_at' => $expired]); - $refreshTokenRevoked = RefreshToken::create(['id' => 'b', 'access_token_id' => $accessTokenRevoked->id, 'revoked' => 1, 'expires_at' => $notExpired]); - $refreshTokenInvalidAccessToken = RefreshToken::create(['id' => 'c', 'access_token_id' => 'xyz', 'revoked' => 0, 'expires_at' => $notExpired]); - $refreshTokenOk = RefreshToken::create(['id' => 'd', 'access_token_id' => $accessTokenOk->id, 'revoked' => 0, 'expires_at' => $notExpired]); - - $this->artisan('passport:purge'); - - $this->assertFalse(Token::whereKey($accessTokenExpired->id)->exists()); - $this->assertFalse(Token::whereKey($accessTokenRevoked->id)->exists()); - $this->assertTrue(Token::whereKey($accessTokenOk->id)->exists()); - - $this->assertFalse(AuthCode::whereKey($authCodeExpired->id)->exists()); - $this->assertFalse(AuthCode::whereKey($authCodeRevoked->id)->exists()); - $this->assertTrue(AuthCode::whereKey($authCodeOk->id)->exists()); - - $this->assertFalse(RefreshToken::whereKey($refreshTokenExpired->id)->exists()); - $this->assertFalse(RefreshToken::whereKey($refreshTokenRevoked->id)->exists()); - $this->assertFalse(RefreshToken::whereKey($refreshTokenInvalidAccessToken->id)->exists()); - $this->assertTrue(RefreshToken::whereKey($refreshTokenOk->id)->exists()); - } -} From b28cd974cbdca374c15a8ba6cd3533c2719e2447 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Thu, 18 Feb 2021 16:06:38 +0100 Subject: [PATCH 03/55] Update to phpseclib v3 (#1410) --- composer.json | 2 +- src/Console/KeysCommand.php | 12 +++++------- tests/Unit/KeysCommandTest.php | 9 +++------ 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/composer.json b/composer.json index 319a8c4..4eb1089 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ "league/oauth2-server": "^8.2", "lcobucci/jwt": "^3.4|^4.0", "nyholm/psr7": "^1.3", - "phpseclib/phpseclib": "^2.0", + "phpseclib/phpseclib": "^3.0", "symfony/psr-http-message-bridge": "^2.0" }, "require-dev": { diff --git a/src/Console/KeysCommand.php b/src/Console/KeysCommand.php index ac0a5f1..b0851ac 100644 --- a/src/Console/KeysCommand.php +++ b/src/Console/KeysCommand.php @@ -3,9 +3,8 @@ namespace Laravel\Passport\Console; use Illuminate\Console\Command; -use Illuminate\Support\Arr; use Laravel\Passport\Passport; -use phpseclib\Crypt\RSA; +use phpseclib3\Crypt\RSA; class KeysCommand extends Command { @@ -28,10 +27,9 @@ class KeysCommand extends Command /** * Execute the console command. * - * @param \phpseclib\Crypt\RSA $rsa * @return void */ - public function handle(RSA $rsa) + public function handle() { [$publicKey, $privateKey] = [ Passport::keyPath('oauth-public.key'), @@ -41,10 +39,10 @@ public function handle(RSA $rsa) if ((file_exists($publicKey) || file_exists($privateKey)) && ! $this->option('force')) { $this->error('Encryption keys already exist. Use the --force option to overwrite them.'); } else { - $keys = $rsa->createKey($this->input ? (int) $this->option('length') : 4096); + $key = RSA::createKey($this->input ? (int) $this->option('length') : 4096); - file_put_contents($publicKey, Arr::get($keys, 'publickey')); - file_put_contents($privateKey, Arr::get($keys, 'privatekey')); + file_put_contents($publicKey, (string) $key->getPublicKey()); + file_put_contents($privateKey, (string) $key); $this->info('Encryption keys generated successfully.'); } diff --git a/tests/Unit/KeysCommandTest.php b/tests/Unit/KeysCommandTest.php index e85f64a..991d215 100644 --- a/tests/Unit/KeysCommandTest.php +++ b/tests/Unit/KeysCommandTest.php @@ -6,7 +6,6 @@ use Laravel\Passport\Console\KeysCommand; use Laravel\Passport\Passport; use Mockery as m; -use phpseclib\Crypt\RSA; use PHPUnit\Framework\TestCase; class KeysCommandTest extends TestCase @@ -41,9 +40,7 @@ public function testPrivateAndPublicKeysAreGenerated() Container::getInstance()->instance('path.storage', self::KEYS); - $rsa = new RSA(); - - $command->handle($rsa); + $command->handle(); $this->assertFileExists(self::PUBLIC_KEY); $this->assertFileExists(self::PRIVATE_KEY); @@ -59,7 +56,7 @@ public function testPrivateAndPublicKeysAreGeneratedInCustomPath() ->with('Encryption keys generated successfully.') ->getMock(); - $command->handle(new RSA); + $command->handle(); $this->assertFileExists(self::PUBLIC_KEY); $this->assertFileExists(self::PRIVATE_KEY); @@ -79,6 +76,6 @@ public function testPrivateAndPublicKeysShouldNotBeGeneratedTwice($command) $command->shouldReceive('error') ->with('Encryption keys already exist. Use the --force option to overwrite them.'); - $command->handle(new RSA); + $command->handle(); } } From 2ed01909228b049f6ea0aa2d4b0ae78d3b27bee3 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Tue, 23 Feb 2021 21:45:29 +0100 Subject: [PATCH 04/55] Update CHANGELOG.md --- CHANGELOG.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 285660a..681503a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Release Notes -## [Unreleased](https://github.com/laravel/passport/compare/v10.1.0...10.x) +## [Unreleased](https://github.com/laravel/passport/compare/v10.1.1...10.x) + + +## [v10.1.1 (2021-02-23)](https://github.com/laravel/passport/compare/v10.1.0...v10.1.1) + +### Changed +- Update to phpseclib v3 ([#1410](https://github.com/laravel/passport/pull/1410)) ## [v10.1.0 (2020-11-26)](https://github.com/laravel/passport/compare/v10.0.1...v10.1.0) From d429a9823dc6ba00b607efa3b73c76e17f547e57 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Mon, 1 Mar 2021 14:37:32 +0100 Subject: [PATCH 05/55] [10.x] Backport phpseclib v2 (#1418) * Backport support for phpseclib v2 * Apply fixes from StyleCI (#1417) --- composer.json | 4 ++-- src/Console/KeysCommand.php | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 4eb1089..0726c28 100644 --- a/composer.json +++ b/composer.json @@ -26,10 +26,10 @@ "illuminate/encryption": "^8.2", "illuminate/http": "^8.2", "illuminate/support": "^8.2", - "league/oauth2-server": "^8.2", "lcobucci/jwt": "^3.4|^4.0", + "league/oauth2-server": "^8.2", "nyholm/psr7": "^1.3", - "phpseclib/phpseclib": "^3.0", + "phpseclib/phpseclib": "^2.0|^3.0", "symfony/psr-http-message-bridge": "^2.0" }, "require-dev": { diff --git a/src/Console/KeysCommand.php b/src/Console/KeysCommand.php index b0851ac..36ff6e6 100644 --- a/src/Console/KeysCommand.php +++ b/src/Console/KeysCommand.php @@ -3,7 +3,9 @@ namespace Laravel\Passport\Console; use Illuminate\Console\Command; +use Illuminate\Support\Arr; use Laravel\Passport\Passport; +use phpseclib\Crypt\RSA as LegacyRSA; use phpseclib3\Crypt\RSA; class KeysCommand extends Command @@ -39,10 +41,17 @@ public function handle() if ((file_exists($publicKey) || file_exists($privateKey)) && ! $this->option('force')) { $this->error('Encryption keys already exist. Use the --force option to overwrite them.'); } else { - $key = RSA::createKey($this->input ? (int) $this->option('length') : 4096); + if (class_exists(LegacyRSA::class)) { + $keys = (new LegacyRSA)->createKey($this->input ? (int) $this->option('length') : 4096); - file_put_contents($publicKey, (string) $key->getPublicKey()); - file_put_contents($privateKey, (string) $key); + file_put_contents($publicKey, Arr::get($keys, 'publickey')); + file_put_contents($privateKey, Arr::get($keys, 'privatekey')); + } else { + $key = RSA::createKey($this->input ? (int) $this->option('length') : 4096); + + file_put_contents($publicKey, (string) $key->getPublicKey()); + file_put_contents($privateKey, (string) $key); + } $this->info('Encryption keys generated successfully.'); } From 9f1a5d56eb609250104afc38cf407f7c2520cda3 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Tue, 2 Mar 2021 17:40:00 +0100 Subject: [PATCH 06/55] Update CHANGELOG.md --- CHANGELOG.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 681503a..a79e534 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Release Notes -## [Unreleased](https://github.com/laravel/passport/compare/v10.1.1...10.x) +## [Unreleased](https://github.com/laravel/passport/compare/v10.1.2...10.x) + + +## [v10.1.2 (2021-03-02)](https://github.com/laravel/passport/compare/v10.1.1...v10.1.2) + +### Fixed +- Backport phpseclib v2 ([#1418](https://github.com/laravel/passport/pull/1418)) ## [v10.1.1 (2021-02-23)](https://github.com/laravel/passport/compare/v10.1.0...v10.1.1) From c7c798f872a29cebcf9979e8d7c4e53e8d4eb77d Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Fri, 5 Mar 2021 22:01:37 +0100 Subject: [PATCH 07/55] Use ubuntu-18.04 --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ad2acae..6f8cfb4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,15 +8,15 @@ on: jobs: tests: + runs-on: ubuntu-18.04 - runs-on: ubuntu-latest strategy: fail-fast: true matrix: php: [7.3, 7.4, 8.0] laravel: [^8.0] - name: P${{ matrix.php }} - L${{ matrix.laravel }} + name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} steps: - name: Checkout code From 2138d5941cb7aaae0d745925e7807faf9c1479cc Mon Sep 17 00:00:00 2001 From: baijunyao Date: Mon, 8 Mar 2021 04:26:25 +0800 Subject: [PATCH 08/55] Fix `$userId` type (#1422) --- src/Events/AccessTokenCreated.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Events/AccessTokenCreated.php b/src/Events/AccessTokenCreated.php index 6922c76..bcaf0d6 100644 --- a/src/Events/AccessTokenCreated.php +++ b/src/Events/AccessTokenCreated.php @@ -29,7 +29,7 @@ class AccessTokenCreated * Create a new event instance. * * @param string $tokenId - * @param string $userId + * @param string|int|null $userId * @param string $clientId * @return void */ From ab9e2045e0d8649cd84de411d0332bdd5fe763a3 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Thu, 11 Mar 2021 17:44:50 +0100 Subject: [PATCH 09/55] Update tests.yml --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6f8cfb4..0e5539a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,7 +8,7 @@ on: jobs: tests: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 strategy: fail-fast: true From e3478dedd938671b7598239cc8554f77de9ab9c7 Mon Sep 17 00:00:00 2001 From: Mohamed Said Date: Mon, 5 Apr 2021 16:45:08 +0200 Subject: [PATCH 10/55] fix binding --- src/PassportServiceProvider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PassportServiceProvider.php b/src/PassportServiceProvider.php index a8a0b78..1d6e7ec 100644 --- a/src/PassportServiceProvider.php +++ b/src/PassportServiceProvider.php @@ -249,9 +249,9 @@ protected function registerJWTParser() */ protected function registerResourceServer() { - $this->app->singleton(ResourceServer::class, function () { + $this->app->singleton(ResourceServer::class, function ($container) { return new ResourceServer( - $this->app->make(Bridge\AccessTokenRepository::class), + $container->make(Bridge\AccessTokenRepository::class), $this->makeCryptKey('public') ); }); From 3d1e6bbdedf71efb147f3b5205259e8b20c2e6ad Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 5 Apr 2021 13:44:12 -0500 Subject: [PATCH 11/55] use app helper --- src/PassportServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PassportServiceProvider.php b/src/PassportServiceProvider.php index 1d6e7ec..daeb044 100644 --- a/src/PassportServiceProvider.php +++ b/src/PassportServiceProvider.php @@ -284,7 +284,7 @@ protected function registerGuard() Auth::resolved(function ($auth) { $auth->extend('passport', function ($app, $name, array $config) { return tap($this->makeGuard($config), function ($guard) { - $this->app->refresh('request', $guard, 'setRequest'); + app()->refresh('request', $guard, 'setRequest'); }); }); }); From a5e4471dd99b7638ab5ca3ecab6cd87cf37eb410 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Tue, 6 Apr 2021 16:30:45 +0200 Subject: [PATCH 12/55] Update CHANGELOG.md --- CHANGELOG.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a79e534..cf2be11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,15 @@ # Release Notes -## [Unreleased](https://github.com/laravel/passport/compare/v10.1.2...10.x) +## [Unreleased](https://github.com/laravel/passport/compare/v10.1.3...10.x) + + +## [v10.1.3 (2021-04-06)](https://github.com/laravel/passport/compare/v10.1.2...v10.1.3) + +### Changed +- Use app helper ([3d1e6bb](https://github.com/laravel/passport/commit/3d1e6bbdedf71efb147f3b5205259e8b20c2e6ad)) + +### Fixed +- Fix binding ([e3478de](https://github.com/laravel/passport/commit/e3478dedd938671b7598239cc8554f77de9ab9c7)) ## [v10.1.2 (2021-03-02)](https://github.com/laravel/passport/compare/v10.1.1...v10.1.2) From cafb8e64a91f905ff5ab3f85836371216554f379 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Fri, 4 Jun 2021 17:33:04 +0200 Subject: [PATCH 13/55] Update 1_Bug_report.md --- .github/ISSUE_TEMPLATE/1_Bug_report.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/1_Bug_report.md b/.github/ISSUE_TEMPLATE/1_Bug_report.md index 5d665d7..2d7b68a 100644 --- a/.github/ISSUE_TEMPLATE/1_Bug_report.md +++ b/.github/ISSUE_TEMPLATE/1_Bug_report.md @@ -15,3 +15,6 @@ about: "Report something that's broken. Please ensure your Laravel version is st ### Steps To Reproduce: + + + From 519e1df2062e1524d1ed352ccc2227cac882f667 Mon Sep 17 00:00:00 2001 From: Andrew Millington Date: Fri, 4 Jun 2021 19:26:16 +0100 Subject: [PATCH 14/55] [10.x] Use Real Keys in Tests (#1450) * use real keys in tests * revert composer change * reset position of loadKeysFrom() function --- tests/Unit/PassportServiceProviderTest.php | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/Unit/PassportServiceProviderTest.php b/tests/Unit/PassportServiceProviderTest.php index a1e2482..9fc2374 100644 --- a/tests/Unit/PassportServiceProviderTest.php +++ b/tests/Unit/PassportServiceProviderTest.php @@ -13,10 +13,14 @@ class PassportServiceProviderTest extends TestCase { public function test_can_use_crypto_keys_from_config() { - $config = m::mock(Config::class, function ($config) { + $privateKey = openssl_pkey_new(); + + openssl_pkey_export($privateKey, $privateKeyString); + + $config = m::mock(Config::class, function ($config) use ($privateKeyString) { $config->shouldReceive('get') ->with('passport.private_key') - ->andReturn('-----BEGIN RSA PRIVATE KEY-----\nconfig\n-----END RSA PRIVATE KEY-----'); + ->andReturn($privateKeyString); }); $provider = new PassportServiceProvider( @@ -29,7 +33,7 @@ public function test_can_use_crypto_keys_from_config() })->call($provider); $this->assertSame( - "-----BEGIN RSA PRIVATE KEY-----\nconfig\n-----END RSA PRIVATE KEY-----", + $privateKeyString, file_get_contents($cryptKey->getKeyPath()) ); } @@ -38,10 +42,10 @@ public function test_can_use_crypto_keys_from_local_disk() { Passport::loadKeysFrom(__DIR__.'/../keys'); - file_put_contents( - __DIR__.'/../keys/oauth-private.key', - "-----BEGIN RSA PRIVATE KEY-----\ndisk\n-----END RSA PRIVATE KEY-----" - ); + $privateKey = openssl_pkey_new(); + + openssl_pkey_export_to_file($privateKey, __DIR__.'/../keys/oauth-private.key'); + openssl_pkey_export($privateKey, $privateKeyString); $config = m::mock(Config::class, function ($config) { $config->shouldReceive('get')->with('passport.private_key')->andReturn(null); @@ -57,7 +61,7 @@ public function test_can_use_crypto_keys_from_local_disk() })->call($provider); $this->assertSame( - "-----BEGIN RSA PRIVATE KEY-----\ndisk\n-----END RSA PRIVATE KEY-----", + $privateKeyString, file_get_contents($cryptKey->getKeyPath()) ); From 4b28beb7657652e7ee710148375a00bb49902acd Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sat, 12 Jun 2021 20:09:02 +0200 Subject: [PATCH 15/55] dark mode logo --- README.md | 2 +- art/logo.svg | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 art/logo.svg diff --git a/README.md b/README.md index 42a394d..dbc5062 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -

+

Logo Laravel Passport

Build Status diff --git a/art/logo.svg b/art/logo.svg new file mode 100644 index 0000000..ef46d18 --- /dev/null +++ b/art/logo.svg @@ -0,0 +1,9 @@ + + + + From 12678fbe8c6b661e61736630db55e98d13ccad77 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Sun, 13 Jun 2021 11:40:01 +0200 Subject: [PATCH 16/55] wip --- .gitattributes | 1 + art/logo.svg | 8 +------- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.gitattributes b/.gitattributes index 5fe92d4..efd7a3a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -7,6 +7,7 @@ *.php diff=php /.github export-ignore +/art export-ignore /tests export-ignore .editorconfig export-ignore .gitattributes export-ignore diff --git a/art/logo.svg b/art/logo.svg index ef46d18..913321a 100644 --- a/art/logo.svg +++ b/art/logo.svg @@ -1,9 +1,3 @@ - - + From 5381868ded5ac32c34ad7b6b774f02c0d51e50bb Mon Sep 17 00:00:00 2001 From: Andrew Millington Date: Wed, 28 Jul 2021 13:13:56 +0100 Subject: [PATCH 17/55] Fix tests (#1469) --- tests/Feature/AccessTokenControllerTest.php | 2 +- tests/Unit/PassportServiceProviderTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Feature/AccessTokenControllerTest.php b/tests/Feature/AccessTokenControllerTest.php index e5f4af8..cb10524 100644 --- a/tests/Feature/AccessTokenControllerTest.php +++ b/tests/Feature/AccessTokenControllerTest.php @@ -216,11 +216,11 @@ public function testGettingAccessTokenWithPasswordGrantWithInvalidPassword() $this->assertArrayNotHasKey('expires_in', $decodedResponse); $this->assertArrayNotHasKey('access_token', $decodedResponse); $this->assertArrayNotHasKey('refresh_token', $decodedResponse); + $this->assertArrayNotHasKey('hint', $decodedResponse); $this->assertArrayHasKey('error', $decodedResponse); $this->assertSame('invalid_grant', $decodedResponse['error']); $this->assertArrayHasKey('error_description', $decodedResponse); - $this->assertArrayHasKey('hint', $decodedResponse); $this->assertArrayHasKey('message', $decodedResponse); $this->assertSame(0, Token::count()); diff --git a/tests/Unit/PassportServiceProviderTest.php b/tests/Unit/PassportServiceProviderTest.php index 9fc2374..9355268 100644 --- a/tests/Unit/PassportServiceProviderTest.php +++ b/tests/Unit/PassportServiceProviderTest.php @@ -34,7 +34,7 @@ public function test_can_use_crypto_keys_from_config() $this->assertSame( $privateKeyString, - file_get_contents($cryptKey->getKeyPath()) + $cryptKey->getKeyContents() ); } From 6906a6d84b10dc412fa5fee557e50714c26f62ba Mon Sep 17 00:00:00 2001 From: Ricardo Gobbo de Souza Date: Thu, 29 Jul 2021 08:53:17 -0300 Subject: [PATCH 18/55] Fix link to documentation --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dbc5062..dd386c4 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Laravel Passport is an OAuth2 server and API authentication package that is simp ## Official Documentation -Documentation for Passport can be found on the [Laravel website](https://laravel.com/docs/master/passport). +Documentation for Passport can be found on the [Laravel website](https://laravel.com/docs/passport). ## Contributing From 1d9d0e474dc0d634eb17b3f6e17a1cbb827de5c5 Mon Sep 17 00:00:00 2001 From: Francisco Madeira Date: Wed, 22 Sep 2021 14:02:37 +0100 Subject: [PATCH 19/55] Change logo to work on Dark Theme (#1481) --- art/logo.svg | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/art/logo.svg b/art/logo.svg index 913321a..330d823 100644 --- a/art/logo.svg +++ b/art/logo.svg @@ -1,3 +1 @@ - - - + \ No newline at end of file From 0ee9586e72d87b78e4e43c53a62f189373e6ac79 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 22 Sep 2021 13:02:46 +0000 Subject: [PATCH 20/55] Apply fixes from StyleCI --- src/Http/Middleware/CheckCredentials.php | 2 +- src/Passport.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Http/Middleware/CheckCredentials.php b/src/Http/Middleware/CheckCredentials.php index 4fe7189..20a9376 100644 --- a/src/Http/Middleware/CheckCredentials.php +++ b/src/Http/Middleware/CheckCredentials.php @@ -72,7 +72,7 @@ public function handle($request, Closure $next, ...$scopes) /** * Validate the scopes and token on the incoming request. * - * @param \Psr\Http\Message\ServerRequestInterface $psr + * @param \Psr\Http\Message\ServerRequestInterface $psr * @param array $scopes * @return void * diff --git a/src/Passport.php b/src/Passport.php index 0db48e2..675e43d 100644 --- a/src/Passport.php +++ b/src/Passport.php @@ -371,8 +371,8 @@ public static function actingAs($user, $scopes = [], $guard = 'api') /** * Set the current client for the application with the given scopes. * - * @param \Laravel\Passport\Client $client - * @param array $scopes + * @param \Laravel\Passport\Client $client + * @param array $scopes * @return \Laravel\Passport\Client */ public static function actingAsClient($client, $scopes = []) From 9b5da83893ce350f6f79e6baca61908ed33323c1 Mon Sep 17 00:00:00 2001 From: Choraimy Kroonstuiver <3661474+axlon@users.noreply.github.com> Date: Fri, 15 Oct 2021 16:28:08 +0200 Subject: [PATCH 21/55] [10.x] Ensure client model factory always creates models with a primary key, even when events are disabled (#1492) * Ensure client model factory always creates models with a primary key, even when events are disabled * Update ClientFactory.php Co-authored-by: Taylor Otwell --- database/factories/ClientFactory.php | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/database/factories/ClientFactory.php b/database/factories/ClientFactory.php index 091be54..332285e 100644 --- a/database/factories/ClientFactory.php +++ b/database/factories/ClientFactory.php @@ -5,6 +5,7 @@ use Illuminate\Database\Eloquent\Factories\Factory; use Illuminate\Support\Str; use Laravel\Passport\Client; +use Laravel\Passport\Passport; class ClientFactory extends Factory { @@ -22,7 +23,7 @@ class ClientFactory extends Factory */ public function definition() { - return [ + return $this->ensurePrimaryKeyIsSet([ 'user_id' => null, 'name' => $this->faker->company, 'secret' => Str::random(40), @@ -30,7 +31,24 @@ public function definition() 'personal_access_client' => false, 'password_client' => false, 'revoked' => false, - ]; + ]); + } + + /** + * Ensure the primary key is set on the model when using UUIDs. + * + * @param array $data + * @return array + */ + protected function ensurePrimaryKeyIsSet(array $data) + { + if (Passport::clientUuids()) { + $keyName = (new $this->model)->getKeyName(); + + $data[$keyName] = (string) Str::orderedUuid(); + } + + return $data; } /** From 2ab4b1a055e9430330f9f753ffdbd7c44ed8bae4 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Tue, 19 Oct 2021 15:48:51 +0200 Subject: [PATCH 22/55] PHP 8.1 support --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0e5539a..e5d48d6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: true matrix: - php: [7.3, 7.4, 8.0] + php: [7.3, 7.4, 8.0, 8.1] laravel: [^8.0] name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} From c889d9c464fea409dffe283e9c4e7054ef7aca6f Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Tue, 19 Oct 2021 17:25:10 +0200 Subject: [PATCH 23/55] Update CHANGELOG.md --- CHANGELOG.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cf2be11..fc1aa95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Release Notes -## [Unreleased](https://github.com/laravel/passport/compare/v10.1.3...10.x) +## [Unreleased](https://github.com/laravel/passport/compare/v10.1.4...10.x) + + +## [v10.1.4 (2021-10-19)](https://github.com/laravel/passport/compare/v10.1.3...v10.1.4) + +### Fixed +- Ensure client model factory always creates models with a primary key ([#1492](https://github.com/laravel/passport/pull/1492) ## [v10.1.3 (2021-04-06)](https://github.com/laravel/passport/compare/v10.1.2...v10.1.3) From e6b20bc5918b5731d93c91dfc4e1ad4ad2a11f75 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Thu, 21 Oct 2021 11:41:40 +0200 Subject: [PATCH 24/55] Update phpunit.xml.dist --- phpunit.xml.dist | 1 + 1 file changed, 1 insertion(+) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 0ec92ae..58f1951 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -4,6 +4,7 @@ beStrictAboutTestsThatDoNotTestAnything="false" bootstrap="vendor/autoload.php" colors="true" + convertDeprecationsToExceptions="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" From fda2c2efd54f337be4ea8bed47d7f2665b6b7e0c Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Thu, 28 Oct 2021 21:54:22 +0200 Subject: [PATCH 25/55] Refactor expiry dates to intervals (#1500) --- src/Passport.php | 42 +++++++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/src/Passport.php b/src/Passport.php index 675e43d..eafffb8 100644 --- a/src/Passport.php +++ b/src/Passport.php @@ -39,23 +39,50 @@ class Passport * The date when access tokens expire. * * @var \DateTimeInterface|null + * + * @deprecated Will be removed in the next major Passport release. */ public static $tokensExpireAt; + /** + * The interval when access tokens expire. + * + * @var \DateInterval|null + */ + public static $tokensExpireIn; + /** * The date when refresh tokens expire. * * @var \DateTimeInterface|null + * + * @deprecated Will be removed in the next major Passport release. */ public static $refreshTokensExpireAt; + /** + * The date when refresh tokens expire. + * + * @var \DateInterval|null + */ + public static $refreshTokensExpireIn; + /** * The date when personal access tokens expire. * * @var \DateTimeInterface|null + * + * @deprecated Will be removed in the next major Passport release. */ public static $personalAccessTokensExpireAt; + /** + * The date when personal access tokens expire. + * + * @var \DateInterval|null + */ + public static $personalAccessTokensExpireIn; + /** * The name for API token cookies. * @@ -261,12 +288,11 @@ public static function tokensCan(array $scopes) public static function tokensExpireIn(DateTimeInterface $date = null) { if (is_null($date)) { - return static::$tokensExpireAt - ? Carbon::now()->diff(static::$tokensExpireAt) - : new DateInterval('P1Y'); + return static::$tokensExpireIn ?? new DateInterval('P1Y'); } static::$tokensExpireAt = $date; + static::$tokensExpireIn = Carbon::now()->diff($date); return new static; } @@ -280,12 +306,11 @@ public static function tokensExpireIn(DateTimeInterface $date = null) public static function refreshTokensExpireIn(DateTimeInterface $date = null) { if (is_null($date)) { - return static::$refreshTokensExpireAt - ? Carbon::now()->diff(static::$refreshTokensExpireAt) - : new DateInterval('P1Y'); + return static::$refreshTokensExpireIn ?? new DateInterval('P1Y'); } static::$refreshTokensExpireAt = $date; + static::$refreshTokensExpireIn = Carbon::now()->diff($date); return new static; } @@ -299,12 +324,11 @@ public static function refreshTokensExpireIn(DateTimeInterface $date = null) public static function personalAccessTokensExpireIn(DateTimeInterface $date = null) { if (is_null($date)) { - return static::$personalAccessTokensExpireAt - ? Carbon::now()->diff(static::$personalAccessTokensExpireAt) - : new DateInterval('P1Y'); + return static::$personalAccessTokensExpireIn ?? new DateInterval('P1Y'); } static::$personalAccessTokensExpireAt = $date; + static::$personalAccessTokensExpireIn = Carbon::now()->diff($date); return new static; } From 48b953439be5c6ed487f54ddebd9e13ebbfdb659 Mon Sep 17 00:00:00 2001 From: Thijs Kok Date: Fri, 29 Oct 2021 16:01:39 +0200 Subject: [PATCH 26/55] [10.x] Add custom encryption key for JWT tokens (#1501) * Added Passport custom encryption key * Refactored encryptUsing method * StyleCI fixes * formatting Co-authored-by: Taylor Otwell --- src/ApiTokenCookieFactory.php | 2 +- src/Guards/TokenGuard.php | 2 +- src/Passport.php | 36 +++++++++++++++++++++ tests/Unit/ApiTokenCookieFactoryTest.php | 27 ++++++++++++++++ tests/Unit/TokenGuardTest.php | 41 ++++++++++++++++++++++++ 5 files changed, 106 insertions(+), 2 deletions(-) diff --git a/src/ApiTokenCookieFactory.php b/src/ApiTokenCookieFactory.php index 23a6cd9..3d7d83d 100644 --- a/src/ApiTokenCookieFactory.php +++ b/src/ApiTokenCookieFactory.php @@ -77,6 +77,6 @@ protected function createToken($userId, $csrfToken, Carbon $expiration) 'sub' => $userId, 'csrf' => $csrfToken, 'expiry' => $expiration->getTimestamp(), - ], $this->encrypter->getKey()); + ], Passport::tokenEncryptionKey($this->encrypter)); } } diff --git a/src/Guards/TokenGuard.php b/src/Guards/TokenGuard.php index 7d81ed0..00cbe48 100644 --- a/src/Guards/TokenGuard.php +++ b/src/Guards/TokenGuard.php @@ -269,7 +269,7 @@ protected function decodeJwtTokenCookie($request) { return (array) JWT::decode( CookieValuePrefix::remove($this->encrypter->decrypt($request->cookie(Passport::cookie()), Passport::$unserializesCookies)), - $this->encrypter->getKey(), + Passport::tokenEncryptionKey($this->encrypter), ['HS256'] ); } diff --git a/src/Passport.php b/src/Passport.php index eafffb8..8b6fc42 100644 --- a/src/Passport.php +++ b/src/Passport.php @@ -5,6 +5,7 @@ use Carbon\Carbon; use DateInterval; use DateTimeInterface; +use Illuminate\Contracts\Encryption\Encrypter; use Illuminate\Support\Facades\Route; use League\OAuth2\Server\ResourceServer; use Mockery; @@ -161,10 +162,19 @@ class Passport public static $unserializesCookies = false; /** + * Indicates if client secrets will be hashed. + * * @var bool */ public static $hashesClientSecrets = false; + /** + * The callback that should be used to generate JWT encryption keys. + * + * @var callable + */ + public static $tokenEncryptionKeyCallback; + /** * Indicates the scope should inherit its parent scope. * @@ -640,6 +650,32 @@ public static function hashClientSecrets() return new static; } + /** + * Specify the callback that should be invoked to generate encryption keys for encrypting JWT tokens. + * + * @param callable $callback + * @return static + */ + public static function encryptTokensUsing($callback) + { + static::$tokenEncryptionKeyCallback = $callback; + + return new static; + } + + /** + * Generate an encryption key for encrypting JWT tokens. + * + * @param \Illuminate\Contracts\Encryption\Encrypter $encrypter + * @return string + */ + public static function tokenEncryptionKey(Encrypter $encrypter) + { + return is_callable(static::$tokenEncryptionKeyCallback) ? + (static::$tokenEncryptionKeyCallback)($encrypter) : + $encrypter->getKey(); + } + /** * Configure Passport to not register its migrations. * diff --git a/tests/Unit/ApiTokenCookieFactoryTest.php b/tests/Unit/ApiTokenCookieFactoryTest.php index 5451bcb..1a82bbf 100644 --- a/tests/Unit/ApiTokenCookieFactoryTest.php +++ b/tests/Unit/ApiTokenCookieFactoryTest.php @@ -3,8 +3,10 @@ namespace Laravel\Passport\Tests\Unit; use Illuminate\Contracts\Config\Repository; +use Illuminate\Contracts\Encryption\Encrypter as EncrypterContract; use Illuminate\Encryption\Encrypter; use Laravel\Passport\ApiTokenCookieFactory; +use Laravel\Passport\Passport; use Mockery as m; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Cookie; @@ -33,4 +35,29 @@ public function test_cookie_can_be_successfully_created() $this->assertInstanceOf(Cookie::class, $cookie); } + + public function test_cookie_can_be_successfully_created_when_using_a_custom_encryption_key() + { + Passport::encryptTokensUsing(function (EncrypterContract $encrypter) { + return $encrypter->getKey().'.mykey'; + }); + + $config = m::mock(Repository::class); + $config->shouldReceive('get')->with('session')->andReturn([ + 'lifetime' => 120, + 'path' => '/', + 'domain' => null, + 'secure' => true, + 'same_site' => 'lax', + ]); + $encrypter = new Encrypter(str_repeat('a', 16)); + $factory = new ApiTokenCookieFactory($config, $encrypter); + + $cookie = $factory->make(1, 'token'); + + $this->assertInstanceOf(Cookie::class, $cookie); + + // Revert to the default encryption method + Passport::encryptTokensUsing(null); + } } diff --git a/tests/Unit/TokenGuardTest.php b/tests/Unit/TokenGuardTest.php index a7f4b85..b586eff 100644 --- a/tests/Unit/TokenGuardTest.php +++ b/tests/Unit/TokenGuardTest.php @@ -6,6 +6,7 @@ use Firebase\JWT\JWT; use Illuminate\Container\Container; use Illuminate\Contracts\Debug\ExceptionHandler; +use Illuminate\Contracts\Encryption\Encrypter as EncrypterContract; use Illuminate\Cookie\CookieValuePrefix; use Illuminate\Encryption\Encrypter; use Illuminate\Http\Request; @@ -229,6 +230,46 @@ public function test_cookie_xsrf_is_verified_against_xsrf_token_header() $this->assertNull($guard->user($request)); } + public function test_users_may_be_retrieved_from_cookies_with_xsrf_token_header_when_using_a_custom_encryption_key() + { + Passport::encryptTokensUsing(function (EncrypterContract $encrypter) { + return $encrypter->getKey().'.mykey'; + }); + + $resourceServer = m::mock(ResourceServer::class); + $userProvider = m::mock(PassportUserProvider::class); + $tokens = m::mock(TokenRepository::class); + $clients = m::mock(ClientRepository::class); + $encrypter = new Encrypter(str_repeat('a', 16)); + + $clients->shouldReceive('findActive') + ->with(1) + ->andReturn(new TokenGuardTestClient); + + $guard = new TokenGuard($resourceServer, $userProvider, $tokens, $clients, $encrypter); + + $request = Request::create('/'); + $request->headers->set('X-XSRF-TOKEN', $encrypter->encrypt(CookieValuePrefix::create('X-XSRF-TOKEN', $encrypter->getKey()).'token', false)); + $request->cookies->set('laravel_token', + $encrypter->encrypt(CookieValuePrefix::create('laravel_token', $encrypter->getKey()).JWT::encode([ + 'sub' => 1, + 'aud' => 1, + 'csrf' => 'token', + 'expiry' => Carbon::now()->addMinutes(10)->getTimestamp(), + ], Passport::tokenEncryptionKey($encrypter)), false) + ); + + $userProvider->shouldReceive('retrieveById')->with(1)->andReturn($expectedUser = new TokenGuardTestUser); + $userProvider->shouldReceive('getProviderName')->andReturn(null); + + $user = $guard->user($request); + + $this->assertEquals($expectedUser, $user); + + // Revert to the default encryption method + Passport::encryptTokensUsing(null); + } + public function test_xsrf_token_cookie_without_a_token_header_is_not_accepted() { $resourceServer = m::mock(ResourceServer::class); From 1c69a010930a3ce8db348967d8ad9585be4d7d4d Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Tue, 2 Nov 2021 17:45:51 +0100 Subject: [PATCH 27/55] Update CHANGELOG.md --- CHANGELOG.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc1aa95..86df1cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,15 @@ # Release Notes -## [Unreleased](https://github.com/laravel/passport/compare/v10.1.4...10.x) +## [Unreleased](https://github.com/laravel/passport/compare/v10.2.0...10.x) + + +## [v10.2.0 (2021-11-02)](https://github.com/laravel/passport/compare/v10.1.4...v10.2.0) + +### Added +- Add custom encryption key for JWT tokens ([#1501](https://github.com/laravel/passport/pull/1501)) + +### Changed +- Refactor expiry dates to intervals ([#1500](https://github.com/laravel/passport/pull/1500)) ## [v10.1.4 (2021-10-19)](https://github.com/laravel/passport/compare/v10.1.3...v10.1.4) From 0f02c6cb446ab56ad429b27250c1fd1eac6cc5de Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Fri, 26 Nov 2021 15:57:17 +0100 Subject: [PATCH 28/55] [10.x] Update test for Laravel 9 (#1509) * Update test for Laravel 9 * wip * wip --- src/Console/KeysCommand.php | 6 ++- tests/Feature/KeysCommandTest.php | 29 +++++++++++ tests/Feature/PassportTestCase.php | 4 +- tests/Unit/KeysCommandTest.php | 81 ------------------------------ 4 files changed, 37 insertions(+), 83 deletions(-) create mode 100644 tests/Feature/KeysCommandTest.php delete mode 100644 tests/Unit/KeysCommandTest.php diff --git a/src/Console/KeysCommand.php b/src/Console/KeysCommand.php index 36ff6e6..30490c4 100644 --- a/src/Console/KeysCommand.php +++ b/src/Console/KeysCommand.php @@ -29,7 +29,7 @@ class KeysCommand extends Command /** * Execute the console command. * - * @return void + * @return int */ public function handle() { @@ -40,6 +40,8 @@ public function handle() if ((file_exists($publicKey) || file_exists($privateKey)) && ! $this->option('force')) { $this->error('Encryption keys already exist. Use the --force option to overwrite them.'); + + return 1; } else { if (class_exists(LegacyRSA::class)) { $keys = (new LegacyRSA)->createKey($this->input ? (int) $this->option('length') : 4096); @@ -55,5 +57,7 @@ public function handle() $this->info('Encryption keys generated successfully.'); } + + return 0; } } diff --git a/tests/Feature/KeysCommandTest.php b/tests/Feature/KeysCommandTest.php new file mode 100644 index 0000000..e7d528f --- /dev/null +++ b/tests/Feature/KeysCommandTest.php @@ -0,0 +1,29 @@ +assertFileExists(self::PUBLIC_KEY); + $this->assertFileExists(self::PRIVATE_KEY); + } + + public function testPrivateAndPublicKeysShouldNotBeGeneratedTwice() + { + $this->artisan('passport:keys') + ->assertFailed() + ->expectsOutput('Encryption keys already exist. Use the --force option to overwrite them.'); + } +} diff --git a/tests/Feature/PassportTestCase.php b/tests/Feature/PassportTestCase.php index d7da023..610bfef 100644 --- a/tests/Feature/PassportTestCase.php +++ b/tests/Feature/PassportTestCase.php @@ -12,7 +12,7 @@ abstract class PassportTestCase extends TestCase { use RefreshDatabase; - const KEYS = __DIR__.'/keys'; + const KEYS = __DIR__.'/../keys'; const PUBLIC_KEY = self::KEYS.'/oauth-public.key'; const PRIVATE_KEY = self::KEYS.'/oauth-private.key'; @@ -24,6 +24,8 @@ protected function setUp(): void Passport::routes(); + Passport::loadKeysFrom(self::KEYS); + @unlink(self::PUBLIC_KEY); @unlink(self::PRIVATE_KEY); diff --git a/tests/Unit/KeysCommandTest.php b/tests/Unit/KeysCommandTest.php deleted file mode 100644 index 991d215..0000000 --- a/tests/Unit/KeysCommandTest.php +++ /dev/null @@ -1,81 +0,0 @@ -makePartial() - ->shouldReceive('info') - ->with('Encryption keys generated successfully.') - ->getMock(); - - Container::getInstance()->instance('path.storage', self::KEYS); - - $command->handle(); - - $this->assertFileExists(self::PUBLIC_KEY); - $this->assertFileExists(self::PRIVATE_KEY); - } - - public function testPrivateAndPublicKeysAreGeneratedInCustomPath() - { - Passport::loadKeysFrom(self::KEYS); - - $command = m::mock(KeysCommand::class) - ->makePartial() - ->shouldReceive('info') - ->with('Encryption keys generated successfully.') - ->getMock(); - - $command->handle(); - - $this->assertFileExists(self::PUBLIC_KEY); - $this->assertFileExists(self::PRIVATE_KEY); - - return $command; - } - - /** - * @depends testPrivateAndPublicKeysAreGeneratedInCustomPath - */ - public function testPrivateAndPublicKeysShouldNotBeGeneratedTwice($command) - { - $command->shouldReceive('option') - ->with('force') - ->andReturn(false); - - $command->shouldReceive('error') - ->with('Encryption keys already exist. Use the --force option to overwrite them.'); - - $command->handle(); - } -} From 9e1bbadc7474744f64a606c2696fabd64194ab6a Mon Sep 17 00:00:00 2001 From: Kyryl Bogach Date: Wed, 1 Dec 2021 14:53:00 +0100 Subject: [PATCH 29/55] Fix str_replace error when third parameter ($subject) is null (#1511) * Fix str_replace error when third parameter ($subject) is null in PHP 8.1.0 str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/html/vendor/laravel/passport/src/PassportServiceProvider.php line 268 * Use single quotes to fix style error --- src/PassportServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PassportServiceProvider.php b/src/PassportServiceProvider.php index daeb044..0418d43 100644 --- a/src/PassportServiceProvider.php +++ b/src/PassportServiceProvider.php @@ -265,7 +265,7 @@ protected function registerResourceServer() */ protected function makeCryptKey($type) { - $key = str_replace('\\n', "\n", $this->app->make(Config::class)->get('passport.'.$type.'_key')); + $key = str_replace('\\n', "\n", $this->app->make(Config::class)->get('passport.'.$type.'_key') ?? ''); if (! $key) { $key = 'file://'.Passport::keyPath('oauth-'.$type.'.key'); From a2634286f98de77a203e6d57b231d6c30c840569 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Tue, 7 Dec 2021 17:21:39 +0100 Subject: [PATCH 30/55] Update CHANGELOG.md --- CHANGELOG.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86df1cc..c0e338a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Release Notes -## [Unreleased](https://github.com/laravel/passport/compare/v10.2.0...10.x) +## [Unreleased](https://github.com/laravel/passport/compare/v10.2.1...10.x) + + +## [v10.2.1 (2021-12-07)](https://github.com/laravel/passport/compare/v10.2.0...v10.2.1) + +### Fixed +- Fix `str_replace` error when third parameter ($subject) is null ([#1511](https://github.com/laravel/passport/pull/1511)) ## [v10.2.0 (2021-11-02)](https://github.com/laravel/passport/compare/v10.1.4...v10.2.0) From c24402ebced91e7ada334e6e48ab119b494bacea Mon Sep 17 00:00:00 2001 From: ruben Date: Tue, 7 Dec 2021 16:47:26 +0000 Subject: [PATCH 31/55] fix: Internal method return types, php 8.1 tests compatibility --- src/Bridge/Scope.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Bridge/Scope.php b/src/Bridge/Scope.php index 0ea8997..50aaf02 100644 --- a/src/Bridge/Scope.php +++ b/src/Bridge/Scope.php @@ -25,6 +25,7 @@ public function __construct($name) * * @return mixed */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return $this->getIdentifier(); From 7981abed1a0979afd4a5a8bec81624b8127a287f Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Tue, 7 Dec 2021 17:57:03 +0100 Subject: [PATCH 32/55] Update CHANGELOG.md --- CHANGELOG.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0e338a..410ee4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Release Notes -## [Unreleased](https://github.com/laravel/passport/compare/v10.2.1...10.x) +## [Unreleased](https://github.com/laravel/passport/compare/v10.2.2...10.x) + + +## [v10.2.2 (2021-12-07)](https://github.com/laravel/passport/compare/v10.2.1...v10.2.2) + +### Fixed +- Fix jsonSerialize PHP 8.1 issue ([#1512](https://github.com/laravel/passport/pull/1512)) ## [v10.2.1 (2021-12-07)](https://github.com/laravel/passport/compare/v10.2.0...v10.2.1) From 9a431c5535f8637ba4bfa9fb07351f4226f11c63 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Tue, 11 Jan 2022 21:21:02 +0100 Subject: [PATCH 33/55] Update tests.yml --- .github/workflows/tests.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e5d48d6..2d0bcbc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,8 +13,13 @@ jobs: strategy: fail-fast: true matrix: - php: [7.3, 7.4, 8.0, 8.1] - laravel: [^8.0] + php: [7.3, 7.4, '8.0', 8.1] + laravel: [8, 9] + exclude: + - php: 7.3 + laravel: 9 + - php: 7.4 + laravel: 9 name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} @@ -32,7 +37,7 @@ jobs: - name: Install dependencies run: | - composer require "illuminate/contracts=${{ matrix.laravel }}" --no-update + composer require "illuminate/contracts=^${{ matrix.laravel }}" --no-update composer update --prefer-dist --no-interaction --no-progress - name: Execute tests From fe865e3b165ca203e8498e1b82ee3493b6c2c304 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Tue, 11 Jan 2022 21:21:48 +0100 Subject: [PATCH 34/55] Update tests.yml --- .github/workflows/tests.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2d0bcbc..e5d48d6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,13 +13,8 @@ jobs: strategy: fail-fast: true matrix: - php: [7.3, 7.4, '8.0', 8.1] - laravel: [8, 9] - exclude: - - php: 7.3 - laravel: 9 - - php: 7.4 - laravel: 9 + php: [7.3, 7.4, 8.0, 8.1] + laravel: [^8.0] name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} @@ -37,7 +32,7 @@ jobs: - name: Install dependencies run: | - composer require "illuminate/contracts=^${{ matrix.laravel }}" --no-update + composer require "illuminate/contracts=${{ matrix.laravel }}" --no-update composer update --prefer-dist --no-interaction --no-progress - name: Execute tests From b9e0b9869272d87febff38583796b68307c3dacb Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Wed, 12 Jan 2022 19:10:09 +0100 Subject: [PATCH 35/55] Laravel v9 support (#1516) * Laravel 9 support * Update composer.json * Update tests.yml --- .github/workflows/tests.yml | 11 ++++++++--- composer.json | 20 ++++++++++---------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e5d48d6..2d0bcbc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,8 +13,13 @@ jobs: strategy: fail-fast: true matrix: - php: [7.3, 7.4, 8.0, 8.1] - laravel: [^8.0] + php: [7.3, 7.4, '8.0', 8.1] + laravel: [8, 9] + exclude: + - php: 7.3 + laravel: 9 + - php: 7.4 + laravel: 9 name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} @@ -32,7 +37,7 @@ jobs: - name: Install dependencies run: | - composer require "illuminate/contracts=${{ matrix.laravel }}" --no-update + composer require "illuminate/contracts=^${{ matrix.laravel }}" --no-update composer update --prefer-dist --no-interaction --no-progress - name: Execute tests diff --git a/composer.json b/composer.json index 0726c28..bea4a04 100644 --- a/composer.json +++ b/composer.json @@ -17,15 +17,15 @@ "php": "^7.3|^8.0", "ext-json": "*", "firebase/php-jwt": "^5.0", - "illuminate/auth": "^8.2", - "illuminate/console": "^8.2", - "illuminate/container": "^8.2", - "illuminate/contracts": "^8.2", - "illuminate/cookie": "^8.2", - "illuminate/database": "^8.2", - "illuminate/encryption": "^8.2", - "illuminate/http": "^8.2", - "illuminate/support": "^8.2", + "illuminate/auth": "^8.2|^9.0", + "illuminate/console": "^8.2|^9.0", + "illuminate/container": "^8.2|^9.0", + "illuminate/contracts": "^8.2|^9.0", + "illuminate/cookie": "^8.2|^9.0", + "illuminate/database": "^8.2|^9.0", + "illuminate/encryption": "^8.2|^9.0", + "illuminate/http": "^8.2|^9.0", + "illuminate/support": "^8.2|^9.0", "lcobucci/jwt": "^3.4|^4.0", "league/oauth2-server": "^8.2", "nyholm/psr7": "^1.3", @@ -34,7 +34,7 @@ }, "require-dev": { "mockery/mockery": "^1.0", - "orchestra/testbench": "^6.0", + "orchestra/testbench": "^6.0|^7.0", "phpunit/phpunit": "^9.3" }, "autoload": { From b4a829e52f57e871f6c40717b9c9770cac5ad795 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Wed, 12 Jan 2022 19:12:12 +0100 Subject: [PATCH 36/55] Update CHANGELOG.md --- CHANGELOG.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 410ee4d..134dc91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Release Notes -## [Unreleased](https://github.com/laravel/passport/compare/v10.2.2...10.x) +## [Unreleased](https://github.com/laravel/passport/compare/v10.3.0...10.x) + + +## [v10.3.0 (2022-01-12)](https://github.com/laravel/passport/compare/v10.2.2...v10.3.0) + +### Changed +- Laravel 9 Support ([#1516](https://github.com/laravel/passport/pull/1516)) ## [v10.2.2 (2021-12-07)](https://github.com/laravel/passport/compare/v10.2.1...v10.2.2) From ba1996cdaf25c88bb8cf851442afa0ec6870a3a1 Mon Sep 17 00:00:00 2001 From: yaroslawww <23663794+yaroslawww@users.noreply.github.com> Date: Fri, 21 Jan 2022 16:51:20 +0200 Subject: [PATCH 37/55] [10.x] Allow to use custom authorization server response (#1521) * Allow to use custom authorization server response * Update src/Passport.php Remove direct initialisation as "null" Co-authored-by: Dries Vints * Update Passport.php Co-authored-by: Dries Vints Co-authored-by: Taylor Otwell --- src/Passport.php | 7 +++ src/PassportServiceProvider.php | 3 +- tests/Feature/AccessTokenControllerTest.php | 57 +++++++++++++++++++++ 3 files changed, 66 insertions(+), 1 deletion(-) diff --git a/src/Passport.php b/src/Passport.php index 8b6fc42..fd5f7c8 100644 --- a/src/Passport.php +++ b/src/Passport.php @@ -182,6 +182,13 @@ class Passport */ public static $withInheritedScopes = false; + /** + * The authorization server response type. + * + * @var \League\OAuth2\Server\ResponseTypes\ResponseTypeInterface|null + */ + public static $authorizationServerResponseType; + /** * Enable the implicit grant type. * diff --git a/src/PassportServiceProvider.php b/src/PassportServiceProvider.php index 0418d43..e87b518 100644 --- a/src/PassportServiceProvider.php +++ b/src/PassportServiceProvider.php @@ -212,7 +212,8 @@ public function makeAuthorizationServer() $this->app->make(Bridge\AccessTokenRepository::class), $this->app->make(Bridge\ScopeRepository::class), $this->makeCryptKey('private'), - app('encrypter')->getKey() + app('encrypter')->getKey(), + Passport::$authorizationServerResponseType ); } diff --git a/tests/Feature/AccessTokenControllerTest.php b/tests/Feature/AccessTokenControllerTest.php index cb10524..451107d 100644 --- a/tests/Feature/AccessTokenControllerTest.php +++ b/tests/Feature/AccessTokenControllerTest.php @@ -10,6 +10,7 @@ use Laravel\Passport\ClientRepository; use Laravel\Passport\Database\Factories\ClientFactory; use Laravel\Passport\HasApiTokens; +use Laravel\Passport\Passport; use Laravel\Passport\Token; use Laravel\Passport\TokenRepository; use Lcobucci\JWT\Configuration; @@ -270,9 +271,65 @@ public function testGettingAccessTokenWithPasswordGrantWithInvalidClientSecret() $this->assertSame(0, Token::count()); } + + public function testGettingCustomResponseType() + { + $this->withoutExceptionHandling(); + Passport::$authorizationServerResponseType = new IdTokenResponse('foo_bar_open_id_token'); + + $user = new User(); + $user->email = 'foo@gmail.com'; + $user->password = $this->app->make(Hasher::class)->make('foobar123'); + $user->save(); + + /** @var Client $client */ + $client = ClientFactory::new()->asClientCredentials()->create(['user_id' => $user->id]); + + $response = $this->post( + '/oauth/token', + [ + 'grant_type' => 'client_credentials', + 'client_id' => $client->id, + 'client_secret' => $client->secret, + ] + ); + + $response->assertOk(); + + $decodedResponse = $response->decodeResponseJson()->json(); + + $this->assertArrayHasKey('id_token', $decodedResponse); + $this->assertSame('foo_bar_open_id_token', $decodedResponse['id_token']); + } } class User extends \Illuminate\Foundation\Auth\User { use HasApiTokens; } + +class IdTokenResponse extends \League\OAuth2\Server\ResponseTypes\BearerTokenResponse +{ + /** + * @var string Id token. + */ + protected $idToken; + + /** + * @param string $idToken + */ + public function __construct($idToken) + { + $this->idToken = $idToken; + } + + /** + * @inheritdoc + */ + protected function getExtraParams(\League\OAuth2\Server\Entities\AccessTokenEntityInterface $accessToken) + { + return [ + 'id_token' => $this->idToken, + ]; + } +} From 779e34f0152f42fb76b258d814956313fa38857c Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Tue, 25 Jan 2022 21:06:06 +0100 Subject: [PATCH 38/55] Update CHANGELOG.md --- CHANGELOG.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 134dc91..14eb730 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Release Notes -## [Unreleased](https://github.com/laravel/passport/compare/v10.3.0...10.x) +## [Unreleased](https://github.com/laravel/passport/compare/v10.3.1...10.x) + + +## [v10.3.1 (2022-01-25)](https://github.com/laravel/passport/compare/v10.3.0...v10.3.1) + +### Changed +- Allow to use custom authorization server response ([#1521](https://github.com/laravel/passport/pull/1521)) ## [v10.3.0 (2022-01-12)](https://github.com/laravel/passport/compare/v10.2.2...v10.3.0) From c56d3e0a066ae31b0baf082a2672bda935d48cf7 Mon Sep 17 00:00:00 2001 From: Jonathan Mitchell Date: Thu, 3 Feb 2022 18:20:48 -0800 Subject: [PATCH 39/55] Minor documentation tweak to UPGRADE.md (#1526) * Update UPGRADE.md I just went through the steps of upgrading passport from v8 to v10 and hit a minor snag that could have been solved by a tweak to the documentation. When upgrading from v8 to v9 it says place two Passport static calls "within the `boot` method of your `AppServiceProvider`" When upgrading from v9 to v10 it says you can remove the calls from your `AuthServiceProvider`. I don't claim to know where those calls belonged in the first place, so this proposal just updates the documentation to list them both. * Update UPGRADE.md Co-authored-by: Taylor Otwell --- UPGRADE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPGRADE.md b/UPGRADE.md index 3f1c912..4df35ce 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -16,7 +16,7 @@ Laravel 8.0 is now the minimum required version. 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`. +The personal client configuration methods have been removed from the `Passport` class since they are no longer necessary. You should remove any calls to these methods from your application's service providers. ## Upgrading To 9.0 From 8.x From 409e30849da4f8488ce09d1d18c9055944b0a66c Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Tue, 8 Feb 2022 15:13:38 +0100 Subject: [PATCH 40/55] Create update-changelog.yml --- .github/workflows/update-changelog.yml | 29 ++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/update-changelog.yml diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml new file mode 100644 index 0000000..0200e2b --- /dev/null +++ b/.github/workflows/update-changelog.yml @@ -0,0 +1,29 @@ +name: "Update Changelog" + +on: + release: + types: [released] + +jobs: + update: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + ref: ${{ github.ref_name }} + + - name: Update Changelog + uses: stefanzweifel/changelog-updater-action@v1 + with: + latest-version: ${{ github.event.release.tag_name }} + release-notes: ${{ github.event.release.body }} + compare-url-target-revision: ${{ github.event.release.target_commitish }} + + - name: Commit updated CHANGELOG + uses: stefanzweifel/git-auto-commit-action@v4 + with: + branch: ${{ github.event.release.target_commitish }} + commit_message: Update CHANGELOG.md + file_pattern: CHANGELOG.md From c56207e9a37c849da0164842a609a9f38747e95b Mon Sep 17 00:00:00 2001 From: Antonio Pauletich Date: Tue, 15 Feb 2022 22:44:15 +0100 Subject: [PATCH 41/55] [10.x] Fix Faker deprecations (#1530) When using this factory in feature tests with `$this->withoutDeprecationHandling();` call the test fails as the deprecation gets converted to an exception: ``` Since fakerphp/faker 1.14: Accessing property "company" is deprecated, use "company()" instead. ``` --- database/factories/ClientFactory.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/database/factories/ClientFactory.php b/database/factories/ClientFactory.php index 332285e..afdc227 100644 --- a/database/factories/ClientFactory.php +++ b/database/factories/ClientFactory.php @@ -25,9 +25,9 @@ public function definition() { return $this->ensurePrimaryKeyIsSet([ 'user_id' => null, - 'name' => $this->faker->company, + 'name' => $this->faker->company(), 'secret' => Str::random(40), - 'redirect' => $this->faker->url, + 'redirect' => $this->faker->url(), 'personal_access_client' => false, 'password_client' => false, 'revoked' => false, From de6e1fda1322b72764c15aef28bd099f01d61aeb Mon Sep 17 00:00:00 2001 From: driesvints Date: Tue, 22 Feb 2022 16:10:13 +0000 Subject: [PATCH 42/55] Update CHANGELOG.md --- CHANGELOG.md | 138 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 83 insertions(+), 55 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14eb730..5b2668f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,267 +1,286 @@ # Release Notes -## [Unreleased](https://github.com/laravel/passport/compare/v10.3.1...10.x) +## [Unreleased](https://github.com/laravel/passport/compare/v10.3.2...10.x) +## [v10.3.2](https://github.com/laravel/passport/compare/v10.3.1...v10.3.2) - 2022-02-22 + +### Fixed + +- Fix Faker deprecations by @X-Coder264 in https://github.com/laravel/passport/pull/1530 ## [v10.3.1 (2022-01-25)](https://github.com/laravel/passport/compare/v10.3.0...v10.3.1) ### Changed -- Allow to use custom authorization server response ([#1521](https://github.com/laravel/passport/pull/1521)) +- Allow to use custom authorization server response ([#1521](https://github.com/laravel/passport/pull/1521)) ## [v10.3.0 (2022-01-12)](https://github.com/laravel/passport/compare/v10.2.2...v10.3.0) ### Changed -- Laravel 9 Support ([#1516](https://github.com/laravel/passport/pull/1516)) +- Laravel 9 Support ([#1516](https://github.com/laravel/passport/pull/1516)) ## [v10.2.2 (2021-12-07)](https://github.com/laravel/passport/compare/v10.2.1...v10.2.2) ### Fixed -- Fix jsonSerialize PHP 8.1 issue ([#1512](https://github.com/laravel/passport/pull/1512)) +- Fix jsonSerialize PHP 8.1 issue ([#1512](https://github.com/laravel/passport/pull/1512)) ## [v10.2.1 (2021-12-07)](https://github.com/laravel/passport/compare/v10.2.0...v10.2.1) ### Fixed -- Fix `str_replace` error when third parameter ($subject) is null ([#1511](https://github.com/laravel/passport/pull/1511)) +- Fix `str_replace` error when third parameter ($subject) is null ([#1511](https://github.com/laravel/passport/pull/1511)) ## [v10.2.0 (2021-11-02)](https://github.com/laravel/passport/compare/v10.1.4...v10.2.0) ### Added + - Add custom encryption key for JWT tokens ([#1501](https://github.com/laravel/passport/pull/1501)) ### Changed -- Refactor expiry dates to intervals ([#1500](https://github.com/laravel/passport/pull/1500)) +- Refactor expiry dates to intervals ([#1500](https://github.com/laravel/passport/pull/1500)) ## [v10.1.4 (2021-10-19)](https://github.com/laravel/passport/compare/v10.1.3...v10.1.4) ### Fixed -- Ensure client model factory always creates models with a primary key ([#1492](https://github.com/laravel/passport/pull/1492) +- Ensure client model factory always creates models with a primary key ([#1492](https://github.com/laravel/passport/pull/1492) ## [v10.1.3 (2021-04-06)](https://github.com/laravel/passport/compare/v10.1.2...v10.1.3) ### Changed + - Use app helper ([3d1e6bb](https://github.com/laravel/passport/commit/3d1e6bbdedf71efb147f3b5205259e8b20c2e6ad)) - + ### Fixed -- Fix binding ([e3478de](https://github.com/laravel/passport/commit/e3478dedd938671b7598239cc8554f77de9ab9c7)) +- Fix binding ([e3478de](https://github.com/laravel/passport/commit/e3478dedd938671b7598239cc8554f77de9ab9c7)) ## [v10.1.2 (2021-03-02)](https://github.com/laravel/passport/compare/v10.1.1...v10.1.2) ### Fixed -- Backport phpseclib v2 ([#1418](https://github.com/laravel/passport/pull/1418)) +- Backport phpseclib v2 ([#1418](https://github.com/laravel/passport/pull/1418)) ## [v10.1.1 (2021-02-23)](https://github.com/laravel/passport/compare/v10.1.0...v10.1.1) ### Changed -- Update to phpseclib v3 ([#1410](https://github.com/laravel/passport/pull/1410)) +- Update to phpseclib v3 ([#1410](https://github.com/laravel/passport/pull/1410)) ## [v10.1.0 (2020-11-26)](https://github.com/laravel/passport/compare/v10.0.1...v10.1.0) ### Added + - PHP 8 Support ([#1373](https://github.com/laravel/passport/pull/1373)) ### Removed -- Remove Vue components ([#1352](https://github.com/laravel/passport/pull/1352)) +- Remove Vue components ([#1352](https://github.com/laravel/passport/pull/1352)) ## [v10.0.1 (2020-09-15)](https://github.com/laravel/passport/compare/v10.0.0...v10.0.1) ### Fixed -- Use newFactory to properly reference factory ([#1349](https://github.com/laravel/passport/pull/1349)) +- Use newFactory to properly reference factory ([#1349](https://github.com/laravel/passport/pull/1349)) ## [v10.0.0 (2020-09-08)](https://github.com/laravel/passport/compare/v9.3.2...v10.0.0) ### Added + - Support Laravel 8 & drop PHP 7.2 support ([#1336](https://github.com/laravel/passport/pull/1336)) ### Changed + - `forceFill` new auth code attributes ([#1266](https://github.com/laravel/passport/pull/1266)) - Use only one PSR 7 implementation ([#1330](https://github.com/laravel/passport/pull/1330)) ### Removed + - Remove old static personal client methods ([#1325](https://github.com/laravel/passport/pull/1325)) - Remove Guzzle dependency ([#1327](https://github.com/laravel/passport/pull/1327)) - ## [v9.3.2 (2020-07-27)](https://github.com/laravel/passport/compare/v9.3.1...v9.3.2) ### Fixes -- Fix cookie handling for security release ([#1322](https://github.com/laravel/passport/pull/1322), [75f1ad2](https://github.com/laravel/passport/commit/75f1ad218ddf4500f2beb9e5c2fb186530e8ddb6)) +- Fix cookie handling for security release ([#1322](https://github.com/laravel/passport/pull/1322), [75f1ad2](https://github.com/laravel/passport/commit/75f1ad218ddf4500f2beb9e5c2fb186530e8ddb6)) ## [v9.3.1 (2020-07-21)](https://github.com/laravel/passport/compare/v9.3.0...v9.3.1) ### Fixed + - Use custom models in purge command if set ([#1316](https://github.com/laravel/passport/pull/1316)) - Apply table responsive on table class ([#1318](https://github.com/laravel/passport/pull/1318)) - ## [v9.3.0 (2020-06-30)](https://github.com/laravel/passport/compare/v9.2.2...v9.3.0) ### Added -- Guzzle 7 support ([#1311](https://github.com/laravel/passport/pull/1311)) +- Guzzle 7 support ([#1311](https://github.com/laravel/passport/pull/1311)) ## [v9.2.2 (2020-06-25)](https://github.com/laravel/passport/compare/v9.2.1...v9.2.2) ### Fixed + - Fix maxlength for token names ([#1300](https://github.com/laravel/passport/pull/1300)) - Improve `passport:install` command ([#1294](https://github.com/laravel/passport/pull/1294)) - ## [v9.2.1 (2020-05-14)](https://github.com/laravel/passport/compare/v9.2.0...v9.2.1) ### Fixed + - Fix actingAsClient token relation ([#1268](https://github.com/laravel/passport/pull/1268)) - Fix HashCommand ([bedf02c](https://github.com/laravel/passport/commit/bedf02c8bb8fb9ca373e34f0ceefb2e8c5bf006b)) - ## [v9.2.0 (2020-05-12](https://github.com/laravel/passport/compare/v9.1.0...v9.2.0) ### Added + - Allow to change Models database connection ([#1255](https://github.com/laravel/passport/pull/1255), [7ab3bdb](https://github.com/laravel/passport/commit/7ab3bdbdb9bf162f2da9d8c445523dc63c862248)) ### Fixed -- Nonstandard ID in the token's relationship with the user ([#1267](https://github.com/laravel/passport/pull/1267)) +- Nonstandard ID in the token's relationship with the user ([#1267](https://github.com/laravel/passport/pull/1267)) ## [v9.1.0 (2020-05-08](https://github.com/laravel/passport/compare/v9.0.1...v9.1.0) ### Added + - Implement secret modal ([#1258](https://github.com/laravel/passport/pull/1258)) - Warn about one-time-hashed-secret ([#1259](https://github.com/laravel/passport/pull/1259)) - Add force option to hash command ([#1251](https://github.com/laravel/passport/pull/1251)) ### Fixed -- Implement personal access client config ([#1260](https://github.com/laravel/passport/pull/1260)) +- Implement personal access client config ([#1260](https://github.com/laravel/passport/pull/1260)) ## [v9.0.1 (2020-05-06)](https://github.com/laravel/passport/compare/v9.0.0...v9.0.1) ### Fixed + - Fix displaying secret in Vue component ([#1244](https://github.com/laravel/passport/pull/1244)) - Moved provider check to bearer token only ([#1246](https://github.com/laravel/passport/pull/1246)) - Fix create client call ([aff9d09](https://github.com/laravel/passport/commit/aff9d0933737354d04df98cfc431fa20309be03a)) - ## [v9.0.0 (2020-05-05)](https://github.com/laravel/passport/compare/v8.5.0...v9.0.0) ### Added + - Allow client credentials secret to be hashed ([#1145](https://github.com/laravel/passport/pull/1145), [ccbcfeb](https://github.com/laravel/passport/commit/ccbcfeb5301e8f757395ba0e43980615acf4385e), [1c40ae0](https://github.com/laravel/passport/commit/1c40ae07503aeb23173d48f3a6e5757cafcfd71b)) - Implement `passport:hash` command ([#1238](https://github.com/laravel/passport/pull/1238)) - Initial support for multiple providers ([#1220](https://github.com/laravel/passport/pull/1220)) ### Changed + - Client credentials middleware should allow any valid client ([#1132](https://github.com/laravel/passport/pull/1132)) - Switch from `getKey()` to `getAuthIdentifier()` to match Laravel core ([#1134](https://github.com/laravel/passport/pull/1134)) - Use Hasher interface instead of HashManager ([#1157](https://github.com/laravel/passport/pull/1157)) - Bump league server dependency ([#1237](https://github.com/laravel/passport/pull/1237)) ### Removed + - Remove deprecated functionality ([#1235](https://github.com/laravel/passport/pull/1235)) - Drop support for old JWT versions ([#1236](https://github.com/laravel/passport/pull/1236)) - ## [v8.5.0 (2020-05-05)](https://github.com/laravel/passport/compare/v8.4.4...v8.5.0) ### Added -- Automatic configuration of client UUIDs ([#1231](https://github.com/laravel/passport/pull/1231)) +- Automatic configuration of client UUIDs ([#1231](https://github.com/laravel/passport/pull/1231)) ## [v8.4.4 (2020-04-21)](https://github.com/laravel/passport/compare/v8.4.3...v8.4.4) ### Fixed -- Fix 500 Internal Server Error response ([#1222](https://github.com/laravel/passport/pull/1222)) +- Fix 500 Internal Server Error response ([#1222](https://github.com/laravel/passport/pull/1222)) ## [v8.4.3 (2020-03-31)](https://github.com/laravel/passport/compare/v8.4.2...v8.4.3) ### Fixed -- Fix resolveInheritedScopes ([#1207](https://github.com/laravel/passport/pull/1207)) +- Fix resolveInheritedScopes ([#1207](https://github.com/laravel/passport/pull/1207)) ## [v8.4.2 (2020-03-24)](https://github.com/laravel/passport/compare/v8.4.1...v8.4.2) ### Fixed -- `mergeConfigFrom` already checked if app is running with config cached ([#1205](https://github.com/laravel/passport/pull/1205)) +- `mergeConfigFrom` already checked if app is running with config cached ([#1205](https://github.com/laravel/passport/pull/1205)) ## [v8.4.1 (2020-03-04)](https://github.com/laravel/passport/compare/v8.4.0...v8.4.1) ### Fixed + - Forget session keys on invalid match ([#1192](https://github.com/laravel/passport/pull/1192)) - Update dependencies for PSR request ([#1201](https://github.com/laravel/passport/pull/1201)) - ## [v8.4.0 (2020-02-12)](https://github.com/laravel/passport/compare/v8.3.1...v8.4.0) ### Changed + - Implement auth token for access requests ([#1188](https://github.com/laravel/passport/pull/1188)) ### Fixed -- Revoke refresh tokens when auth tokens get revoked ([#1186](https://github.com/laravel/passport/pull/1186)) +- Revoke refresh tokens when auth tokens get revoked ([#1186](https://github.com/laravel/passport/pull/1186)) ## [v8.3.1 (2020-01-29)](https://github.com/laravel/passport/compare/v8.3.0...v8.3.1) ### Fixed -- Remove foreign keys ([20e9b66](https://github.com/laravel/passport/commit/20e9b66fcd003ba41301fc5de23b9892e307051a)) +- Remove foreign keys ([20e9b66](https://github.com/laravel/passport/commit/20e9b66fcd003ba41301fc5de23b9892e307051a)) ## [v8.3.0 (2020-01-28)](https://github.com/laravel/passport/compare/v8.2.0...v8.3.0) ### Added + - Add a Passport Client factory to Passport publishing ([#1171](https://github.com/laravel/passport/pull/1171)) ### Changed -- Use bigIncrements and indexes on relationships ([#1169](https://github.com/laravel/passport/pull/1169), [140a693](https://github.com/laravel/passport/commit/140a693a079f5611b3342360cde00b10e94162c1)) +- Use bigIncrements and indexes on relationships ([#1169](https://github.com/laravel/passport/pull/1169), [140a693](https://github.com/laravel/passport/commit/140a693a079f5611b3342360cde00b10e94162c1)) ## [v8.2.0 (2020-01-07)](https://github.com/laravel/passport/compare/v8.1.0...v8.2.0) ### Added + - Update ClientCommand to support public clients ([#1151](https://github.com/laravel/passport/pull/1151)) - Purge Command for revoked and/or expired tokens and auth codes ([#1159](https://github.com/laravel/passport/pull/1159), [6c1ea42](https://github.com/laravel/passport/commit/6c1ea42e66100b15ecad89b0e1c5ccaa12b4331b)) ### Changed -- Replace deprecated package and namespaces ([#1158](https://github.com/laravel/passport/pull/1158)) +- Replace deprecated package and namespaces ([#1158](https://github.com/laravel/passport/pull/1158)) ## [v8.1.0 (2019-12-30)](https://github.com/laravel/passport/compare/v8.0.2...v8.1.0) ### Added + - Allow access to HTTP response status code on OAuthServerException ([#1148](https://github.com/laravel/passport/pull/1148)) - Modify UserRepository to check for 'findAndValidateForPassport' method ([#1144](https://github.com/laravel/passport/pull/1144)) - ## [v8.0.2 (2019-11-26)](https://github.com/laravel/passport/compare/v8.0.1...v8.0.2) ### Changed -- Add abstract CheckCredentials middleware and allows to create ([#1127](https://github.com/laravel/passport/pull/1127)) +- Add abstract CheckCredentials middleware and allows to create ([#1127](https://github.com/laravel/passport/pull/1127)) ## [v8.0.1 (2019-11-19)](https://github.com/laravel/passport/compare/v8.0.0...v8.0.1) ### Fixed -- Fix `actingAsClient` testing method ([#1119](https://github.com/laravel/passport/pull/1119)) +- Fix `actingAsClient` testing method ([#1119](https://github.com/laravel/passport/pull/1119)) ## [v8.0.0 (2019-10-29)](https://github.com/laravel/passport/compare/v7.5.1...v8.0.0) ### Added + - Add ability to customize the `RefreshToken` ([#966](https://github.com/laravel/passport/pull/966)) - Add support for "public" clients ([#1065](https://github.com/laravel/passport/pull/1065)) ### Changed + - Rework HandlesOAuthErrors trait to middleware ([#937](https://github.com/laravel/passport/pull/937)) - Use a renderable exception for OAuth errors ([#1066](https://github.com/laravel/passport/pull/1066)) - Use diactoros 2.0 and psr-http-factory ([aadf603](https://github.com/laravel/passport/commit/aadf603c1f45cfa4bbf954bfc3abc30cdd572683)) @@ -272,162 +291,171 @@ - Upgrade to league/oauth2-server 8.0 ([97e3026](https://github.com/laravel/passport/commit/97e3026790d953d7a67fe487e30775cd995e93df)) ### Fixed + - Fix exception will thrown if token belongs to first party clients ([#1040](https://github.com/laravel/passport/pull/1040)) - Fix auth codes table customization ([#1044](https://github.com/laravel/passport/pull/1044)) - Add key type to refresh token model ([e400c2b](https://github.com/laravel/passport/commit/e400c2b665f66b5669e792e42b6d1479cff23df7)) - ## [v7.5.1 (2019-10-08)](https://github.com/laravel/passport/compare/v7.5.0...v7.5.1) ### Fixed -- Cast returned client identifier value to string ([#1091](https://github.com/laravel/passport/pull/1091)) +- Cast returned client identifier value to string ([#1091](https://github.com/laravel/passport/pull/1091)) ## [v7.5.0 (2019-09-24)](https://github.com/laravel/passport/compare/v7.4.1...v7.5.0) ### Added -- Add `actingAsClient` method for tests ([#1083](https://github.com/laravel/passport/pull/1083)) +- Add `actingAsClient` method for tests ([#1083](https://github.com/laravel/passport/pull/1083)) ## [v7.4.1 (2019-09-10)](https://github.com/laravel/passport/compare/v7.4.0...v7.4.1) ### Fixed -- Fixed key types for models ([#1078](https://github.com/laravel/passport/pull/1078), [a9a885d3](https://github.com/laravel/passport/commit/a9a885d3c2344ec133ed42a0268e503a76810982)) +- Fixed key types for models ([#1078](https://github.com/laravel/passport/pull/1078), [a9a885d3](https://github.com/laravel/passport/commit/a9a885d3c2344ec133ed42a0268e503a76810982)) ## [v7.4.0 (2019-08-20)](https://github.com/laravel/passport/compare/v7.3.5...v7.4.0) ### Added + - Let Passport support inherited parent scopes ([#1068](https://github.com/laravel/passport/pull/1068)) - Accept requests with the encrypted X-XSRF-TOKEN HTTP header ([#1069](https://github.com/laravel/passport/pull/1069)) - ## [v7.3.5 (2019-08-06)](https://github.com/laravel/passport/compare/v7.3.4...v7.3.5) ### Fixed -- Use `bigInteger` column type for `user_id` columns ([#1057](https://github.com/laravel/passport/pull/1057)) +- Use `bigInteger` column type for `user_id` columns ([#1057](https://github.com/laravel/passport/pull/1057)) ## [v7.3.4 (2019-07-30)](https://github.com/laravel/passport/compare/v7.3.3...v7.3.4) ### Changed -- Remove old 5.9 constraints ([58eb99c](https://github.com/laravel/passport/commit/58eb99cac0668ba61f3c9dc03694848f0ac7035a)) +- Remove old 5.9 constraints ([58eb99c](https://github.com/laravel/passport/commit/58eb99cac0668ba61f3c9dc03694848f0ac7035a)) ## [v7.3.3 (2019-07-29)](https://github.com/laravel/passport/compare/v7.3.2...v7.3.3) ### Changed -- Update version constraints for Laravel 6.0 ([609b5e8](https://github.com/laravel/passport/commit/609b5e829bf65dbeffb83dc8c324275fe0ebf30c)) +- Update version constraints for Laravel 6.0 ([609b5e8](https://github.com/laravel/passport/commit/609b5e829bf65dbeffb83dc8c324275fe0ebf30c)) ## [v7.3.2 (2019-07-11)](https://github.com/laravel/passport/compare/v7.3.1...v7.3.2) ### Fixed -- Merge default Passport configuration ([#1039](https://github.com/laravel/passport/pull/1039), [e260c86](https://github.com/laravel/passport/commit/e260c865c218f00e4ad0c445dc45852e254d60c7)) +- Merge default Passport configuration ([#1039](https://github.com/laravel/passport/pull/1039), [e260c86](https://github.com/laravel/passport/commit/e260c865c218f00e4ad0c445dc45852e254d60c7)) ## [v7.3.1 (2019-07-02)](https://github.com/laravel/passport/compare/v7.3.0...v7.3.1) ### Changed -- Change server property type in `CheckClientCredentialForAnyScope` ([#1034](https://github.com/laravel/passport/pull/1034)) +- Change server property type in `CheckClientCredentialForAnyScope` ([#1034](https://github.com/laravel/passport/pull/1034)) ## [v7.3.0 (2019-05-28)](https://github.com/laravel/passport/compare/v7.2.2...v7.3.0) ### Added + - Allow first party clients to skip the authorization prompt ([#1022](https://github.com/laravel/passport/pull/1022)) ### Fixed -- Fix AccessToken docblock ([#996](https://github.com/laravel/passport/pull/996)) +- Fix AccessToken docblock ([#996](https://github.com/laravel/passport/pull/996)) ## [v7.2.2 (2019-03-13)](https://github.com/laravel/passport/compare/v7.2.1...v7.2.2) ### Fixed -- Allow installs of zend-diactoros 2 ([c0c3fca](https://github.com/laravel/passport/commit/c0c3fca80d8f5af90dcbf65e62bdd1abee9ac25d)) +- Allow installs of zend-diactoros 2 ([c0c3fca](https://github.com/laravel/passport/commit/c0c3fca80d8f5af90dcbf65e62bdd1abee9ac25d)) ## [v7.2.1 (2019-03-12)](https://github.com/laravel/passport/compare/v7.2.0...v7.2.1) ### Fixed -- Change `wasRecentlyCreated` to `false` ([#979](https://github.com/laravel/passport/pull/979)) +- Change `wasRecentlyCreated` to `false` ([#979](https://github.com/laravel/passport/pull/979)) ## [v7.2.0 (2019-02-14)](https://github.com/laravel/passport/compare/v7.1.0...v7.2.0) ### Changed + - Changed the way to get action path from `url()` to `route()` ([#950](https://github.com/laravel/passport/pull/950)) - Allow `'*'` scope to be used with Client Credentials ([#949](https://github.com/laravel/passport/pull/949)) ### Fixed -- Replace `fire()` with `dispatch()` ([#952](https://github.com/laravel/passport/pull/952)) +- Replace `fire()` with `dispatch()` ([#952](https://github.com/laravel/passport/pull/952)) ## [v7.1.0 (2019-01-22)](https://github.com/laravel/passport/compare/v7.0.5...v7.1.0) ### Added + - Added `redirect_uri` and `user_id` options to cli ([#921](https://github.com/laravel/passport/pull/921), [8b8570c](https://github.com/laravel/passport/commit/8b8570cc297ac7216d8f8caebb78a1e916093458)) - Add `ext-json` dependency ([#940](https://github.com/laravel/passport/pull/940)) ### Changed + - Make name an optional question ([#926](https://github.com/laravel/passport/pull/926)) ### Fixed + - Do not auto increment `AuthCode` ID ([#929](https://github.com/laravel/passport/pull/929)) - Allow multiple redirects when creating clients ([#928](https://github.com/laravel/passport/pull/928)) - Add responses for destroy methods ([#942](https://github.com/laravel/passport/pull/942)) - ## [v7.0.5 (2019-01-02)](https://github.com/laravel/passport/compare/v7.0.4...v7.0.5) ### Fixed -- Rename property ([#920](https://github.com/laravel/passport/pull/920)) +- Rename property ([#920](https://github.com/laravel/passport/pull/920)) ## [v7.0.4 (2018-12-31)](https://github.com/laravel/passport/compare/v7.0.3...v7.0.4) ### Added + - Add middleware CheckClientCredentialsForAnyScope ([#855](https://github.com/laravel/passport/pull/855)) - Support a default scope when no scope was requested by the client ([#879](https://github.com/laravel/passport/pull/879)) - Allow setting expiration of personal access tokens ([#919](https://github.com/laravel/passport/pull/919)) ### Changed + - Change auth code table to the model's table ([#865](https://github.com/laravel/passport/pull/865)) - Made whereRevoked consistent ([#868](https://github.com/laravel/passport/pull/868)) - Use unsignedInteger column type for `client_id` columns ([47f0021](https://github.com/laravel/passport/commit/47f00212c2f9b26ef6b90444facb8d8178b7dae6)) ### Fixed -- Prevent passing empty string variable to retrieveById method ([#861](https://github.com/laravel/passport/pull/861)) +- Prevent passing empty string variable to retrieveById method ([#861](https://github.com/laravel/passport/pull/861)) ## [v7.0.3 (2018-10-22)](https://github.com/laravel/passport/compare/v7.0.2...v7.0.3) ### Added + - Add names to routes for re-usability ([#846](https://github.com/laravel/passport/pull/846)) - Add user relationship to client model ([#851](https://github.com/laravel/passport/pull/851), [3213be8](https://github.com/laravel/passport/commit/3213be8c7c449037d1e5507f9b5ef1fb3ddb16a2)) - Add the ability to retrieve current client ([#854](https://github.com/laravel/passport/pull/854)) ### Fixed -- Fix migrations tag publish ([#832](https://github.com/laravel/passport/pull/832)) +- Fix migrations tag publish ([#832](https://github.com/laravel/passport/pull/832)) ## [v7.0.2 (2018-09-25)](https://github.com/laravel/passport/compare/v7.0.1...v7.0.2) ### Changed + - `Authcode` model is now used for persisting new authcodes ([#808](https://github.com/laravel/passport/pull/808)) - `resources/assets` directory was flattened ([#813](https://github.com/laravel/passport/pull/813)) ### Fixed -- Personal client exception ([#831](https://github.com/laravel/passport/pull/831), [7bb53d1](https://github.com/laravel/passport/commit/7bb53d1ae4f8f375cc9461d232053958740002da)) +- Personal client exception ([#831](https://github.com/laravel/passport/pull/831), [7bb53d1](https://github.com/laravel/passport/commit/7bb53d1ae4f8f375cc9461d232053958740002da)) ## [v7.0.1 (2018-08-13)](https://github.com/laravel/passport/compare/v7.0.0...v7.0.1) ### Added -- Add option to enable cookie serialization ([9012496](https://github.com/laravel/passport/commit/90124969cdd4ff39d4cd5a608c23bbe16e772f7e)) +- Add option to enable cookie serialization ([9012496](https://github.com/laravel/passport/commit/90124969cdd4ff39d4cd5a608c23bbe16e772f7e)) ## [v7.0.0 (2018-08-13)](https://github.com/laravel/passport/compare/v6.0.7...v7.0.0) ### Changed + - Don't serialize by default ([29e9d53](https://github.com/laravel/passport/commit/29e9d5312f3b11381f1fd472bde1fbbd73122cf1)) From 1039d8b4aa71c45dbea2f140b131cae8802237e7 Mon Sep 17 00:00:00 2001 From: Markus Machatschek Date: Wed, 23 Feb 2022 16:04:04 +0100 Subject: [PATCH 43/55] Use anonymous migrations (#1531) --- composer.json | 18 +++++++++--------- ...01_000001_create_oauth_auth_codes_table.php | 4 ++-- ...000002_create_oauth_access_tokens_table.php | 4 ++-- ...00003_create_oauth_refresh_tokens_table.php | 4 ++-- ...06_01_000004_create_oauth_clients_table.php | 4 ++-- ...ate_oauth_personal_access_clients_table.php | 4 ++-- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/composer.json b/composer.json index bea4a04..3a2df25 100644 --- a/composer.json +++ b/composer.json @@ -17,15 +17,15 @@ "php": "^7.3|^8.0", "ext-json": "*", "firebase/php-jwt": "^5.0", - "illuminate/auth": "^8.2|^9.0", - "illuminate/console": "^8.2|^9.0", - "illuminate/container": "^8.2|^9.0", - "illuminate/contracts": "^8.2|^9.0", - "illuminate/cookie": "^8.2|^9.0", - "illuminate/database": "^8.2|^9.0", - "illuminate/encryption": "^8.2|^9.0", - "illuminate/http": "^8.2|^9.0", - "illuminate/support": "^8.2|^9.0", + "illuminate/auth": "^8.37|^9.0", + "illuminate/console": "^8.37|^9.0", + "illuminate/container": "^8.37|^9.0", + "illuminate/contracts": "^8.37|^9.0", + "illuminate/cookie": "^8.37|^9.0", + "illuminate/database": "^8.37|^9.0", + "illuminate/encryption": "^8.37|^9.0", + "illuminate/http": "^8.37|^9.0", + "illuminate/support": "^8.37|^9.0", "lcobucci/jwt": "^3.4|^4.0", "league/oauth2-server": "^8.2", "nyholm/psr7": "^1.3", diff --git a/database/migrations/2016_06_01_000001_create_oauth_auth_codes_table.php b/database/migrations/2016_06_01_000001_create_oauth_auth_codes_table.php index 0eabf05..195685f 100644 --- a/database/migrations/2016_06_01_000001_create_oauth_auth_codes_table.php +++ b/database/migrations/2016_06_01_000001_create_oauth_auth_codes_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateOauthAuthCodesTable extends Migration +return new class extends Migration { /** * The database schema. @@ -59,4 +59,4 @@ public function getConnection() { return config('passport.storage.database.connection'); } -} +}; diff --git a/database/migrations/2016_06_01_000002_create_oauth_access_tokens_table.php b/database/migrations/2016_06_01_000002_create_oauth_access_tokens_table.php index 67c682d..c8ecd72 100644 --- a/database/migrations/2016_06_01_000002_create_oauth_access_tokens_table.php +++ b/database/migrations/2016_06_01_000002_create_oauth_access_tokens_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateOauthAccessTokensTable extends Migration +return new class extends Migration { /** * The database schema. @@ -61,4 +61,4 @@ public function getConnection() { return config('passport.storage.database.connection'); } -} +}; diff --git a/database/migrations/2016_06_01_000003_create_oauth_refresh_tokens_table.php b/database/migrations/2016_06_01_000003_create_oauth_refresh_tokens_table.php index b4ac095..998b631 100644 --- a/database/migrations/2016_06_01_000003_create_oauth_refresh_tokens_table.php +++ b/database/migrations/2016_06_01_000003_create_oauth_refresh_tokens_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateOauthRefreshTokensTable extends Migration +return new class extends Migration { /** * The database schema. @@ -57,4 +57,4 @@ public function getConnection() { return config('passport.storage.database.connection'); } -} +}; diff --git a/database/migrations/2016_06_01_000004_create_oauth_clients_table.php b/database/migrations/2016_06_01_000004_create_oauth_clients_table.php index 6ce3d99..51e597c 100644 --- a/database/migrations/2016_06_01_000004_create_oauth_clients_table.php +++ b/database/migrations/2016_06_01_000004_create_oauth_clients_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateOauthClientsTable extends Migration +return new class extends Migration { /** * The database schema. @@ -63,4 +63,4 @@ public function down() { $this->schema->dropIfExists('oauth_clients'); } -} +}; diff --git a/database/migrations/2016_06_01_000005_create_oauth_personal_access_clients_table.php b/database/migrations/2016_06_01_000005_create_oauth_personal_access_clients_table.php index c408248..e12920a 100644 --- a/database/migrations/2016_06_01_000005_create_oauth_personal_access_clients_table.php +++ b/database/migrations/2016_06_01_000005_create_oauth_personal_access_clients_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateOauthPersonalAccessClientsTable extends Migration +return new class extends Migration { /** * The database schema. @@ -56,4 +56,4 @@ public function getConnection() { return config('passport.storage.database.connection'); } -} +}; From 3ef9e2b8d7b1ccab128084fe51b95ff06c9e2d72 Mon Sep 17 00:00:00 2001 From: driesvints Date: Tue, 8 Mar 2022 16:31:48 +0000 Subject: [PATCH 44/55] Update CHANGELOG.md --- CHANGELOG.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b2668f..12d4074 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Release Notes -## [Unreleased](https://github.com/laravel/passport/compare/v10.3.2...10.x) +## [Unreleased](https://github.com/laravel/passport/compare/v10.3.3...10.x) + +## [v10.3.3](https://github.com/laravel/passport/compare/v10.3.2...v10.3.3) - 2022-03-08 + +### Changed + +- Use anonymous migrations by @mmachatschek in https://github.com/laravel/passport/pull/1531 ## [v10.3.2](https://github.com/laravel/passport/compare/v10.3.1...v10.3.2) - 2022-02-22 From 61832d38eb788a0953d70a756557de2ff9af1a3c Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Thu, 17 Mar 2022 10:54:22 +0100 Subject: [PATCH 45/55] Update .styleci.yml --- .styleci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.styleci.yml b/.styleci.yml index 215fbcf..e101e8c 100644 --- a/.styleci.yml +++ b/.styleci.yml @@ -1,4 +1,5 @@ php: preset: laravel + version: 8.1 js: true css: true From f1741c3c1ade298aeb4ed03242af2b5ae2dc47b6 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Thu, 17 Mar 2022 11:06:46 +0100 Subject: [PATCH 46/55] Update .styleci.yml --- .styleci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.styleci.yml b/.styleci.yml index e101e8c..215fbcf 100644 --- a/.styleci.yml +++ b/.styleci.yml @@ -1,5 +1,4 @@ php: preset: laravel - version: 8.1 js: true css: true From 31e4ec6a66b9b92dc5b67cea7c2ee03c7c135064 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Wed, 23 Mar 2022 13:35:12 +0100 Subject: [PATCH 47/55] Update update-changelog.yml --- .github/workflows/update-changelog.yml | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml index 0200e2b..eaeaf1f 100644 --- a/.github/workflows/update-changelog.yml +++ b/.github/workflows/update-changelog.yml @@ -6,24 +6,4 @@ on: jobs: update: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - with: - ref: ${{ github.ref_name }} - - - name: Update Changelog - uses: stefanzweifel/changelog-updater-action@v1 - with: - latest-version: ${{ github.event.release.tag_name }} - release-notes: ${{ github.event.release.body }} - compare-url-target-revision: ${{ github.event.release.target_commitish }} - - - name: Commit updated CHANGELOG - uses: stefanzweifel/git-auto-commit-action@v4 - with: - branch: ${{ github.event.release.target_commitish }} - commit_message: Update CHANGELOG.md - file_pattern: CHANGELOG.md + uses: laravel/.github/.github/workflows/update-changelog.yml@main From 5bb6637cb5bf397381be4542719ea3694c808dcd Mon Sep 17 00:00:00 2001 From: David Kanenwisher Date: Wed, 30 Mar 2022 09:42:50 -0500 Subject: [PATCH 48/55] Upgrade firebase/php-jwt to ^6.0 (#1538) The firebase/php-jwt recently had to make breaking changes to resolve a security flaw in their library. This change upgrades that library and fixes the code that broke with the upgrade. --- composer.json | 2 +- src/ApiTokenCookieFactory.php | 2 +- src/Guards/TokenGuard.php | 4 ++-- tests/Unit/TokenGuardTest.php | 18 +++++++++--------- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/composer.json b/composer.json index 3a2df25..0ebd938 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "require": { "php": "^7.3|^8.0", "ext-json": "*", - "firebase/php-jwt": "^5.0", + "firebase/php-jwt": "^6.0", "illuminate/auth": "^8.37|^9.0", "illuminate/console": "^8.37|^9.0", "illuminate/container": "^8.37|^9.0", diff --git a/src/ApiTokenCookieFactory.php b/src/ApiTokenCookieFactory.php index 3d7d83d..ffed5d1 100644 --- a/src/ApiTokenCookieFactory.php +++ b/src/ApiTokenCookieFactory.php @@ -77,6 +77,6 @@ protected function createToken($userId, $csrfToken, Carbon $expiration) 'sub' => $userId, 'csrf' => $csrfToken, 'expiry' => $expiration->getTimestamp(), - ], Passport::tokenEncryptionKey($this->encrypter)); + ], Passport::tokenEncryptionKey($this->encrypter), 'HS256'); } } diff --git a/src/Guards/TokenGuard.php b/src/Guards/TokenGuard.php index 00cbe48..921223e 100644 --- a/src/Guards/TokenGuard.php +++ b/src/Guards/TokenGuard.php @@ -4,6 +4,7 @@ use Exception; use Firebase\JWT\JWT; +use Firebase\JWT\Key; use Illuminate\Container\Container; use Illuminate\Contracts\Debug\ExceptionHandler; use Illuminate\Contracts\Encryption\Encrypter; @@ -269,8 +270,7 @@ protected function decodeJwtTokenCookie($request) { return (array) JWT::decode( CookieValuePrefix::remove($this->encrypter->decrypt($request->cookie(Passport::cookie()), Passport::$unserializesCookies)), - Passport::tokenEncryptionKey($this->encrypter), - ['HS256'] + new Key(Passport::tokenEncryptionKey($this->encrypter), 'HS256') ); } diff --git a/tests/Unit/TokenGuardTest.php b/tests/Unit/TokenGuardTest.php index b586eff..83608d8 100644 --- a/tests/Unit/TokenGuardTest.php +++ b/tests/Unit/TokenGuardTest.php @@ -134,7 +134,7 @@ public function test_users_may_be_retrieved_from_cookies_with_csrf_token_header( 'aud' => 1, 'csrf' => 'token', 'expiry' => Carbon::now()->addMinutes(10)->getTimestamp(), - ], str_repeat('a', 16)), false) + ], str_repeat('a', 16), 'HS256'), false) ); $userProvider->shouldReceive('retrieveById')->with(1)->andReturn($expectedUser = new TokenGuardTestUser); @@ -167,7 +167,7 @@ public function test_users_may_be_retrieved_from_cookies_with_xsrf_token_header( 'aud' => 1, 'csrf' => 'token', 'expiry' => Carbon::now()->addMinutes(10)->getTimestamp(), - ], str_repeat('a', 16)), false) + ], str_repeat('a', 16), 'HS256'), false) ); $userProvider->shouldReceive('retrieveById')->with(1)->andReturn($expectedUser = new TokenGuardTestUser); @@ -196,7 +196,7 @@ public function test_cookie_xsrf_is_verified_against_csrf_token_header() 'aud' => 1, 'csrf' => 'token', 'expiry' => Carbon::now()->addMinutes(10)->getTimestamp(), - ], str_repeat('a', 16))) + ], str_repeat('a', 16), 'HS256')) ); $userProvider->shouldReceive('retrieveById')->never(); @@ -222,7 +222,7 @@ public function test_cookie_xsrf_is_verified_against_xsrf_token_header() 'aud' => 1, 'csrf' => 'token', 'expiry' => Carbon::now()->addMinutes(10)->getTimestamp(), - ], str_repeat('a', 16))) + ], str_repeat('a', 16), 'HS256')) ); $userProvider->shouldReceive('retrieveById')->never(); @@ -256,7 +256,7 @@ public function test_users_may_be_retrieved_from_cookies_with_xsrf_token_header_ 'aud' => 1, 'csrf' => 'token', 'expiry' => Carbon::now()->addMinutes(10)->getTimestamp(), - ], Passport::tokenEncryptionKey($encrypter)), false) + ], Passport::tokenEncryptionKey($encrypter), 'HS256'), false) ); $userProvider->shouldReceive('retrieveById')->with(1)->andReturn($expectedUser = new TokenGuardTestUser); @@ -288,7 +288,7 @@ public function test_xsrf_token_cookie_without_a_token_header_is_not_accepted() 'aud' => 1, 'csrf' => 'token', 'expiry' => Carbon::now()->addMinutes(10)->getTimestamp(), - ], str_repeat('a', 16))) + ], str_repeat('a', 16), 'HS256')) ); $userProvider->shouldReceive('retrieveById')->never(); @@ -314,7 +314,7 @@ public function test_expired_cookies_may_not_be_used() 'aud' => 1, 'csrf' => 'token', 'expiry' => Carbon::now()->subMinutes(10)->getTimestamp(), - ], str_repeat('a', 16))) + ], str_repeat('a', 16), 'HS256')) ); $userProvider->shouldReceive('retrieveById')->never(); @@ -344,7 +344,7 @@ public function test_csrf_check_can_be_disabled() 'sub' => 1, 'aud' => 1, 'expiry' => Carbon::now()->addMinutes(10)->getTimestamp(), - ], str_repeat('a', 16)), false) + ], str_repeat('a', 16), 'HS256'), false) ); $userProvider->shouldReceive('retrieveById')->with(1)->andReturn($expectedUser = new TokenGuardTestUser); @@ -443,7 +443,7 @@ public function test_clients_may_be_retrieved_from_cookies() 'aud' => 1, 'csrf' => 'token', 'expiry' => Carbon::now()->addMinutes(10)->getTimestamp(), - ], str_repeat('a', 16)), false) + ], str_repeat('a', 16), 'HS256'), false) ); $clients->shouldReceive('findActive')->with(1)->andReturn($expectedClient = new TokenGuardTestClient); From 1d6280e7280c11cbfc8e550db80d531fd55f599b Mon Sep 17 00:00:00 2001 From: driesvints Date: Tue, 5 Apr 2022 15:30:12 +0000 Subject: [PATCH 49/55] Update CHANGELOG --- CHANGELOG.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12d4074..f6e9728 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Release Notes -## [Unreleased](https://github.com/laravel/passport/compare/v10.3.3...10.x) +## [Unreleased](https://github.com/laravel/passport/compare/v10.4.0...10.x) + +## [v10.4.0](https://github.com/laravel/passport/compare/v10.3.3...v10.4.0) - 2022-03-30 + +### Changed + +- Upgrade firebase/php-jwt to ^6.0 by @prufrock in https://github.com/laravel/passport/pull/1538 ## [v10.3.3](https://github.com/laravel/passport/compare/v10.3.2...v10.3.3) - 2022-03-08 From abd3f11fb368a7cd5d3ac31f88d5f09aadf24789 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Fri, 8 Apr 2022 11:06:34 +0200 Subject: [PATCH 50/55] Create pull-requests.yml --- .github/workflows/pull-requests.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/workflows/pull-requests.yml diff --git a/.github/workflows/pull-requests.yml b/.github/workflows/pull-requests.yml new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.github/workflows/pull-requests.yml @@ -0,0 +1 @@ + From c9591e4df43321834c549d1cec0a5483797c5ef2 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Fri, 8 Apr 2022 11:15:58 +0200 Subject: [PATCH 51/55] Update pull-requests.yml --- .github/workflows/pull-requests.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/pull-requests.yml b/.github/workflows/pull-requests.yml index 8b13789..156b46e 100644 --- a/.github/workflows/pull-requests.yml +++ b/.github/workflows/pull-requests.yml @@ -1 +1,13 @@ +name: Pull Requests +on: + pull_request_target: + types: + - opened + +permissions: + pull-requests: write + +jobs: + uneditable: + uses: laravel/.github/.github/workflows/pull-requests.yml@main From 499d68d3dcbd7680562379c2a6ee616200e558e5 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Fri, 8 Apr 2022 15:37:16 +0200 Subject: [PATCH 52/55] Update tests.yml (#1540) --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2d0bcbc..64514f8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -32,6 +32,7 @@ jobs: with: php-version: ${{ matrix.php }} extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick + ini-values: error_reporting=E_ALL tools: composer:v2 coverage: none From 6e39bb046f08e45d70dcd6ca97e5b6689e5f3051 Mon Sep 17 00:00:00 2001 From: vic Date: Sat, 16 Apr 2022 06:37:53 -0700 Subject: [PATCH 53/55] [ADD] new URI Rule to validate URI and use it to RedirectRule (#1544) --- src/Http/Rules/RedirectRule.php | 5 +++-- src/Http/Rules/UriRule.php | 28 ++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 src/Http/Rules/UriRule.php diff --git a/src/Http/Rules/RedirectRule.php b/src/Http/Rules/RedirectRule.php index dd8b997..ab0346c 100644 --- a/src/Http/Rules/RedirectRule.php +++ b/src/Http/Rules/RedirectRule.php @@ -4,6 +4,7 @@ use Illuminate\Contracts\Validation\Factory; use Illuminate\Contracts\Validation\Rule; +use Laravel\Passport\Http\Rules\UriRule; class RedirectRule implements Rule { @@ -31,7 +32,7 @@ public function __construct(Factory $validator) public function passes($attribute, $value) { foreach (explode(',', $value) as $redirect) { - $validator = $this->validator->make(['redirect' => $redirect], ['redirect' => 'url']); + $validator = $this->validator->make(['redirect' => $redirect], ['redirect' => new UriRule]); if ($validator->fails()) { return false; @@ -46,6 +47,6 @@ public function passes($attribute, $value) */ public function message() { - return 'One or more redirects have an invalid url format.'; + return 'One or more redirects have an invalid URI format.'; } } diff --git a/src/Http/Rules/UriRule.php b/src/Http/Rules/UriRule.php new file mode 100644 index 0000000..f6d02c6 --- /dev/null +++ b/src/Http/Rules/UriRule.php @@ -0,0 +1,28 @@ + Date: Sat, 16 Apr 2022 13:38:08 +0000 Subject: [PATCH 54/55] Apply fixes from StyleCI --- src/Http/Rules/RedirectRule.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Http/Rules/RedirectRule.php b/src/Http/Rules/RedirectRule.php index ab0346c..e14d11c 100644 --- a/src/Http/Rules/RedirectRule.php +++ b/src/Http/Rules/RedirectRule.php @@ -4,7 +4,6 @@ use Illuminate\Contracts\Validation\Factory; use Illuminate\Contracts\Validation\Rule; -use Laravel\Passport\Http\Rules\UriRule; class RedirectRule implements Rule { From 535c37c7033c4d818260bf22ae9cf72ed25fcaf1 Mon Sep 17 00:00:00 2001 From: Orlando Cavassani Date: Wed, 21 Dec 2022 11:13:32 -0300 Subject: [PATCH 55/55] chore(deps): bump mongolid and mongolid-laravel to version 3.4 --- .github/workflows/push.yml | 3 +- composer.json | 14 +- composer.lock | 1017 +++++++++++++++++---------- docker-compose.override.yml.example | 10 + docker/php/Dockerfile | 27 +- 5 files changed, 706 insertions(+), 365 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 304fe17..6aafc97 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -9,8 +9,9 @@ jobs: strategy: matrix: php: - - "7.3" - "7.4" + - "8.0" + - "8.1" services: db: image: mongo:4.2 diff --git a/composer.json b/composer.json index cd6d736..9fb2577 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ } ], "require": { - "php": "^7.3", + "php": ">=7.4", "ext-json": "*", "ext-mongodb": "*", "firebase/php-jwt": "^5.0", @@ -33,17 +33,17 @@ "illuminate/support": "^8.2", "lcobucci/jwt": "^3.4|^4.0", "league/oauth2-server": "~8.2.0", - "leroy-merlin-br/mongolid": "v3.3-beta2", - "leroy-merlin-br/mongolid-laravel": "v3.3-beta2", - "mongodb/mongodb": "1.8.0", + "leroy-merlin-br/mongolid": "v3.4", + "leroy-merlin-br/mongolid-laravel": "dev-chore/bump-mongolid-version", + "mongodb/mongodb": "1.15.0", "nyholm/psr7": "^1.3", "phpseclib/phpseclib": "^2.0", "symfony/psr-http-message-bridge": "^2.0" }, "require-dev": { - "mockery/mockery": "^1.0", - "orchestra/testbench": "^6.0", - "phpunit/phpunit": "^9.3" + "mockery/mockery": "^1.5.1", + "orchestra/testbench": "^6.25.1", + "phpunit/phpunit": "^9.5.27" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index dd04e43..f405020 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": "ca8f6de6fdbf0285a23d55b33d3dc721", + "content-hash": "509ad4e65814c23f74a2feabe07bde6c", "packages": [ { "name": "brick/math", @@ -66,79 +66,6 @@ ], "time": "2021-08-15T20:50:18+00:00" }, - { - "name": "composer/package-versions-deprecated", - "version": "1.11.99.5", - "source": { - "type": "git", - "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d", - "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.1.0 || ^2.0", - "php": "^7 || ^8" - }, - "replace": { - "ocramius/package-versions": "1.11.99" - }, - "require-dev": { - "composer/composer": "^1.9.3 || ^2.0@dev", - "ext-zip": "^1.13", - "phpunit/phpunit": "^6.5 || ^7" - }, - "type": "composer-plugin", - "extra": { - "class": "PackageVersions\\Installer", - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "PackageVersions\\": "src/PackageVersions" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be" - } - ], - "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", - "support": { - "issues": "https://github.com/composer/package-versions-deprecated/issues", - "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.5" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-01-17T14:14:24+00:00" - }, { "name": "defuse/php-encryption", "version": "v2.3.1", @@ -205,25 +132,100 @@ }, "time": "2021-04-09T23:57:26+00:00" }, + { + "name": "dflydev/dot-access-data", + "version": "v3.0.2", + "source": { + "type": "git", + "url": "https://github.com/dflydev/dflydev-dot-access-data.git", + "reference": "f41715465d65213d644d3141a6a93081be5d3549" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/f41715465d65213d644d3141a6a93081be5d3549", + "reference": "f41715465d65213d644d3141a6a93081be5d3549", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.42", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.3", + "scrutinizer/ocular": "1.6.0", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^4.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Dflydev\\DotAccessData\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dragonfly Development Inc.", + "email": "info@dflydev.com", + "homepage": "http://dflydev.com" + }, + { + "name": "Beau Simensen", + "email": "beau@dflydev.com", + "homepage": "http://beausimensen.com" + }, + { + "name": "Carlos Frutos", + "email": "carlos@kiwing.it", + "homepage": "https://github.com/cfrutos" + }, + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com" + } + ], + "description": "Given a deep data structure, access data by dot notation.", + "homepage": "https://github.com/dflydev/dflydev-dot-access-data", + "keywords": [ + "access", + "data", + "dot", + "notation" + ], + "support": { + "issues": "https://github.com/dflydev/dflydev-dot-access-data/issues", + "source": "https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.2" + }, + "time": "2022-10-27T11:44:00+00:00" + }, { "name": "doctrine/inflector", - "version": "2.0.5", + "version": "2.0.6", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "ade2b3bbfb776f27f0558e26eed43b5d9fe1b392" + "reference": "d9d313a36c872fd6ee06d9a6cbcf713eaa40f024" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/ade2b3bbfb776f27f0558e26eed43b5d9fe1b392", - "reference": "ade2b3bbfb776f27f0558e26eed43b5d9fe1b392", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/d9d313a36c872fd6ee06d9a6cbcf713eaa40f024", + "reference": "d9d313a36c872fd6ee06d9a6cbcf713eaa40f024", "shasum": "" }, "require": { "php": "^7.2 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9", + "doctrine/coding-standard": "^10", "phpstan/phpstan": "^1.8", "phpstan/phpstan-phpunit": "^1.1", "phpstan/phpstan-strict-rules": "^1.3", @@ -278,7 +280,7 @@ ], "support": { "issues": "https://github.com/doctrine/inflector/issues", - "source": "https://github.com/doctrine/inflector/tree/2.0.5" + "source": "https://github.com/doctrine/inflector/tree/2.0.6" }, "funding": [ { @@ -294,7 +296,7 @@ "type": "tidelift" } ], - "time": "2022-09-07T09:01:28+00:00" + "time": "2022-10-20T09:10:12+00:00" }, { "name": "doctrine/lexer", @@ -622,24 +624,28 @@ }, { "name": "jean85/pretty-package-versions", - "version": "1.6.0", + "version": "2.0.5", "source": { "type": "git", "url": "https://github.com/Jean85/pretty-package-versions.git", - "reference": "1e0104b46f045868f11942aea058cd7186d6c303" + "reference": "ae547e455a3d8babd07b96966b17d7fd21d9c6af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/1e0104b46f045868f11942aea058cd7186d6c303", - "reference": "1e0104b46f045868f11942aea058cd7186d6c303", + "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/ae547e455a3d8babd07b96966b17d7fd21d9c6af", + "reference": "ae547e455a3d8babd07b96966b17d7fd21d9c6af", "shasum": "" }, "require": { - "composer/package-versions-deprecated": "^1.8.0", - "php": "^7.0|^8.0" + "composer-runtime-api": "^2.0.0", + "php": "^7.1|^8.0" }, "require-dev": { - "phpunit/phpunit": "^6.0|^8.5|^9.2" + "friendsofphp/php-cs-fixer": "^2.17", + "jean85/composer-provided-replaced-stub-package": "^1.0", + "phpstan/phpstan": "^0.12.66", + "phpunit/phpunit": "^7.5|^8.5|^9.4", + "vimeo/psalm": "^4.3" }, "type": "library", "extra": { @@ -662,7 +668,7 @@ "email": "alessandro.lai85@gmail.com" } ], - "description": "A wrapper for ocramius/package-versions to get pretty versions strings", + "description": "A library to get pretty versions strings of installed dependencies", "keywords": [ "composer", "package", @@ -671,22 +677,22 @@ ], "support": { "issues": "https://github.com/Jean85/pretty-package-versions/issues", - "source": "https://github.com/Jean85/pretty-package-versions/tree/1.6.0" + "source": "https://github.com/Jean85/pretty-package-versions/tree/2.0.5" }, - "time": "2021-02-04T16:20:16+00:00" + "time": "2021-10-08T21:21:46+00:00" }, { "name": "laravel/framework", - "version": "v8.83.25", + "version": "v8.83.27", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "b77b908a9426efa41d6286a2ef4c3adbf5398ca1" + "reference": "e1afe088b4ca613fb96dc57e6d8dbcb8cc2c6b49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/b77b908a9426efa41d6286a2ef4c3adbf5398ca1", - "reference": "b77b908a9426efa41d6286a2ef4c3adbf5398ca1", + "url": "https://api.github.com/repos/laravel/framework/zipball/e1afe088b4ca613fb96dc57e6d8dbcb8cc2c6b49", + "reference": "e1afe088b4ca613fb96dc57e6d8dbcb8cc2c6b49", "shasum": "" }, "require": { @@ -846,7 +852,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2022-09-30T13:00:40+00:00" + "time": "2022-12-08T15:28:55+00:00" }, { "name": "laravel/serializable-closure", @@ -908,47 +914,105 @@ }, "time": "2022-09-08T13:45:54+00:00" }, + { + "name": "lcobucci/clock", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/lcobucci/clock.git", + "reference": "353d83fe2e6ae95745b16b3d911813df6a05bfb3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/lcobucci/clock/zipball/353d83fe2e6ae95745b16b3d911813df6a05bfb3", + "reference": "353d83fe2e6ae95745b16b3d911813df6a05bfb3", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "infection/infection": "^0.17", + "lcobucci/coding-standard": "^6.0", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-deprecation-rules": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpstan/phpstan-strict-rules": "^0.12", + "phpunit/php-code-coverage": "9.1.4", + "phpunit/phpunit": "9.3.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "Lcobucci\\Clock\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Luís Cobucci", + "email": "lcobucci@gmail.com" + } + ], + "description": "Yet another clock abstraction", + "support": { + "issues": "https://github.com/lcobucci/clock/issues", + "source": "https://github.com/lcobucci/clock/tree/2.0.x" + }, + "funding": [ + { + "url": "https://github.com/lcobucci", + "type": "github" + }, + { + "url": "https://www.patreon.com/lcobucci", + "type": "patreon" + } + ], + "time": "2020-08-27T18:56:02+00:00" + }, { "name": "lcobucci/jwt", - "version": "3.4.6", + "version": "4.2.1", "source": { "type": "git", "url": "https://github.com/lcobucci/jwt.git", - "reference": "3ef8657a78278dfeae7707d51747251db4176240" + "reference": "72ac6d807ee51a70ad376ee03a2387e8646e10f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lcobucci/jwt/zipball/3ef8657a78278dfeae7707d51747251db4176240", - "reference": "3ef8657a78278dfeae7707d51747251db4176240", + "url": "https://api.github.com/repos/lcobucci/jwt/zipball/72ac6d807ee51a70ad376ee03a2387e8646e10f3", + "reference": "72ac6d807ee51a70ad376ee03a2387e8646e10f3", "shasum": "" }, "require": { + "ext-hash": "*", + "ext-json": "*", "ext-mbstring": "*", "ext-openssl": "*", - "php": "^5.6 || ^7.0" + "ext-sodium": "*", + "lcobucci/clock": "^2.0", + "php": "^7.4 || ^8.0" }, "require-dev": { - "mikey179/vfsstream": "~1.5", - "phpmd/phpmd": "~2.2", - "phpunit/php-invoker": "~1.1", - "phpunit/phpunit": "^5.7 || ^7.3", - "squizlabs/php_codesniffer": "~2.3" - }, - "suggest": { - "lcobucci/clock": "*" + "infection/infection": "^0.21", + "lcobucci/coding-standard": "^6.0", + "mikey179/vfsstream": "^1.6.7", + "phpbench/phpbench": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/php-invoker": "^3.1", + "phpunit/phpunit": "^9.5" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, "autoload": { - "files": [ - "compat/class-aliases.php", - "compat/json-exception-polyfill.php", - "compat/lcobucci-clock-polyfill.php" - ], "psr-4": { "Lcobucci\\JWT\\": "src" } @@ -959,7 +1023,7 @@ ], "authors": [ { - "name": "Luís Otávio Cobucci Oblonczyk", + "name": "Luís Cobucci", "email": "lcobucci@gmail.com", "role": "Developer" } @@ -971,7 +1035,7 @@ ], "support": { "issues": "https://github.com/lcobucci/jwt/issues", - "source": "https://github.com/lcobucci/jwt/tree/3.4.6" + "source": "https://github.com/lcobucci/jwt/tree/4.2.1" }, "funding": [ { @@ -983,46 +1047,58 @@ "type": "patreon" } ], - "time": "2021-09-28T19:18:28+00:00" + "time": "2022-08-19T23:14:07+00:00" }, { "name": "league/commonmark", - "version": "1.6.7", + "version": "2.3.8", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "2b8185c13bc9578367a5bf901881d1c1b5bbd09b" + "reference": "c493585c130544c4e91d2e0e131e6d35cb0cbc47" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/2b8185c13bc9578367a5bf901881d1c1b5bbd09b", - "reference": "2b8185c13bc9578367a5bf901881d1c1b5bbd09b", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/c493585c130544c4e91d2e0e131e6d35cb0cbc47", + "reference": "c493585c130544c4e91d2e0e131e6d35cb0cbc47", "shasum": "" }, "require": { "ext-mbstring": "*", - "php": "^7.1 || ^8.0" - }, - "conflict": { - "scrutinizer/ocular": "1.7.*" + "league/config": "^1.1.1", + "php": "^7.4 || ^8.0", + "psr/event-dispatcher": "^1.0", + "symfony/deprecation-contracts": "^2.1 || ^3.0", + "symfony/polyfill-php80": "^1.16" }, "require-dev": { - "cebe/markdown": "~1.0", - "commonmark/commonmark.js": "0.29.2", - "erusev/parsedown": "~1.0", + "cebe/markdown": "^1.0", + "commonmark/cmark": "0.30.0", + "commonmark/commonmark.js": "0.30.0", + "composer/package-versions-deprecated": "^1.8", + "embed/embed": "^4.4", + "erusev/parsedown": "^1.0", "ext-json": "*", "github/gfm": "0.29.0", - "michelf/php-markdown": "~1.4", - "mikehaertl/php-shellcommand": "^1.4", - "phpstan/phpstan": "^0.12.90", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.2", - "scrutinizer/ocular": "^1.5", - "symfony/finder": "^4.2" + "michelf/php-markdown": "^1.4 || ^2.0", + "nyholm/psr7": "^1.5", + "phpstan/phpstan": "^1.8.2", + "phpunit/phpunit": "^9.5.21", + "scrutinizer/ocular": "^1.8.1", + "symfony/finder": "^5.3 | ^6.0", + "symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0", + "unleashedtech/php-coding-standard": "^3.1.1", + "vimeo/psalm": "^4.24.0 || ^5.0.0" + }, + "suggest": { + "symfony/yaml": "v2.3+ required if using the Front Matter extension" }, - "bin": [ - "bin/commonmark" - ], "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.4-dev" + } + }, "autoload": { "psr-4": { "League\\CommonMark\\": "src" @@ -1040,7 +1116,7 @@ "role": "Lead Developer" } ], - "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and Github-Flavored Markdown (GFM)", + "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)", "homepage": "https://commonmark.thephpleague.com", "keywords": [ "commonmark", @@ -1054,6 +1130,7 @@ ], "support": { "docs": "https://commonmark.thephpleague.com/", + "forum": "https://github.com/thephpleague/commonmark/discussions", "issues": "https://github.com/thephpleague/commonmark/issues", "rss": "https://github.com/thephpleague/commonmark/releases.atom", "source": "https://github.com/thephpleague/commonmark" @@ -1076,7 +1153,89 @@ "type": "tidelift" } ], - "time": "2022-01-13T17:18:13+00:00" + "time": "2022-12-10T16:02:17+00:00" + }, + { + "name": "league/config", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/config.git", + "reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/config/zipball/754b3604fb2984c71f4af4a9cbe7b57f346ec1f3", + "reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3", + "shasum": "" + }, + "require": { + "dflydev/dot-access-data": "^3.0.1", + "nette/schema": "^1.2", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.8.2", + "phpunit/phpunit": "^9.5.5", + "scrutinizer/ocular": "^1.8.1", + "unleashedtech/php-coding-standard": "^3.1", + "vimeo/psalm": "^4.7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Config\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com", + "role": "Lead Developer" + } + ], + "description": "Define configuration arrays with strict schemas and access values with dot notation", + "homepage": "https://config.thephpleague.com", + "keywords": [ + "array", + "config", + "configuration", + "dot", + "dot-access", + "nested", + "schema" + ], + "support": { + "docs": "https://config.thephpleague.com/", + "issues": "https://github.com/thephpleague/config/issues", + "rss": "https://github.com/thephpleague/config/releases.atom", + "source": "https://github.com/thephpleague/config" + }, + "funding": [ + { + "url": "https://www.colinodell.com/sponsor", + "type": "custom" + }, + { + "url": "https://www.paypal.me/colinpodell/10.00", + "type": "custom" + }, + { + "url": "https://github.com/colinodell", + "type": "github" + } + ], + "time": "2022-12-11T20:36:23+00:00" }, { "name": "league/event", @@ -1371,30 +1530,30 @@ }, { "name": "leroy-merlin-br/mongolid", - "version": "v3.3-beta2", + "version": "v3.4", "source": { "type": "git", "url": "git@github.com:leroy-merlin-br/mongolid.git", - "reference": "ef24af9a4e243cdafd7cfd089a0d43af90d72c9e" + "reference": "d0ede8b61b74a1ce66499570594806522788c15c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/leroy-merlin-br/mongolid/zipball/ef24af9a4e243cdafd7cfd089a0d43af90d72c9e", - "reference": "ef24af9a4e243cdafd7cfd089a0d43af90d72c9e", + "url": "https://api.github.com/repos/leroy-merlin-br/mongolid/zipball/d0ede8b61b74a1ce66499570594806522788c15c", + "reference": "d0ede8b61b74a1ce66499570594806522788c15c", "shasum": "" }, "require": { "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.4", - "php": ">=7.3" + "mongodb/mongodb": "^1.15", + "php": ">=7.4" }, "require-dev": { - "leroy-merlin-br/coding-standard": "^3.0.2", + "leroy-merlin-br/coding-standard": "^3.1.0", "mockery/mockery": "^1.5.1", - "phpunit/phpunit": "^9.5.24", - "symfony/var-dumper": "^5.4.11" + "phpunit/phpunit": "^9.5.27", + "symfony/var-dumper": "^5.4.14" }, "suggest": { "leroy-merlin-br/mongolid-laravel": "Easy, powerful and ultrafast MongoDB ODM for Laravel." @@ -1437,34 +1596,34 @@ "nosql", "odm" ], - "time": "2022-10-18T21:10:07+00:00" + "time": "2022-12-21T12:14:18+00:00" }, { "name": "leroy-merlin-br/mongolid-laravel", - "version": "v3.3-beta2", + "version": "dev-chore/bump-mongolid-version", "source": { "type": "git", "url": "git@github.com:leroy-merlin-br/mongolid-laravel.git", - "reference": "3509ce9f5f37e9cfaaa1b22ec5f481f753374000" + "reference": "96954b1c8c428d6ca5ccafebeaf89b27001b64b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/leroy-merlin-br/mongolid-laravel/zipball/3509ce9f5f37e9cfaaa1b22ec5f481f753374000", - "reference": "3509ce9f5f37e9cfaaa1b22ec5f481f753374000", + "url": "https://api.github.com/repos/leroy-merlin-br/mongolid-laravel/zipball/96954b1c8c428d6ca5ccafebeaf89b27001b64b1", + "reference": "96954b1c8c428d6ca5ccafebeaf89b27001b64b1", "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": "v3.3-beta2", - "php": ">=7.3" + "leroy-merlin-br/mongolid": "v3.4", + "php": ">=7.4" }, "require-dev": { - "leroy-merlin-br/coding-standard": "^3.0.2", + "leroy-merlin-br/coding-standard": "^3.1.0", "mockery/mockery": "^1.5.1", "orchestra/testbench": "^6.25.1", - "phpunit/phpunit": "^9.5.25" + "phpunit/phpunit": "^9.5.27" }, "type": "library", "extra": { @@ -1508,38 +1667,40 @@ "nosql", "odm" ], - "time": "2022-10-18T21:29:07+00:00" + "time": "2022-12-21T13:38:51+00:00" }, { "name": "mongodb/mongodb", - "version": "1.8.0", + "version": "1.15.0", "source": { "type": "git", "url": "https://github.com/mongodb/mongo-php-library.git", - "reference": "953dbc19443aa9314c44b7217a16873347e6840d" + "reference": "3a681a3b2f2c0ebac227a3b86bb9057d0e6eb8f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/953dbc19443aa9314c44b7217a16873347e6840d", - "reference": "953dbc19443aa9314c44b7217a16873347e6840d", + "url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/3a681a3b2f2c0ebac227a3b86bb9057d0e6eb8f8", + "reference": "3a681a3b2f2c0ebac227a3b86bb9057d0e6eb8f8", "shasum": "" }, "require": { "ext-hash": "*", "ext-json": "*", - "ext-mongodb": "^1.8.1", - "jean85/pretty-package-versions": "^1.2", - "php": "^7.0 || ^8.0", + "ext-mongodb": "^1.15.0", + "jean85/pretty-package-versions": "^1.2 || ^2.0.1", + "php": "^7.2 || ^8.0", "symfony/polyfill-php80": "^1.19" }, "require-dev": { - "squizlabs/php_codesniffer": "^3.5, <3.5.5", - "symfony/phpunit-bridge": "5.x-dev" + "doctrine/coding-standard": "^9.0", + "squizlabs/php_codesniffer": "^3.6", + "symfony/phpunit-bridge": "^5.2", + "vimeo/psalm": "^4.28" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8.x-dev" + "dev-master": "1.15.x-dev" } }, "autoload": { @@ -1574,9 +1735,9 @@ ], "support": { "issues": "https://github.com/mongodb/mongo-php-library/issues", - "source": "https://github.com/mongodb/mongo-php-library/tree/1.8.0" + "source": "https://github.com/mongodb/mongo-php-library/tree/1.15.0" }, - "time": "2020-11-25T12:26:02+00:00" + "time": "2022-11-23T04:45:35+00:00" }, { "name": "monolog/monolog", @@ -1682,16 +1843,16 @@ }, { "name": "nesbot/carbon", - "version": "2.62.1", + "version": "2.64.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "01bc4cdefe98ef58d1f9cb31bdbbddddf2a88f7a" + "reference": "889546413c97de2d05063b8cb7b193c2531ea211" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/01bc4cdefe98ef58d1f9cb31bdbbddddf2a88f7a", - "reference": "01bc4cdefe98ef58d1f9cb31bdbbddddf2a88f7a", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/889546413c97de2d05063b8cb7b193c2531ea211", + "reference": "889546413c97de2d05063b8cb7b193c2531ea211", "shasum": "" }, "require": { @@ -1702,7 +1863,7 @@ "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0" }, "require-dev": { - "doctrine/dbal": "^2.0 || ^3.0", + "doctrine/dbal": "^2.0 || ^3.1.4", "doctrine/orm": "^2.7", "friendsofphp/php-cs-fixer": "^3.0", "kylekatarnls/multi-tester": "^2.0", @@ -1780,7 +1941,154 @@ "type": "tidelift" } ], - "time": "2022-09-02T07:48:13+00:00" + "time": "2022-11-26T17:36:00+00:00" + }, + { + "name": "nette/schema", + "version": "v1.2.3", + "source": { + "type": "git", + "url": "https://github.com/nette/schema.git", + "reference": "abbdbb70e0245d5f3bf77874cea1dfb0c930d06f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/schema/zipball/abbdbb70e0245d5f3bf77874cea1dfb0c930d06f", + "reference": "abbdbb70e0245d5f3bf77874cea1dfb0c930d06f", + "shasum": "" + }, + "require": { + "nette/utils": "^2.5.7 || ^3.1.5 || ^4.0", + "php": ">=7.1 <8.3" + }, + "require-dev": { + "nette/tester": "^2.3 || ^2.4", + "phpstan/phpstan-nette": "^1.0", + "tracy/tracy": "^2.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "📐 Nette Schema: validating data structures against a given Schema.", + "homepage": "https://nette.org", + "keywords": [ + "config", + "nette" + ], + "support": { + "issues": "https://github.com/nette/schema/issues", + "source": "https://github.com/nette/schema/tree/v1.2.3" + }, + "time": "2022-10-13T01:24:26+00:00" + }, + { + "name": "nette/utils", + "version": "v3.2.8", + "source": { + "type": "git", + "url": "https://github.com/nette/utils.git", + "reference": "02a54c4c872b99e4ec05c4aec54b5a06eb0f6368" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/utils/zipball/02a54c4c872b99e4ec05c4aec54b5a06eb0f6368", + "reference": "02a54c4c872b99e4ec05c4aec54b5a06eb0f6368", + "shasum": "" + }, + "require": { + "php": ">=7.2 <8.3" + }, + "conflict": { + "nette/di": "<3.0.6" + }, + "require-dev": { + "nette/tester": "~2.0", + "phpstan/phpstan": "^1.0", + "tracy/tracy": "^2.3" + }, + "suggest": { + "ext-gd": "to use Image", + "ext-iconv": "to use Strings::webalize(), toAscii(), chr() and reverse()", + "ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()", + "ext-json": "to use Nette\\Utils\\Json", + "ext-mbstring": "to use Strings::lower() etc...", + "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()", + "ext-xml": "to use Strings::length() etc. when mbstring is not available" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.", + "homepage": "https://nette.org", + "keywords": [ + "array", + "core", + "datetime", + "images", + "json", + "nette", + "paginator", + "password", + "slugify", + "string", + "unicode", + "utf-8", + "utility", + "validation" + ], + "support": { + "issues": "https://github.com/nette/utils/issues", + "source": "https://github.com/nette/utils/tree/v3.2.8" + }, + "time": "2022-09-12T23:36:20+00:00" }, { "name": "nyholm/psr7", @@ -2105,16 +2413,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "2.0.38", + "version": "2.0.40", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "b03536539f43a4f9aa33c4f0b2f3a1c752088fcd" + "reference": "5ef6f8376ddad21f3ce1da429950f7e00ec2292c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/b03536539f43a4f9aa33c4f0b2f3a1c752088fcd", - "reference": "b03536539f43a4f9aa33c4f0b2f3a1c752088fcd", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/5ef6f8376ddad21f3ce1da429950f7e00ec2292c", + "reference": "5ef6f8376ddad21f3ce1da429950f7e00ec2292c", "shasum": "" }, "require": { @@ -2195,7 +2503,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/2.0.38" + "source": "https://github.com/phpseclib/phpseclib/tree/2.0.40" }, "funding": [ { @@ -2211,24 +2519,24 @@ "type": "tidelift" } ], - "time": "2022-09-02T17:04:26+00:00" + "time": "2022-12-17T17:22:59+00:00" }, { "name": "psr/container", - "version": "1.1.1", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", "shasum": "" }, "require": { - "php": ">=7.2.0" + "php": ">=7.4.0" }, "type": "library", "autoload": { @@ -2257,9 +2565,9 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.1" + "source": "https://github.com/php-fig/container/tree/1.1.2" }, - "time": "2021-03-05T17:36:06+00:00" + "time": "2021-11-05T16:50:12+00:00" }, { "name": "psr/event-dispatcher", @@ -2775,16 +3083,16 @@ }, { "name": "symfony/console", - "version": "v5.4.14", + "version": "v5.4.16", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "984ea2c0f45f42dfed01d2f3987b187467c4b16d" + "reference": "8e9b9c8dfb33af6057c94e1b44846bee700dc5ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/984ea2c0f45f42dfed01d2f3987b187467c4b16d", - "reference": "984ea2c0f45f42dfed01d2f3987b187467c4b16d", + "url": "https://api.github.com/repos/symfony/console/zipball/8e9b9c8dfb33af6057c94e1b44846bee700dc5ef", + "reference": "8e9b9c8dfb33af6057c94e1b44846bee700dc5ef", "shasum": "" }, "require": { @@ -2854,7 +3162,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.14" + "source": "https://github.com/symfony/console/tree/v5.4.16" }, "funding": [ { @@ -2870,7 +3178,7 @@ "type": "tidelift" } ], - "time": "2022-10-07T08:01:20+00:00" + "time": "2022-11-25T14:09:27+00:00" }, { "name": "symfony/css-selector", @@ -3007,16 +3315,16 @@ }, { "name": "symfony/error-handler", - "version": "v5.4.14", + "version": "v5.4.15", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "5fe6d42ffeb68b094df8fdbf3acf23f391cc6be0" + "reference": "539cf1428b8442303c6e876ad7bf5a7babd91091" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/5fe6d42ffeb68b094df8fdbf3acf23f391cc6be0", - "reference": "5fe6d42ffeb68b094df8fdbf3acf23f391cc6be0", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/539cf1428b8442303c6e876ad7bf5a7babd91091", + "reference": "539cf1428b8442303c6e876ad7bf5a7babd91091", "shasum": "" }, "require": { @@ -3058,7 +3366,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v5.4.14" + "source": "https://github.com/symfony/error-handler/tree/v5.4.15" }, "funding": [ { @@ -3074,7 +3382,7 @@ "type": "tidelift" } ], - "time": "2022-10-03T15:15:50+00:00" + "time": "2022-10-27T06:32:25+00:00" }, { "name": "symfony/event-dispatcher", @@ -3305,16 +3613,16 @@ }, { "name": "symfony/http-foundation", - "version": "v5.4.14", + "version": "v5.4.16", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "e7c7b395c3a61d746919c21e915f51f0039c3f75" + "reference": "5032c5849aef24741e1970cb03511b0dd131d838" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e7c7b395c3a61d746919c21e915f51f0039c3f75", - "reference": "e7c7b395c3a61d746919c21e915f51f0039c3f75", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/5032c5849aef24741e1970cb03511b0dd131d838", + "reference": "5032c5849aef24741e1970cb03511b0dd131d838", "shasum": "" }, "require": { @@ -3361,7 +3669,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.4.14" + "source": "https://github.com/symfony/http-foundation/tree/v5.4.16" }, "funding": [ { @@ -3377,20 +3685,20 @@ "type": "tidelift" } ], - "time": "2022-10-01T21:59:28+00:00" + "time": "2022-11-07T08:06:40+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.4.14", + "version": "v5.4.16", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "6f77fabc1a37c2dceecc6f78cca44772705dc52f" + "reference": "b432c57c5de73634b1859093c1f58e3cd84455a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/6f77fabc1a37c2dceecc6f78cca44772705dc52f", - "reference": "6f77fabc1a37c2dceecc6f78cca44772705dc52f", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/b432c57c5de73634b1859093c1f58e3cd84455a1", + "reference": "b432c57c5de73634b1859093c1f58e3cd84455a1", "shasum": "" }, "require": { @@ -3473,7 +3781,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v5.4.14" + "source": "https://github.com/symfony/http-kernel/tree/v5.4.16" }, "funding": [ { @@ -3489,20 +3797,20 @@ "type": "tidelift" } ], - "time": "2022-10-12T07:12:21+00:00" + "time": "2022-11-28T18:08:58+00:00" }, { "name": "symfony/mime", - "version": "v5.4.14", + "version": "v5.4.16", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "1c118b253bb3495d81e95a6e3ec6c2766a98a0c4" + "reference": "46eeedb08f0832b1b61a84c612d945fc85ee4734" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/1c118b253bb3495d81e95a6e3ec6c2766a98a0c4", - "reference": "1c118b253bb3495d81e95a6e3ec6c2766a98a0c4", + "url": "https://api.github.com/repos/symfony/mime/zipball/46eeedb08f0832b1b61a84c612d945fc85ee4734", + "reference": "46eeedb08f0832b1b61a84c612d945fc85ee4734", "shasum": "" }, "require": { @@ -3557,7 +3865,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v5.4.14" + "source": "https://github.com/symfony/mime/tree/v5.4.16" }, "funding": [ { @@ -3573,20 +3881,20 @@ "type": "tidelift" } ], - "time": "2022-10-07T08:01:20+00:00" + "time": "2022-11-26T16:45:22+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", "shasum": "" }, "require": { @@ -3601,7 +3909,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3639,7 +3947,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" }, "funding": [ { @@ -3655,20 +3963,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-iconv", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "143f1881e655bebca1312722af8068de235ae5dc" + "reference": "927013f3aac555983a5059aada98e1907d842695" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/143f1881e655bebca1312722af8068de235ae5dc", - "reference": "143f1881e655bebca1312722af8068de235ae5dc", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/927013f3aac555983a5059aada98e1907d842695", + "reference": "927013f3aac555983a5059aada98e1907d842695", "shasum": "" }, "require": { @@ -3683,7 +3991,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3722,7 +4030,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-iconv/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-iconv/tree/v1.27.0" }, "funding": [ { @@ -3738,20 +4046,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "433d05519ce6990bf3530fba6957499d327395c2" + "reference": "511a08c03c1960e08a883f4cffcacd219b758354" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/433d05519ce6990bf3530fba6957499d327395c2", - "reference": "433d05519ce6990bf3530fba6957499d327395c2", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354", "shasum": "" }, "require": { @@ -3763,7 +4071,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3803,7 +4111,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" }, "funding": [ { @@ -3819,20 +4127,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8" + "reference": "639084e360537a19f9ee352433b84ce831f3d2da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/59a8d271f00dd0e4c2e518104cc7963f655a1aa8", - "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/639084e360537a19f9ee352433b84ce831f3d2da", + "reference": "639084e360537a19f9ee352433b84ce831f3d2da", "shasum": "" }, "require": { @@ -3846,7 +4154,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3890,7 +4198,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.27.0" }, "funding": [ { @@ -3906,20 +4214,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "219aa369ceff116e673852dce47c3a41794c14bd" + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd", - "reference": "219aa369ceff116e673852dce47c3a41794c14bd", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", "shasum": "" }, "require": { @@ -3931,7 +4239,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3974,7 +4282,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" }, "funding": [ { @@ -3990,20 +4298,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -4018,7 +4326,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4057,7 +4365,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -4073,20 +4381,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2" + "reference": "869329b1e9894268a8a61dabb69153029b7a8c97" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/bf44a9fd41feaac72b074de600314a93e2ae78e2", - "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/869329b1e9894268a8a61dabb69153029b7a8c97", + "reference": "869329b1e9894268a8a61dabb69153029b7a8c97", "shasum": "" }, "require": { @@ -4095,7 +4403,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4133,7 +4441,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.27.0" }, "funding": [ { @@ -4149,20 +4457,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85" + "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", + "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", "shasum": "" }, "require": { @@ -4171,7 +4479,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4212,7 +4520,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.27.0" }, "funding": [ { @@ -4228,20 +4536,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", "shasum": "" }, "require": { @@ -4250,7 +4558,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4295,7 +4603,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" }, "funding": [ { @@ -4311,20 +4619,20 @@ "type": "tidelift" } ], - "time": "2022-05-10T07:21:04+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1" + "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/13f6d1271c663dc5ae9fb843a8f16521db7687a1", - "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a", + "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a", "shasum": "" }, "require": { @@ -4333,7 +4641,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4374,7 +4682,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0" }, "funding": [ { @@ -4390,7 +4698,7 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/process", @@ -4456,16 +4764,16 @@ }, { "name": "symfony/psr-http-message-bridge", - "version": "v2.1.3", + "version": "v2.1.4", "source": { "type": "git", "url": "https://github.com/symfony/psr-http-message-bridge.git", - "reference": "d444f85dddf65c7e57c58d8e5b3a4dbb593b1840" + "reference": "a125b93ef378c492e274f217874906fb9babdebb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/d444f85dddf65c7e57c58d8e5b3a4dbb593b1840", - "reference": "d444f85dddf65c7e57c58d8e5b3a4dbb593b1840", + "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/a125b93ef378c492e274f217874906fb9babdebb", + "reference": "a125b93ef378c492e274f217874906fb9babdebb", "shasum": "" }, "require": { @@ -4524,7 +4832,7 @@ ], "support": { "issues": "https://github.com/symfony/psr-http-message-bridge/issues", - "source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.1.3" + "source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.1.4" }, "funding": [ { @@ -4540,20 +4848,20 @@ "type": "tidelift" } ], - "time": "2022-09-05T10:34:54+00:00" + "time": "2022-11-28T22:46:34+00:00" }, { "name": "symfony/routing", - "version": "v5.4.11", + "version": "v5.4.15", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "3e01ccd9b2a3a4167ba2b3c53612762300300226" + "reference": "5c9b129efe9abce9470e384bf65d8a7e262eee69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/3e01ccd9b2a3a4167ba2b3c53612762300300226", - "reference": "3e01ccd9b2a3a4167ba2b3c53612762300300226", + "url": "https://api.github.com/repos/symfony/routing/zipball/5c9b129efe9abce9470e384bf65d8a7e262eee69", + "reference": "5c9b129efe9abce9470e384bf65d8a7e262eee69", "shasum": "" }, "require": { @@ -4614,7 +4922,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v5.4.11" + "source": "https://github.com/symfony/routing/tree/v5.4.15" }, "funding": [ { @@ -4630,7 +4938,7 @@ "type": "tidelift" } ], - "time": "2022-07-20T13:00:38+00:00" + "time": "2022-10-13T14:10:41+00:00" }, { "name": "symfony/service-contracts", @@ -4717,16 +5025,16 @@ }, { "name": "symfony/string", - "version": "v5.4.14", + "version": "v5.4.15", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "089e7237497fae7a9c404d0c3aeb8db3254733e4" + "reference": "571334ce9f687e3e6af72db4d3b2a9431e4fd9ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/089e7237497fae7a9c404d0c3aeb8db3254733e4", - "reference": "089e7237497fae7a9c404d0c3aeb8db3254733e4", + "url": "https://api.github.com/repos/symfony/string/zipball/571334ce9f687e3e6af72db4d3b2a9431e4fd9ed", + "reference": "571334ce9f687e3e6af72db4d3b2a9431e4fd9ed", "shasum": "" }, "require": { @@ -4783,7 +5091,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.14" + "source": "https://github.com/symfony/string/tree/v5.4.15" }, "funding": [ { @@ -5408,20 +5716,20 @@ }, { "name": "fakerphp/faker", - "version": "v1.20.0", + "version": "v1.21.0", "source": { "type": "git", "url": "https://github.com/FakerPHP/Faker.git", - "reference": "37f751c67a5372d4e26353bd9384bc03744ec77b" + "reference": "92efad6a967f0b79c499705c69b662f738cc9e4d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/37f751c67a5372d4e26353bd9384bc03744ec77b", - "reference": "37f751c67a5372d4e26353bd9384bc03744ec77b", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/92efad6a967f0b79c499705c69b662f738cc9e4d", + "reference": "92efad6a967f0b79c499705c69b662f738cc9e4d", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0", + "php": "^7.4 || ^8.0", "psr/container": "^1.0 || ^2.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" }, @@ -5432,7 +5740,8 @@ "bamarni/composer-bin-plugin": "^1.4.1", "doctrine/persistence": "^1.3 || ^2.0", "ext-intl": "*", - "symfony/phpunit-bridge": "^4.4 || ^5.2" + "phpunit/phpunit": "^9.5.26", + "symfony/phpunit-bridge": "^5.4.16" }, "suggest": { "doctrine/orm": "Required to use Faker\\ORM\\Doctrine", @@ -5444,7 +5753,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "v1.20-dev" + "dev-main": "v1.21-dev" } }, "autoload": { @@ -5469,22 +5778,22 @@ ], "support": { "issues": "https://github.com/FakerPHP/Faker/issues", - "source": "https://github.com/FakerPHP/Faker/tree/v1.20.0" + "source": "https://github.com/FakerPHP/Faker/tree/v1.21.0" }, - "time": "2022-07-20T13:12:54+00:00" + "time": "2022-12-13T13:54:32+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.4.1", + "version": "2.4.3", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379" + "reference": "67c26b443f348a51926030c83481b85718457d3d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/69568e4293f4fa993f3b0e51c9723e1e17c41379", - "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/67c26b443f348a51926030c83481b85718457d3d", + "reference": "67c26b443f348a51926030c83481b85718457d3d", "shasum": "" }, "require": { @@ -5574,7 +5883,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.4.1" + "source": "https://github.com/guzzle/psr7/tree/2.4.3" }, "funding": [ { @@ -5590,7 +5899,7 @@ "type": "tidelift" } ], - "time": "2022-08-28T14:45:39+00:00" + "time": "2022-10-26T14:07:24+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -5776,16 +6085,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.15.1", + "version": "v4.15.2", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900" + "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", - "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", + "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", "shasum": "" }, "require": { @@ -5826,9 +6135,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.2" }, - "time": "2022-09-04T07:30:47+00:00" + "time": "2022-11-12T15:38:23+00:00" }, { "name": "orchestra/testbench", @@ -6098,16 +6407,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.17", + "version": "9.2.22", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8" + "reference": "e4bf60d2220b4baaa0572986b5d69870226b06df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/aa94dc41e8661fe90c7316849907cba3007b10d8", - "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/e4bf60d2220b4baaa0572986b5d69870226b06df", + "reference": "e4bf60d2220b4baaa0572986b5d69870226b06df", "shasum": "" }, "require": { @@ -6163,7 +6472,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.17" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.22" }, "funding": [ { @@ -6171,7 +6480,7 @@ "type": "github" } ], - "time": "2022-08-30T12:24:04+00:00" + "time": "2022-12-18T16:40:55+00:00" }, { "name": "phpunit/php-file-iterator", @@ -6416,16 +6725,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.25", + "version": "9.5.27", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d" + "reference": "a2bc7ffdca99f92d959b3f2270529334030bba38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d", - "reference": "3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a2bc7ffdca99f92d959b3f2270529334030bba38", + "reference": "a2bc7ffdca99f92d959b3f2270529334030bba38", "shasum": "" }, "require": { @@ -6498,7 +6807,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.25" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.27" }, "funding": [ { @@ -6514,7 +6823,7 @@ "type": "tidelift" } ], - "time": "2022-09-25T03:44:45+00:00" + "time": "2022-12-09T07:31:23+00:00" }, { "name": "pimple/pimple", @@ -7912,16 +8221,16 @@ }, { "name": "symfony/yaml", - "version": "v5.4.14", + "version": "v5.4.16", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "e83fe9a72011f07c662da46a05603d66deeeb487" + "reference": "ebd37c71f62d5ec5f6e27de3e06fee492d4c6298" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/e83fe9a72011f07c662da46a05603d66deeeb487", - "reference": "e83fe9a72011f07c662da46a05603d66deeeb487", + "url": "https://api.github.com/repos/symfony/yaml/zipball/ebd37c71f62d5ec5f6e27de3e06fee492d4c6298", + "reference": "ebd37c71f62d5ec5f6e27de3e06fee492d4c6298", "shasum": "" }, "require": { @@ -7967,7 +8276,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v5.4.14" + "source": "https://github.com/symfony/yaml/tree/v5.4.16" }, "funding": [ { @@ -7983,7 +8292,7 @@ "type": "tidelift" } ], - "time": "2022-10-03T15:15:50+00:00" + "time": "2022-11-25T16:04:03+00:00" }, { "name": "theseer/tokenizer", @@ -8239,14 +8548,16 @@ ], "aliases": [], "minimum-stability": "dev", - "stability-flags": [], + "stability-flags": { + "leroy-merlin-br/mongolid-laravel": 20 + }, "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "^7.3", + "php": ">=7.4", "ext-json": "*", "ext-mongodb": "*" }, "platform-dev": [], - "plugin-api-version": "2.0.0" + "plugin-api-version": "2.3.0" } diff --git a/docker-compose.override.yml.example b/docker-compose.override.yml.example index 6bdf591..79f60ac 100644 --- a/docker-compose.override.yml.example +++ b/docker-compose.override.yml.example @@ -1 +1,11 @@ version: '3' + +services: + db: + command: mongod --wiredTigerCacheSizeGB 0.25 + deploy: + resources: + limits: + memory: 1g + reservations: + memory: 512M diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile index fc3a8e2..a5e4cde 100644 --- a/docker/php/Dockerfile +++ b/docker/php/Dockerfile @@ -1,18 +1,37 @@ -FROM leroymerlinbr/php:7.3 +FROM php:7.4-fpm -USER root +USER root:root -RUN docker-php-ext-enable xdebug +COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer + +RUN apt-get update -qq \ + && apt-get install -qq --no-install-recommends \ + git zip unzip \ + libzip-dev libssl-dev \ + zlib1g-dev libicu-dev \ + && apt-get clean + +RUN pecl install xdebug-3.1.6 mongodb \ + && docker-php-ext-enable \ + mongodb xdebug \ + && docker-php-ext-configure \ + intl \ + && docker-php-ext-install \ + intl pcntl zip \ + && rm -rf /tmp/* ARG UID=1000 ARG GID=1000 RUN groupmod -g ${GID} www-data \ && usermod -u ${UID} -g www-data www-data \ + && mkdir -p /var/www/html \ && chown -hR www-data:www-data \ /var/www \ /usr/local/ -COPY custom.ini /usr/local/etc/php/conf.d/ +COPY custom.ini /usr/local/etc/php/conf.d/custom.ini USER www-data:www-data +WORKDIR /var/www/html +ENV PATH=$PATH:/var/www/.composer/vendor/bin