From 803cbbbb6b3f858d34cde58f3424461eb125f10f Mon Sep 17 00:00:00 2001 From: Ion Bazan Date: Sun, 14 Apr 2024 22:51:22 +0800 Subject: [PATCH] Support Laravel 11 --- .github/workflows/test.yml | 1 + CHANGELOG.md | 6 +++++- composer.json | 4 ++-- tests/ContainerTestCase.php | 8 +++++++- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 551a13b..527d90d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,6 +17,7 @@ jobs: - '8.1' - '8.2' - '8.3' + - '8.4' include: - php-versions: '7.0' composer-flags: '--prefer-lowest' diff --git a/CHANGELOG.md b/CHANGELOG.md index 7058ff7..a3441d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # CHANGELOG -## Unreleased +## v1.5.0 (2024-04-14) + +- Support Laravel 11 + +## v1.4.0 (2022-11-21) - Support Laravel 10 diff --git a/composer.json b/composer.json index 73754a5..418e720 100644 --- a/composer.json +++ b/composer.json @@ -19,8 +19,8 @@ "require": { "php": ">=7.0", "ext-json": "*", - "illuminate/console": "^5.4 || ^6 || ^7 || ^8 || ^9 || ^10", - "illuminate/container": "^5.4 || ^6 || ^7 || ^8 || ^9 || ^10" + "illuminate/console": "^5.4 || ^6 || ^7 || ^8 || ^9 || ^10 || ^11", + "illuminate/container": "^5.4 || ^6 || ^7 || ^8 || ^9 || ^10 || ^11" }, "require-dev": { "symfony/phpunit-bridge": "^4.4 || ^5 || ^6" diff --git a/tests/ContainerTestCase.php b/tests/ContainerTestCase.php index 6767b49..5372a1a 100644 --- a/tests/ContainerTestCase.php +++ b/tests/ContainerTestCase.php @@ -11,7 +11,13 @@ abstract class ContainerTestCase extends TestCase { protected function getTestContainer(): Container { - $container = new Container(); + $container = new class extends Container { + public function runningUnitTests(): bool // required for Laravel 11 + { + return true; + } + }; + $container->bind('service.d', ServiceStubD::class); $container->bind('service.c', ServiceStubC::class); $container->when(ServiceStubD::class)->needs('$test')->give('test'); // Invalid argument provided, should fail