diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e40d7c496..000000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Benchmarks - -on: - push: - paths: - - '**.php' - - 'phpbench.json' - pull_request: - paths: - - '**.php' - - 'phpbench.json' - -jobs: - benchmarks: - name: Benchmarks - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '8.2' - coverage: none - - - name: Install composer dependencies - uses: ramsey/composer-install@v2 - - - name: Run Benchmark - run: composer benchmark diff --git a/tests/Support/DataTypeTest.php b/tests/Support/DataTypeTest.php index 09e098317..b2cdc4209 100644 --- a/tests/Support/DataTypeTest.php +++ b/tests/Support/DataTypeTest.php @@ -181,9 +181,9 @@ function resolveDataType(object $class, string $property = 'property'): DataType }); it('can deduce a nullable intersection type definition', function () { - $type = resolveDataType(new class () { - public (DateTime & DateTimeImmutable)|null $property; - }); + $code = '$type = resolveDataType(new class () {public (DateTime & DateTimeImmutable)|null $property;});'; + + eval($code); // We support PHP 8.1 which craches on this expect($type) ->isOptional->toBeFalse() @@ -200,7 +200,7 @@ function resolveDataType(object $class, string $property = 'property'): DataType expect($type->type) ->toBeInstanceOf(IntersectionType::class); -}); +})->skipOnPhp('<8.2'); it('can deduce a mixed type', function () { $type = resolveDataType(new class () {