mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
Remove Laravel serialisable closure
This commit is contained in:
@ -19,7 +19,6 @@
|
|||||||
"require": {
|
"require": {
|
||||||
"php": "^8.1.0",
|
"php": "^8.1.0",
|
||||||
"brianium/paratest": "^7.3.1",
|
"brianium/paratest": "^7.3.1",
|
||||||
"laravel/serializable-closure": "^1.0",
|
|
||||||
"nunomaduro/collision": "^7.10.0|^8.1.1",
|
"nunomaduro/collision": "^7.10.0|^8.1.1",
|
||||||
"nunomaduro/termwind": "^1.15.1|^2.0.1",
|
"nunomaduro/termwind": "^1.15.1|^2.0.1",
|
||||||
"pestphp/pest-plugin": "^2.1.1",
|
"pestphp/pest-plugin": "^2.1.1",
|
||||||
|
|||||||
@ -4,7 +4,6 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Pest\Factories;
|
namespace Pest\Factories;
|
||||||
|
|
||||||
use Laravel\SerializableClosure\Support\ReflectionClosure;
|
|
||||||
use ParseError;
|
use ParseError;
|
||||||
use Pest\Concerns;
|
use Pest\Concerns;
|
||||||
use Pest\Contracts\AddsAnnotations;
|
use Pest\Contracts\AddsAnnotations;
|
||||||
@ -220,7 +219,7 @@ final class TestCaseFactory
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
$method->closure instanceof \Closure &&
|
$method->closure instanceof \Closure &&
|
||||||
(new ReflectionClosure($method->closure))->isStatic()
|
(new \ReflectionFunction($method->closure))->isStatic()
|
||||||
) {
|
) {
|
||||||
throw new TestClosureMustNotBeStatic("The test `$method->description` closure must not be static in $method->filename.");
|
throw new TestClosureMustNotBeStatic("The test `$method->description` closure must not be static in $method->filename.");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,7 +22,6 @@ arch('dependencies')
|
|||||||
'Whoops',
|
'Whoops',
|
||||||
'Symfony\Component\Console',
|
'Symfony\Component\Console',
|
||||||
'Symfony\Component\Process',
|
'Symfony\Component\Process',
|
||||||
'Laravel\SerializableClosure\Support\ReflectionClosure',
|
|
||||||
])->ignoring(['Composer', 'PHPUnit', 'SebastianBergmann']);
|
])->ignoring(['Composer', 'PHPUnit', 'SebastianBergmann']);
|
||||||
|
|
||||||
arch('contracts')
|
arch('contracts')
|
||||||
|
|||||||
Reference in New Issue
Block a user