diff --git a/.github/workflows/compat_tests.yaml.yml b/.github/workflows/compat_tests.yaml.yml index 6a74a46..59a4ff2 100644 --- a/.github/workflows/compat_tests.yaml.yml +++ b/.github/workflows/compat_tests.yaml.yml @@ -12,6 +12,10 @@ jobs: fail-fast: false matrix: actions: + - + name: 'Rector dev + PHPUnit 10' + run: composer require "phpunit/phpunit:10.*" "nikic/php-parser:4.*" -W + php: 8.2 - name: 'Rector dev + PHPUnit 11' run: composer require "phpunit/phpunit:11.*" -W diff --git a/composer.json b/composer.json index 234082d..1aa3e32 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "Tests for compatibility with PHPStand and PHPUnit preload magic", "require-dev": { "php": "^8.2", - "phpunit/phpunit": "11.*|12.*", + "phpunit/phpunit": "10.*|11.*|12.*", "rector/rector": "dev-main", "phpstan/phpstan": "^2.1" }, diff --git a/tests/UsePHPParser4Test.php b/tests/UsePHPParser4Test.php new file mode 100644 index 0000000..52a230b --- /dev/null +++ b/tests/UsePHPParser4Test.php @@ -0,0 +1,21 @@ += 11) { + $this->markTestSkipped('Only for PHPUnit 11+'); + } + + // this uses nikic/php-parser v4 parser + (new \PhpParser\ParserFactory())->create(\PhpParser\ParserFactory::PREFER_PHP7); + + $this->assertTrue(true); + } +} \ No newline at end of file