diff --git a/.gitattributes b/.gitattributes
index b525bdb..49067b5 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -14,6 +14,5 @@
/phpstan.neon.dist export-ignore
/phpstan-baseline.neon export-ignore
/phpunit.xml.dist export-ignore
-/phpunit-phpstan.xml.dist export-ignore
/tests export-ignore
/CONTRIBUTING.md export-ignore
diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml
index 6ba1fca..b2c8900 100644
--- a/.github/workflows/continuous-integration.yml
+++ b/.github/workflows/continuous-integration.yml
@@ -51,46 +51,4 @@ jobs:
composer update ${{ env.COMPOSER_FLAGS }}
- name: "Run tests"
- run: "vendor/bin/simple-phpunit --verbose"
-
- phpstan_tests:
- name: "CI PHPStan Ext"
-
- runs-on: ubuntu-latest
-
- strategy:
- matrix:
- php-version:
- - "7.3"
- - "8.3"
-
- steps:
- - name: "Checkout"
- uses: "actions/checkout@v2"
-
- - name: "Install PHP"
- uses: "shivammathur/setup-php@v2"
- with:
- coverage: "none"
- php-version: "${{ matrix.php-version }}"
-
- - name: Get composer cache directory
- id: composercache
- run: echo "::set-output name=dir::$(composer config cache-files-dir)"
-
- - name: Cache dependencies
- uses: actions/cache@v2
- with:
- path: ${{ steps.composercache.outputs.dir }}
- key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
- restore-keys: ${{ runner.os }}-composer-
-
- - name: "Install latest dependencies"
- run: |
- # Require PHPUnit directly bypassing the symfony bridge
- composer remove symfony/phpunit-bridge --dev --no-update
- composer require phpunit/phpunit:^9 --dev --no-update
- composer update ${{ env.COMPOSER_FLAGS }}
-
- - name: "Run tests"
- run: vendor/bin/phpunit -c phpunit-phpstan.xml.dist
+ run: "vendor/bin/phpunit"
diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml
index 93bea17..f135b11 100644
--- a/.github/workflows/phpstan.yml
+++ b/.github/workflows/phpstan.yml
@@ -44,8 +44,5 @@ jobs:
- name: "Install latest dependencies"
run: "composer update ${{ env.COMPOSER_FLAGS }}"
- - name: "Initialize PHPUnit sources"
- run: "vendor/bin/simple-phpunit --filter NO_TEST_JUST_AUTOLOAD_THANKS"
-
- name: "Run PHPStan"
run: "composer phpstan"
diff --git a/composer.json b/composer.json
index 9531696..ec707cc 100644
--- a/composer.json
+++ b/composer.json
@@ -20,7 +20,7 @@
"php": "^7.2 || ^8.0"
},
"require-dev": {
- "symfony/phpunit-bridge": "^7",
+ "phpunit/phpunit": "^8 || ^9",
"phpstan/phpstan": "^1.11.6",
"phpstan/phpstan-strict-rules": "^1.1"
},
@@ -43,7 +43,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 900cf2d..890f3bc 100644
--- a/phpstan.neon.dist
+++ b/phpstan.neon.dist
@@ -8,7 +8,7 @@ parameters:
treatPhpDocTypesAsCertain: false
bootstrapFiles:
- - tests/phpstan-locate-phpunit-autoloader.php
+ - vendor/autoload.php
excludePaths:
- tests/PHPStanTests/nsrt/*
diff --git a/phpunit-phpstan.xml.dist b/phpunit-phpstan.xml.dist
deleted file mode 100644
index 1ab1ead..0000000
--- a/phpunit-phpstan.xml.dist
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
- tests/PHPStanTests
-
-
-
-
-
- src
-
-
-
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 4b57ef9..4a7697f 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -8,8 +8,7 @@
>
- tests/PregTests
- tests/RegexTests
+ tests
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';