diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc7a054..6a9717e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -89,13 +89,19 @@ jobs: - name: Run psalm if: ${{ matrix.os != 'windows-latest' }} run: vendor/bin/psalm - - name: Run phan + - name: Install and run phan if: ${{ matrix.os != 'windows-latest' }} - run: vendor/bin/phan + run: | + rm composer.lock + composer require ${{ matrix.dependencies_level }} --dev phan/phan:^5.4.5 + vendor/bin/phan # AST 1.1 binary for Windows seems to be missing on PECL - - name: Run phan with polyfill + - name: Install and run phan with polyfill if: ${{ matrix.os == 'windows-latest' }} - run: vendor/bin/phan --allow-polyfill-parser + run: | + rm composer.lock + composer require ${{ matrix.dependencies_level }} --dev phan/phan:^5.4.5 + vendor/bin/phan --allow-polyfill-parser - name: Run tests with coverage if: ${{ matrix.os != 'windows-latest' && matrix.php_version == '8.1' && matrix.dependencies_level != '--prefer-lowest' }} run: php vendor/bin/phpunit --coverage-clover=coverage.xml --coverage-cobertura=cobertura.xml --log-junit=junit.xml diff --git a/.phan/config.php b/.phan/config.php index 48d2cfc..d91abd2 100644 --- a/.phan/config.php +++ b/.phan/config.php @@ -22,8 +22,7 @@ 'directory_list' => [ 'MO4', 'tests', - 'vendor/squizlabs/php_codesniffer', - 'vendor/symfony/polyfill-php83', + 'vendor', ], // A directory list that defines files that will be excluded @@ -38,6 +37,6 @@ // should be added to both the `directory_list` // and `exclude_analysis_directory_list` arrays. "exclude_analysis_directory_list" => [ - 'vendor/' + 'vendor/', ], ]; diff --git a/MO4/Library/PregLibrary.php b/MO4/Library/PregLibrary.php index e32445e..5925dc0 100644 --- a/MO4/Library/PregLibrary.php +++ b/MO4/Library/PregLibrary.php @@ -16,6 +16,9 @@ use PHP_CodeSniffer\Exceptions\RuntimeException; +/** + * @psalm-api + */ final class PregLibrary { /** diff --git a/composer.json b/composer.json index c59be4e..afc89cd 100644 --- a/composer.json +++ b/composer.json @@ -32,12 +32,10 @@ "require-dev": { "ergebnis/composer-normalize": "^2.45", "nikic/php-parser": "< 5.0.1", - "phan/phan": "^5.4.5", "phpstan/phpstan": "^2.0", "phpstan/phpstan-strict-rules": "^2.0", "phpunit/phpunit": "^9.6.15", "psalm/plugin-phpunit": "^0.19", - "sabre/event": ">= 5.1.6", "symfony/filesystem": ">= 5.4.45", "symfony/polyfill-php83": "^1.32", "vimeo/psalm": "^6.0.0"