diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 638cb71..3a95cec 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,10 +10,10 @@ jobs: strategy: fail-fast: false matrix: - php: [ 7.2, 7.3, 7.4, 8.0 ] + php: [ 7.3, 7.4, 8.0, 8.1 ] experimental: [ false ] include: - - php: 8.0 + - php: 8.1 analysis: true steps: diff --git a/composer.json b/composer.json index 876c142..b56a5d3 100644 --- a/composer.json +++ b/composer.json @@ -34,13 +34,14 @@ ] }, "require": { - "php": "^7.2 || ^8.0", + "php": "^7.3 || ^8.0", "nikic/php-parser": "^4.4" }, "require-dev": { - "phpstan/phpstan": "^0.12 || ^1.0", - "phpunit/phpunit": "^8.5 || ^9.3", - "squizlabs/php_codesniffer": "^3.5" + "phpstan/phpstan": "^1.4", + "phpunit/phpunit": "^9.5", + "phpspec/prophecy-phpunit": "^2.0", + "squizlabs/php_codesniffer": "^3.6" }, "scripts": { "test": [ diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 5f44a59..6c6365d 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,29 +1,17 @@ - - - - - ./tests/ - - - - - - src/ - - - - - - - + + + + src/ + + + + + + + + ./tests/ + + + diff --git a/tests/CodeConverterTest.php b/tests/CodeConverterTest.php index 8c94678..e878f77 100644 --- a/tests/CodeConverterTest.php +++ b/tests/CodeConverterTest.php @@ -14,11 +14,14 @@ use PhpParser\Parser; use PHPUnit\Framework\TestCase; use Prophecy\Argument; +use Prophecy\PhpUnit\ProphecyTrait; use Prophecy\Prophecy\MethodProphecy; use RuntimeException; class CodeConverterTest extends TestCase { + use ProphecyTrait; + public function testConvert(): void { $converter = new CodeConverter(); diff --git a/tests/OverrideTest.php b/tests/OverrideTest.php index f2ee4f7..04a2a87 100644 --- a/tests/OverrideTest.php +++ b/tests/OverrideTest.php @@ -16,6 +16,7 @@ use Composer\Autoload\ClassLoader; use PHPUnit\Framework\TestCase; use Prophecy\Argument; +use Prophecy\PhpUnit\ProphecyTrait; use Prophecy\Prophecy\MethodProphecy; use ReflectionMethod; use ReflectionProperty; @@ -26,6 +27,8 @@ */ class OverrideTest extends TestCase { + use ProphecyTrait; + public function testSetCodeConverter() { $converter = $this->createMock(CodeConverter::class);