From 1dc59207d223c8fd085d8a4a5c9046b3721e21a0 Mon Sep 17 00:00:00 2001 From: Ben Sherred Date: Wed, 13 Mar 2024 13:17:06 +0000 Subject: [PATCH] feat: add support Laravel 11 --- .github/workflows/tests.yaml | 4 ++-- composer.json | 9 ++++++--- tests/Unit/Processors/MutexMigrationProcessorTest.php | 11 +++++------ 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 46ec3e7..67730d0 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -11,8 +11,8 @@ jobs: strategy: fail-fast: false matrix: - php: ['8.1', '8.2'] - laravel: ['^9.1', '^10.0'] + php: ['8.2', '8.3'] + laravel: ['^10.0', '^11.0'] steps: - name: Checkout the repo diff --git a/composer.json b/composer.json index 6ea45c2..39b7d81 100644 --- a/composer.json +++ b/composer.json @@ -20,11 +20,14 @@ } ], "require": { - "php": "^8.1", - "laravel/framework": "^9.3 || ^10.0" + "php": "^8.2", + "illuminate/contracts": "^10.0|^11.0", + "illuminate/console": "^10.0|^11.0", + "illuminate/database": "^10.0|^11.0", + "illuminate/support": "^10.0|^11.0" }, "require-dev": { - "orchestra/testbench": "^7.7 || ^8.0", + "orchestra/testbench": "^8.0|^9.0", "spatie/fork": "^1.1" }, "autoload": { diff --git a/tests/Unit/Processors/MutexMigrationProcessorTest.php b/tests/Unit/Processors/MutexMigrationProcessorTest.php index 69feedf..8327464 100644 --- a/tests/Unit/Processors/MutexMigrationProcessorTest.php +++ b/tests/Unit/Processors/MutexMigrationProcessorTest.php @@ -21,7 +21,6 @@ protected function setUp(): void $this->components = $this->getMockBuilder(Factory::class) ->disableOriginalConstructor() - ->addMethods(['info', 'warn']) ->getMock(); $this->relay = $this->getMockBuilder(MutexRelay::class) @@ -31,18 +30,18 @@ protected function setUp(): void public function testStart(): void { - $this->components->expects($this->exactly(2))->method('info'); + $this->components->expects($this->exactly(2))->method('__call'); $this->relay->expects($this->once()) ->method('acquireLock') - ->will($this->returnValue(true)); + ->willReturn(true); $this->getProcessorInstance()->start(); } public function testStartThrowsSpecificException(): void { - $this->components->expects($this->once())->method('info'); + $this->components->expects($this->once())->method('__call'); $this->relay->expects($this->once()) ->method('acquireLock') @@ -55,11 +54,11 @@ public function testStartThrowsSpecificException(): void public function testTerminate(): void { - $this->components->expects($this->once())->method('info'); + $this->components->expects($this->once())->method('__call'); $this->relay->expects($this->once()) ->method('releaseLock') - ->will($this->returnValue(true)); + ->willReturn(true); $this->getProcessorInstance()->terminate(); }