Skip to content

Commit

Permalink
[11.x] Supports PHPUnit 12.0 (#54316)
Browse files Browse the repository at this point in the history
* Supports PHPUnit 12.0

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>

* wip

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>

* wip

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>

* wip

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>

* wip

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>

* wip

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>

* Apply suggestions from code review

* Update composer.json

* Apply suggestions from code review

* Update composer.json

---------

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone authored Feb 7, 2025
1 parent 917a3fe commit 3ea8b79
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ jobs:
fail-fast: true
matrix:
php: [8.2, 8.3, 8.4]
phpunit: ['10.5.12', '11.3.2']
phpunit: ['10.5.35', '11.3.2', '12.0.0']
stability: [prefer-lowest, prefer-stable]
exclude:
- php: 8.2
phpunit: '12.0.0'

name: PHP ${{ matrix.php }} - PHPUnit ${{ matrix.phpunit }} - ${{ matrix.stability }}

Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@
"league/flysystem-read-only": "^3.25.1",
"league/flysystem-sftp-v3": "^3.25.1",
"mockery/mockery": "^1.6.10",
"orchestra/testbench-core": "^9.6",
"orchestra/testbench-core": "^9.9.4",
"pda/pheanstalk": "^5.0.6",
"php-http/discovery": "^1.15",
"phpstan/phpstan": "^2.0",
"phpunit/phpunit": "^10.5.35|^11.3.6",
"phpunit/phpunit": "^10.5.35|^11.3.6|^12.0.1",
"predis/predis": "^2.3",
"resend/resend-php": "^0.10.0",
"symfony/cache": "^7.0.3",
Expand Down Expand Up @@ -188,7 +188,7 @@
"mockery/mockery": "Required to use mocking (^1.6).",
"pda/pheanstalk": "Required to use the beanstalk queue driver (^5.0).",
"php-http/discovery": "Required to use PSR-7 bridging features (^1.15).",
"phpunit/phpunit": "Required to use assertions and run tests (^10.5|^11.0).",
"phpunit/phpunit": "Required to use assertions and run tests (^10.5.35|^11.3.6|^12.0.1).",
"predis/predis": "Required to use the predis connector (^2.3).",
"psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).",
"pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^6.0|^7.0).",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,12 @@ protected function setUpTraits()
*/
public static function tearDownAfterClassUsingTestCase()
{
(function () {
$this->classDocBlocks = [];
$this->methodDocBlocks = [];
})->call(PHPUnitRegistry::getInstance());
if (class_exists(PHPUnitRegistry::class)) {
(function () {
$this->classDocBlocks = [];
$this->methodDocBlocks = [];
})->call(PHPUnitRegistry::getInstance());
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Testing/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"illuminate/database": "Required to assert databases (^11.0).",
"illuminate/http": "Required to assert responses (^11.0).",
"mockery/mockery": "Required to use mocking (^1.6).",
"phpunit/phpunit": "Required to use assertions and run tests (^10.5|^11.0)."
"phpunit/phpunit": "Required to use assertions and run tests (^10.5.35|^11.3.6|^12.0.1)."
},
"config": {
"sort-packages": true
Expand Down

0 comments on commit 3ea8b79

Please sign in to comment.