From dca09caa93fa36553def1e913aff7e0305c8eaa5 Mon Sep 17 00:00:00 2001 From: Francis Lavoie Date: Mon, 16 Jun 2025 22:13:44 -0400 Subject: [PATCH 1/2] Add L11, L12, PHP8.3, PHP8.4 --- .github/workflows/test.yml | 16 ++++++++++++++-- CHANGELOG.md | 5 +++++ composer.json | 6 +++--- phpunit.xml | 31 +++++++++++++++++++------------ tests/Unit/InvytrTest.php | 7 +++---- tests/Unit/TestUser.php | 9 +++++++++ 6 files changed, 53 insertions(+), 21 deletions(-) create mode 100644 tests/Unit/TestUser.php diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f421868..84689cd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,14 +14,26 @@ jobs: strategy: matrix: - php: [8.0, 8.1, 8.2] - laravel: [10.*, 9.*] + php: [8.0, 8.1, 8.2, 8.3, 8.4] + laravel: [12.*, 11.*, 10.*, 9.*] include: + - laravel: 12.* + testbench: ^10.0 + - laravel: 11.* + testbench: ^9.0 - laravel: 10.* testbench: ^8.0 - laravel: 9.* testbench: ^7.0 exclude: + - laravel: 12.* + php: 8.1 + - laravel: 12.* + php: 8.0 + - laravel: 11.* + php: 8.1 + - laravel: 11.* + php: 8.0 - laravel: 10.* php: 8.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 30ac0ca..a5a1bc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 1.0.11 + +### Updated +- Package to support Laravel 11 & 12, and PHP 8.3 & 8.4. + ## 1.0.10 ### Updated diff --git a/composer.json b/composer.json index 5e41855..80b832d 100644 --- a/composer.json +++ b/composer.json @@ -22,12 +22,12 @@ } ], "require": { - "laravel/framework": "^9.0|^10.0", + "laravel/framework": "^9.0|^10.0|^11.0|^12.0", "laravel/ui": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^8.4|^9.0|^10.0", - "orchestra/testbench": "^7.0|^8.0" + "phpunit/phpunit": "^8.4|^9.0|^10.0|^11.0", + "orchestra/testbench": "^7.0|^8.0|^9.0|^10.0" }, "autoload": { "psr-4": { diff --git a/phpunit.xml b/phpunit.xml index 951f391..2fb9ae3 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,23 +1,30 @@ - + tests - + - src/ + src - + diff --git a/tests/Unit/InvytrTest.php b/tests/Unit/InvytrTest.php index 58ef65f..be9fee7 100644 --- a/tests/Unit/InvytrTest.php +++ b/tests/Unit/InvytrTest.php @@ -63,7 +63,7 @@ public function testInvite() $this->broker->expects($this->once()) ->method('createToken') ->with($this->equalTo($this->user)) - ->will($this->returnValue($token)); + ->willReturn($token); $setPasswordMock = \Mockery::mock('overload:SetPassword'); $setPasswordMock->shouldReceive('__construct') @@ -87,15 +87,14 @@ public function testInviteCustomUser() { $token = '5349y539457937845'; - $user = $this->getMockBuilder(User::class) + $user = $this->getMockBuilder(TestUser::class) ->disableOriginalConstructor() - ->addMethods(['sendPasswordSetNotification']) ->getMock(); $this->broker->expects($this->once()) ->method('createToken') ->with($this->equalTo($user)) - ->will($this->returnValue($token)); + ->willReturn($token); $user->expects($this->once()) ->method('sendPasswordSetNotification') diff --git a/tests/Unit/TestUser.php b/tests/Unit/TestUser.php new file mode 100644 index 0000000..0e39602 --- /dev/null +++ b/tests/Unit/TestUser.php @@ -0,0 +1,9 @@ + Date: Fri, 27 Jun 2025 16:23:48 +0300 Subject: [PATCH 2/2] Improve whitespace formatting --- tests/Unit/TestUser.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Unit/TestUser.php b/tests/Unit/TestUser.php index 0e39602..28bc677 100644 --- a/tests/Unit/TestUser.php +++ b/tests/Unit/TestUser.php @@ -1,4 +1,5 @@