From 102173e29ba49c99254a28ad5764d253a317b230 Mon Sep 17 00:00:00 2001 From: Dominic Plourde Date: Wed, 15 Jun 2022 02:51:00 -0400 Subject: [PATCH 01/18] Add missing clear queue command to service provider (#1237) * Add missing clear queue command to service porovider * hotfix: change order of uses to respect ci Co-authored-by: Dominic Plourde --- src/Console/ConsoleServiceProvider.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Console/ConsoleServiceProvider.php b/src/Console/ConsoleServiceProvider.php index 32923a26..57b836ee 100644 --- a/src/Console/ConsoleServiceProvider.php +++ b/src/Console/ConsoleServiceProvider.php @@ -21,6 +21,7 @@ use Illuminate\Database\Console\Seeds\SeederMakeCommand; use Illuminate\Database\Console\WipeCommand; use Illuminate\Queue\Console\BatchesTableCommand; +use Illuminate\Queue\Console\ClearCommand as ClearQueueCommand; use Illuminate\Queue\Console\FailedTableCommand; use Illuminate\Queue\Console\FlushFailedCommand as FlushFailedQueueCommand; use Illuminate\Queue\Console\ForgetFailedCommand as ForgetFailedQueueCommand; @@ -50,6 +51,7 @@ class ConsoleServiceProvider extends ServiceProvider 'MigrateReset' => 'command.migrate.reset', 'MigrateRollback' => 'command.migrate.rollback', 'MigrateStatus' => 'command.migrate.status', + 'QueueClear' => 'command.queue.clear', 'QueueFailed' => 'command.queue.failed', 'QueueFlush' => 'command.queue.flush', 'QueueForget' => 'command.queue.forget', @@ -256,6 +258,18 @@ protected function registerMigrateStatusCommand() }); } + /** + * Register the command. + * + * @return void + */ + protected function registerQueueClearCommand() + { + $this->app->singleton('command.queue.clear', function () { + return new ClearQueueCommand; + }); + } + /** * Register the command. * From be6f8f379a7ee1e39a2ff63039f042591f176c01 Mon Sep 17 00:00:00 2001 From: Dominic Plourde Date: Mon, 1 Aug 2022 18:27:41 -0400 Subject: [PATCH 02/18] Add missing Schedule:work command (#1243) Co-authored-by: Dominic Plourde --- src/Console/ConsoleServiceProvider.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Console/ConsoleServiceProvider.php b/src/Console/ConsoleServiceProvider.php index 57b836ee..6808bdb2 100644 --- a/src/Console/ConsoleServiceProvider.php +++ b/src/Console/ConsoleServiceProvider.php @@ -8,6 +8,7 @@ use Illuminate\Cache\Console\ForgetCommand as CacheForgetCommand; use Illuminate\Console\Scheduling\ScheduleFinishCommand; use Illuminate\Console\Scheduling\ScheduleRunCommand; +use Illuminate\Console\Scheduling\ScheduleWorkCommand; use Illuminate\Database\Console\DumpCommand; use Illuminate\Database\Console\Migrations\FreshCommand as MigrateFreshCommand; use Illuminate\Database\Console\Migrations\InstallCommand as MigrateInstallCommand; @@ -63,6 +64,7 @@ class ConsoleServiceProvider extends ServiceProvider 'Wipe' => 'command.wipe', 'ScheduleFinish' => ScheduleFinishCommand::class, 'ScheduleRun' => ScheduleRunCommand::class, + 'ScheduleWork' => ScheduleWorkCommand::class, 'SchemaDump' => 'command.schema.dump', ]; @@ -446,6 +448,16 @@ protected function registerScheduleRunCommand() $this->app->singleton(ScheduleRunCommand::class); } + /** + * Register the command. + * + * @return void + */ + protected function registerScheduleWorkCommand() + { + $this->app->singleton(ScheduleWorkCommand::class); + } + /** * Register the command. * From 19a384a57e04e5534d9134ada88d619ab2494f7c Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Thu, 15 Sep 2022 16:30:15 +0200 Subject: [PATCH 03/18] Revert "Change controller validate helper method to behave like Laravel (#1247) (#1248)" (#1249) This reverts commit 94445c4a4070b6b8fce4efe9bf7684ceb3b9a985. --- src/Routing/ProvidesConvenienceMethods.php | 53 ++++++++++++++-------- 1 file changed, 34 insertions(+), 19 deletions(-) diff --git a/src/Routing/ProvidesConvenienceMethods.php b/src/Routing/ProvidesConvenienceMethods.php index 1e246001..cded24f3 100644 --- a/src/Routing/ProvidesConvenienceMethods.php +++ b/src/Routing/ProvidesConvenienceMethods.php @@ -7,6 +7,7 @@ use Illuminate\Contracts\Bus\Dispatcher; use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; +use Illuminate\Support\Str; use Illuminate\Validation\ValidationException; use Illuminate\Validation\Validator; @@ -63,27 +64,41 @@ public function validate(Request $request, array $rules, array $messages = [], a { $validator = $this->getValidationFactory()->make($request->all(), $rules, $messages, $customAttributes); - try { - $validated = $validator->validate(); - - if (method_exists($this, 'extractInputFromRules')) { - // Backwards compatability... - $validated = $this->extractInputFromRules($request, $rules); - } - } catch (ValidationException $exception) { - if (method_exists($this, 'throwValidationException')) { - // Backwards compatability... - $this->throwValidationException($request, $validator); - } else { - $exception->response = $this->buildFailedValidationResponse( - $request, $this->formatValidationErrors($validator) - ); - - throw $exception; - } + if ($validator->fails()) { + $this->throwValidationException($request, $validator); } - return $validated; + return $this->extractInputFromRules($request, $rules); + } + + /** + * Get the request input based on the given validation rules. + * + * @param \Illuminate\Http\Request $request + * @param array $rules + * @return array + */ + protected function extractInputFromRules(Request $request, array $rules) + { + return $request->only(collect($rules)->keys()->map(function ($rule) { + return Str::contains($rule, '.') ? explode('.', $rule)[0] : $rule; + })->unique()->toArray()); + } + + /** + * Throw the failed validation exception. + * + * @param \Illuminate\Http\Request $request + * @param \Illuminate\Contracts\Validation\Validator $validator + * @return void + * + * @throws \Illuminate\Validation\ValidationException + */ + protected function throwValidationException(Request $request, $validator) + { + throw new ValidationException($validator, $this->buildFailedValidationResponse( + $request, $this->formatValidationErrors($validator) + )); } /** From 1c2fa3087eea181592e2c445c94cee527e272c9f Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Thu, 15 Sep 2022 16:31:35 +0200 Subject: [PATCH 04/18] Update Application.php --- src/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Application.php b/src/Application.php index 77fda165..1f79ae31 100644 --- a/src/Application.php +++ b/src/Application.php @@ -162,7 +162,7 @@ public function bootstrapRouter() */ public function version() { - return 'Lumen (9.1.1) (Laravel Components ^9.21)'; + return 'Lumen (9.1.2) (Laravel Components ^9.21)'; } /** From 75d0bda6b699cc523b268f093a39394208fb9d2e Mon Sep 17 00:00:00 2001 From: Glodzienski <32658901+glodzienski@users.noreply.github.com> Date: Tue, 11 Oct 2022 14:32:48 -0300 Subject: [PATCH 05/18] Issue https://github.com/laravel/lumen-framework/issues/1250 (#1251) Adding getFallbackLocale in Application class. To fix the problem with illuminate/translation updates. --- src/Application.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Application.php b/src/Application.php index 1f79ae31..858ec340 100644 --- a/src/Application.php +++ b/src/Application.php @@ -989,6 +989,16 @@ public function getLocale() return $this['config']->get('app.locale'); } + /** + * Get the current application fallback locale. + * + * @return string + */ + public function getFallbackLocale() + { + return $this['config']->get('app.fallback_locale'); + } + /** * Set the current application locale. * From 624dfbdb2682ef1aa06a64fad247c3859a7f000e Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 11 Oct 2022 12:33:31 -0500 Subject: [PATCH 06/18] wip --- src/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Application.php b/src/Application.php index 858ec340..22a3106a 100644 --- a/src/Application.php +++ b/src/Application.php @@ -162,7 +162,7 @@ public function bootstrapRouter() */ public function version() { - return 'Lumen (9.1.2) (Laravel Components ^9.21)'; + return 'Lumen (9.1.3) (Laravel Components ^9.21)'; } /** From e31387f04a64a8b88ad50d8e89d5948da4448e6e Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Tue, 18 Oct 2022 19:45:46 +0100 Subject: [PATCH 07/18] [9.x] Fixes view service provider terminating callbacks (#1253) * Fixes view service provider terminating callbacks * Apply fixes from StyleCI Co-authored-by: StyleCI Bot --- src/Application.php | 36 ++++++++++++++++++ src/Concerns/RoutesRequests.php | 2 + src/Console/Kernel.php | 10 +++-- tests/FullApplicationTest.php | 67 +++++++++++++++++++++++++++++++++ 4 files changed, 112 insertions(+), 3 deletions(-) diff --git a/src/Application.php b/src/Application.php index 22a3106a..32220ae6 100644 --- a/src/Application.php +++ b/src/Application.php @@ -111,6 +111,13 @@ class Application extends Container */ public $router; + /** + * The array of terminating callbacks. + * + * @var callable[] + */ + protected $terminatingCallbacks = []; + /** * Create a new Lumen application instance. * @@ -1022,6 +1029,35 @@ public function isLocale($locale) return $this->getLocale() == $locale; } + /** + * Register a terminating callback with the application. + * + * @param callable|string $callback + * @return $this + */ + public function terminating($callback) + { + $this->terminatingCallbacks[] = $callback; + + return $this; + } + + /** + * Terminate the application. + * + * @return void + */ + public function terminate() + { + $index = 0; + + while ($index < count($this->terminatingCallbacks)) { + $this->call($this->terminatingCallbacks[$index]); + + $index++; + } + } + /** * Register the core container aliases. * diff --git a/src/Concerns/RoutesRequests.php b/src/Concerns/RoutesRequests.php index cbb3daaf..fdac8696 100644 --- a/src/Concerns/RoutesRequests.php +++ b/src/Concerns/RoutesRequests.php @@ -120,6 +120,8 @@ public function run($request = null) if (count($this->middleware) > 0) { $this->callTerminableMiddleware($response); } + + $this->app->terminate(); } /** diff --git a/src/Console/Kernel.php b/src/Console/Kernel.php index dd1a12e7..ee8d697b 100644 --- a/src/Console/Kernel.php +++ b/src/Console/Kernel.php @@ -113,14 +113,18 @@ public function handle($input, $output = null) try { $this->app->boot(); - return $this->getArtisan()->run($input, $output); + $status = $this->getArtisan()->run($input, $output); } catch (Throwable $e) { $this->reportException($e); $this->renderException($output, $e); - return 1; + $status = 1; } + + $this->terminate($input, $status); + + return $status; } /** @@ -142,7 +146,7 @@ public function bootstrap() */ public function terminate($input, $status) { - // + $this->app->terminate(); } /** diff --git a/tests/FullApplicationTest.php b/tests/FullApplicationTest.php index d2fae951..61ac37e3 100644 --- a/tests/FullApplicationTest.php +++ b/tests/FullApplicationTest.php @@ -1,13 +1,17 @@ assertNotNull($command); $this->assertEquals('queue:batches-table', $command->getName()); } + + public function testHandlingCommandsTerminatesApplication() + { + $app = new LumenTestApplication(); + $app->register(ConsoleServiceProvider::class); + $app->register(ViewServiceProvider::class); + + $app->instance(ExceptionHandler::class, $mock = m::mock('Laravel\Lumen\Exceptions\Handler[report]')); + $mock->shouldIgnoreMissing(); + + $kernel = $app[Laravel\Lumen\Console\Kernel::class]; + + (fn () => $kernel->getArtisan())->call($kernel)->resolveCommands( + SendEmails::class, + ); + + $terminated = false; + $app->terminating(function () use (&$terminated) { + $terminated = true; + }); + + $input = new ArrayInput(['command' => 'send:emails']); + + $command = $kernel->handle($input, new NullOutput()); + + $this->assertTrue($terminated); + } + + public function testTerminationTests() + { + $app = new LumenTestApplication; + + $result = []; + $callback1 = function () use (&$result) { + $result[] = 1; + }; + + $callback2 = function () use (&$result) { + $result[] = 2; + }; + + $callback3 = function () use (&$result) { + $result[] = 3; + }; + + $app->terminating($callback1); + $app->terminating($callback2); + $app->terminating($callback3); + + $app->terminate(); + + $this->assertEquals([1, 2, 3], $result); + } } class LumenTestService @@ -884,3 +941,13 @@ public function toResponse($request) return $request->route('foo'); } } + +class SendEmails extends Command +{ + protected $signature = 'send:emails'; + + public function handle() + { + // .. + } +} From d74503b498328c66dd30a9df2e5d4c694ec86ddb Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 18 Oct 2022 13:47:52 -0500 Subject: [PATCH 08/18] version --- src/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Application.php b/src/Application.php index 32220ae6..04d17c27 100644 --- a/src/Application.php +++ b/src/Application.php @@ -169,7 +169,7 @@ public function bootstrapRouter() */ public function version() { - return 'Lumen (9.1.3) (Laravel Components ^9.21)'; + return 'Lumen (9.1.4) (Laravel Components ^9.21)'; } /** From fbc847dccdb1693b38f34bfc35b421b84f861626 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Wed, 19 Oct 2022 14:40:36 +0100 Subject: [PATCH 09/18] [9.x] Flushes components cache between tests (#1254) * Flushes components cache between tests * Bumps components --- composer.json | 50 ++++++++++++++++++++-------------------- src/Testing/TestCase.php | 5 ++++ 2 files changed, 30 insertions(+), 25 deletions(-) diff --git a/composer.json b/composer.json index cd436282..f327bb33 100644 --- a/composer.json +++ b/composer.json @@ -16,31 +16,31 @@ ], "require": { "php": "^8.0.2", - "illuminate/auth": "^9.21", - "illuminate/broadcasting": "^9.21", - "illuminate/bus": "^9.21", - "illuminate/cache": "^9.21", - "illuminate/collections": "^9.21", - "illuminate/config": "^9.21", - "illuminate/console": "^9.21", - "illuminate/container": "^9.21", - "illuminate/contracts": "^9.21", - "illuminate/database": "^9.21", - "illuminate/encryption": "^9.21", - "illuminate/events": "^9.21", - "illuminate/filesystem": "^9.21", - "illuminate/hashing": "^9.21", - "illuminate/http": "^9.21", - "illuminate/macroable": "^9.21", - "illuminate/pagination": "^9.21", - "illuminate/pipeline": "^9.21", - "illuminate/queue": "^9.21", - "illuminate/support": "^9.21", - "illuminate/testing": "^9.21", - "illuminate/translation": "^9.21", - "illuminate/validation": "^9.21", - "illuminate/view": "^9.21", - "illuminate/log": "^9.21", + "illuminate/auth": "^9.36.3", + "illuminate/broadcasting": "^9.36.3", + "illuminate/bus": "^9.36.3", + "illuminate/cache": "^9.36.3", + "illuminate/collections": "^9.36.3", + "illuminate/config": "^9.36.3", + "illuminate/console": "^9.36.3", + "illuminate/container": "^9.36.3", + "illuminate/contracts": "^9.36.3", + "illuminate/database": "^9.36.3", + "illuminate/encryption": "^9.36.3", + "illuminate/events": "^9.36.3", + "illuminate/filesystem": "^9.36.3", + "illuminate/hashing": "^9.36.3", + "illuminate/http": "^9.36.3", + "illuminate/macroable": "^9.36.3", + "illuminate/pagination": "^9.36.3", + "illuminate/pipeline": "^9.36.3", + "illuminate/queue": "^9.36.3", + "illuminate/support": "^9.36.3", + "illuminate/testing": "^9.36.3", + "illuminate/translation": "^9.36.3", + "illuminate/validation": "^9.36.3", + "illuminate/view": "^9.36.3", + "illuminate/log": "^9.36.3", "dragonmantank/cron-expression": "^3.1", "nikic/fast-route": "^1.3", "symfony/console": "^6.0", diff --git a/src/Testing/TestCase.php b/src/Testing/TestCase.php index f36c1326..6010cec0 100644 --- a/src/Testing/TestCase.php +++ b/src/Testing/TestCase.php @@ -6,6 +6,7 @@ use Illuminate\Contracts\Auth\Authenticatable; use Illuminate\Contracts\Console\Kernel; use Illuminate\Support\Facades\Facade; +use Illuminate\View\Component; use Mockery; use PHPUnit\Framework\TestCase as BaseTestCase; @@ -124,6 +125,10 @@ protected function tearDown(): void $this->app->flush(); $this->app = null; } + + Component::flushCache(); + Component::forgetComponentsResolver(); + Component::forgetFactory(); } /** From 23e75cccf5595c15447d6dd928b9699d6f759296 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Tue, 25 Oct 2022 18:29:56 +0200 Subject: [PATCH 10/18] Update Application.php --- src/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Application.php b/src/Application.php index 04d17c27..ee0e034d 100644 --- a/src/Application.php +++ b/src/Application.php @@ -169,7 +169,7 @@ public function bootstrapRouter() */ public function version() { - return 'Lumen (9.1.4) (Laravel Components ^9.21)'; + return 'Lumen (9.1.5) (Laravel Components ^9.21)'; } /** From 4fc13f8aa683ff67421914b11a0cf49360173857 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Tue, 1 Nov 2022 16:08:29 +0100 Subject: [PATCH 11/18] Update tests.yml --- .github/workflows/tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9fdc6d71..24471f88 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,6 +2,9 @@ name: tests on: push: + branches: + - master + - '*.x' pull_request: schedule: - cron: '0 0 * * *' From d1145bdda72928120d7ff5f41fbc8798f81350b9 Mon Sep 17 00:00:00 2001 From: Roland Boon Date: Mon, 7 Nov 2022 15:48:54 +0100 Subject: [PATCH 12/18] Respect status code of AuthorizationException (#1260) --- src/Exceptions/Handler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Exceptions/Handler.php b/src/Exceptions/Handler.php index 91c82c52..5d74b589 100644 --- a/src/Exceptions/Handler.php +++ b/src/Exceptions/Handler.php @@ -111,7 +111,7 @@ public function render($request, Throwable $e) } elseif ($e instanceof ModelNotFoundException) { $e = new NotFoundHttpException($e->getMessage(), $e); } elseif ($e instanceof AuthorizationException) { - $e = new HttpException(403, $e->getMessage()); + $e = new HttpException($e->status() ?? 403, $e->getMessage()); } elseif ($e instanceof ValidationException && $e->getResponse()) { return $e->getResponse(); } From 63f925b7736947ea7d839127e647f939f0f74c76 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Tue, 8 Nov 2022 14:25:47 +0100 Subject: [PATCH 13/18] [9.x] Test on PHP 8.2 (#1257) * Test on PHP 8.2 * wip --- .github/workflows/tests.yml | 2 +- tests/HandleExceptionsTest.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 24471f88..a1013160 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: true matrix: - php: ['8.0', '8.1'] + php: ['8.0', 8.1, 8.2] stability: [prefer-lowest, prefer-stable] name: PHP ${{ matrix.php }} - ${{ matrix.stability }} diff --git a/tests/HandleExceptionsTest.php b/tests/HandleExceptionsTest.php index 8d8ab315..bc74efe2 100644 --- a/tests/HandleExceptionsTest.php +++ b/tests/HandleExceptionsTest.php @@ -11,6 +11,10 @@ class HandleExceptionsTest extends TestCase { use RegistersExceptionHandlers; + protected $container; + + protected $config; + protected function setUp(): void { $this->container = new Container; From 391b4392e2ca1a2f5c08c3276881aa01d70ec9d0 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Wed, 23 Nov 2022 10:05:29 +0100 Subject: [PATCH 14/18] Create issues.yml --- .github/workflows/issues.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/workflows/issues.yml diff --git a/.github/workflows/issues.yml b/.github/workflows/issues.yml new file mode 100644 index 00000000..9634a0ed --- /dev/null +++ b/.github/workflows/issues.yml @@ -0,0 +1,12 @@ +name: issues + +on: + issues: + types: [labeled] + +permissions: + issues: write + +jobs: + help-wanted: + uses: laravel/.github/.github/workflows/issues.yml@main From b2f65f2b10d1d0607542e8e441bc2a0ba6af6996 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Wed, 28 Dec 2022 13:29:23 +0100 Subject: [PATCH 15/18] Update tests.yml --- .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 a1013160..912753c1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,7 +11,7 @@ on: jobs: tests: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: fail-fast: true @@ -23,7 +23,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup PHP uses: shivammathur/setup-php@v2 From 8e91f61ec79b712ddad0ec63b06ba4c377cefab8 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Tue, 21 Feb 2023 11:22:21 +0100 Subject: [PATCH 16/18] Fix missing isLocal method --- src/Application.php | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/Application.php b/src/Application.php index ee0e034d..9d8af18e 100644 --- a/src/Application.php +++ b/src/Application.php @@ -207,6 +207,26 @@ public function environment() return $env; } + /** + * Determine if the application is in the local environment. + * + * @return bool + */ + public function isLocal() + { + return $this->environment() === 'local'; + } + + /** + * Determine if the application is in the production environment. + * + * @return bool + */ + public function isProduction() + { + return $this->environment() === 'production'; + } + /** * Determine if the given service provider is loaded. * @@ -913,7 +933,7 @@ public function runningInConsole() */ public function runningUnitTests() { - return $this->environment() == 'testing'; + return $this->environment() === 'testing'; } /** From 6799e7e7e2d53f5822501d5f507773d111b38f53 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Tue, 21 Feb 2023 11:23:16 +0100 Subject: [PATCH 17/18] version --- src/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Application.php b/src/Application.php index 9d8af18e..31cfcec6 100644 --- a/src/Application.php +++ b/src/Application.php @@ -169,7 +169,7 @@ public function bootstrapRouter() */ public function version() { - return 'Lumen (9.1.5) (Laravel Components ^9.21)'; + return 'Lumen (9.1.6) (Laravel Components ^9.36.3)'; } /** From 0f0e56b4504c805020d851fc2ace8024cba9d349 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Mon, 24 Mar 2025 11:12:24 +0000 Subject: [PATCH 18/18] StyleCI fixes --- src/Testing/Concerns/MakesHttpRequests.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Testing/Concerns/MakesHttpRequests.php b/src/Testing/Concerns/MakesHttpRequests.php index 4c33bd66..04b6053d 100644 --- a/src/Testing/Concerns/MakesHttpRequests.php +++ b/src/Testing/Concerns/MakesHttpRequests.php @@ -195,7 +195,7 @@ public function handle(Request $request) * @param array|null $data * @return $this */ - protected function shouldReturnJson(array $data = null) + protected function shouldReturnJson(?array $data = null) { return $this->receiveJson($data); } @@ -239,7 +239,7 @@ public function seeJsonEquals(array $data) * @param bool $negate * @return $this */ - public function seeJson(array $data = null, $negate = false) + public function seeJson(?array $data = null, $negate = false) { if (is_null($data)) { $decodedResponse = json_decode($this->response->getContent(), true); @@ -262,7 +262,7 @@ public function seeJson(array $data = null, $negate = false) * @param array|null $data * @return $this */ - public function dontSeeJson(array $data = null) + public function dontSeeJson(?array $data = null) { return $this->seeJson($data, true); } @@ -274,7 +274,7 @@ public function dontSeeJson(array $data = null) * @param array|null $responseData * @return $this */ - public function seeJsonStructure(array $structure = null, $responseData = null) + public function seeJsonStructure(?array $structure = null, $responseData = null) { $this->response->assertJsonStructure($structure, $responseData);