diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 7992300..3cb573a 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -30,16 +30,16 @@ jobs: os: windows-latest steps: - - uses: "actions/checkout@v4" + - uses: actions/checkout@v4 - - uses: "shivammathur/setup-php@v2" + - uses: shivammathur/setup-php@v2 with: - coverage: "none" php-version: "${{ matrix.php-version }}" + coverage: none - - uses: "ramsey/composer-install@v3" + - uses: ramsey/composer-install@v3 with: dependency-versions: highest - - name: "Run tests" - run: "vendor/bin/simple-phpunit --verbose" + - name: Run tests + run: composer test diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index 4c106f6..2ad56fa 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -20,19 +20,16 @@ jobs: - "8.3" steps: - - uses: "actions/checkout@v4" + - uses: actions/checkout@v4 - - uses: "shivammathur/setup-php@v2" + - uses: shivammathur/setup-php@v2 with: - coverage: "none" php-version: "${{ matrix.php-version }}" + coverage: none - - uses: "ramsey/composer-install@v3" + - uses: ramsey/composer-install@v3 with: dependency-versions: highest - - name: "Initialize PHPUnit sources" - run: "vendor/bin/simple-phpunit --filter NO_TEST_JUST_AUTOLOAD_THANKS" - - - name: "Run PHPStan" - run: "composer phpstan" + - name: Run PHPStan + run: composer phpstan diff --git a/composer.json b/composer.json index 59aa759..701ec9e 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "composer/pcre": "^2.1 || ^3.1" }, "require-dev": { - "symfony/phpunit-bridge": "^5", + "phpunit/phpunit": "^8", "phpstan/phpstan": "^1.6", "phpstan/phpstan-deprecation-rules": "^1", "phpstan/phpstan-strict-rules": "^1.1", @@ -42,7 +42,7 @@ } }, "scripts": { - "test": "SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1 vendor/bin/simple-phpunit", + "test": "vendor/bin/phpunit", "phpstan": "phpstan analyse" } } diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 53a9a6b..530eed0 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -14,8 +14,5 @@ parameters: reportUnmatchedIgnoredErrors: false treatPhpDocTypesAsCertain: false - bootstrapFiles: - - tests/phpstan-locate-phpunit-autoloader.php - excludePaths: - 'tests/Fixtures/*' diff --git a/tests/phpstan-locate-phpunit-autoloader.php b/tests/phpstan-locate-phpunit-autoloader.php deleted file mode 100644 index a9e670c..0000000 --- a/tests/phpstan-locate-phpunit-autoloader.php +++ /dev/null @@ -1,22 +0,0 @@ -= 80000 && false !== strpos((string) $dir, 'phpunit-9')) { - break; - } - if (PHP_VERSION_ID < 80000 && false !== strpos((string) $dir, 'phpunit-8')) { - break; - } -} - -if (null === $bestDirFound) { - echo 'Run "composer test" to initialize PHPUnit sources before running PHPStan'.PHP_EOL; - exit(1); -} - -include $bestDirFound.'/vendor/autoload.php';