diff --git a/.gitattributes b/.gitattributes index b10f1a7..7da953e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -8,6 +8,5 @@ /phpstan.neon.dist export-ignore /phpstan-baseline.neon export-ignore /phpunit.xml.dist export-ignore -/psalm.xml.dist export-ignore /renovate.json export-ignore /tests export-ignore diff --git a/.github/workflows/infection.yaml b/.github/workflows/infection.yaml index f102a9b..87e913d 100644 --- a/.github/workflows/infection.yaml +++ b/.github/workflows/infection.yaml @@ -38,6 +38,6 @@ jobs: uses: "ramsey/composer-install@v1" - name: Run Infection - run: vendor/bin/roave-infection-static-analysis-plugin --threads=$(nproc) + run: vendor/bin/infection --threads=$(nproc) env: STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index dc13b05..504c46f 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -36,35 +36,3 @@ jobs: - name: "Run a static analysis with phpstan/phpstan" run: "vendor/bin/phpstan analyse --error-format=checkstyle | cs2pr" - - static-analysis-psalm: - name: "Static Analysis with Psalm" - runs-on: "ubuntu-22.04" - - steps: - - name: "Checkout code" - uses: actions/checkout@v4 - - - name: Install librdkafka - run: | - chmod +x .ci/install_rdkafka.sh - .ci/install_rdkafka.sh - - - name: "Install PHP" - uses: "shivammathur/setup-php@v2" - with: - php-version: "8.2" - coverage: "none" - extensions: "rdkafka" - tools: "cs2pr" - - - name: "Install dependencies with Composer" - uses: "ramsey/composer-install@v1" - - - name: "Run a static analysis with vimeo/psalm" - run: "vendor/bin/psalm --output-format=github --shepherd --taint-analysis --report=results.sarif" - - - name: "Upload Security Analysis results to GitHub" - uses: github/codeql-action/upload-sarif@v3 - with: - sarif_file: results.sarif diff --git a/.gitignore b/.gitignore index 56ed85a..6f24d73 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,5 @@ /composer.lock /phpcs.xml /phpstan.neon -/psalm.xml /phpunit.xml /vendor/ diff --git a/README.md b/README.md index c46aa96..14f28c5 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # PHP Kafka boilerplate wrapper around RdKafka [![GitHub Actions][GA Image]][GA Link] -[![Shepherd Type][Shepherd Image]][Shepherd Link] [![Code Coverage][Coverage Image]][CodeCov Link] [![Downloads][Downloads Image]][Packagist Link] [![Packagist][Packagist Image]][Packagist Link] @@ -129,10 +128,6 @@ final class ExampleBatchConsumer [GA Link]: https://github.com/simPod/PhpKafka/actions?query=workflow%3A%22CI%22+branch%3Amaster -[Shepherd Image]: https://shepherd.dev/github/simPod/PhpKafka/coverage.svg - -[Shepherd Link]: https://shepherd.dev/github/simPod/PhpKafka - [Coverage Image]: https://codecov.io/gh/simPod/PhpKafka/branch/master/graph/badge.svg [CodeCov Link]: https://codecov.io/gh/simPod/PhpKafka/branch/master diff --git a/composer.json b/composer.json index 6945ac9..9401ae8 100644 --- a/composer.json +++ b/composer.json @@ -33,10 +33,8 @@ "phpstan/phpstan-phpunit": "1.3.15", "phpstan/phpstan-strict-rules": "1.5.2", "phpunit/phpunit": "^10.3", - "psalm/plugin-phpunit": "^0.18.0", "roave/infection-static-analysis-plugin": "^1.7", - "thecodingmachine/phpstan-safe-rule": "^1.0", - "vimeo/psalm": "^5.0" + "thecodingmachine/phpstan-safe-rule": "^1.0" }, "suggest": { "kwn/php-rdkafka-stubs": "Support and autocompletion for RDKafka in IDE | require as dev dependency" diff --git a/psalm.xml.dist b/psalm.xml.dist deleted file mode 100644 index 19395cc..0000000 --- a/psalm.xml.dist +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - diff --git a/src/Clients/Producer/KafkaProducer.php b/src/Clients/Producer/KafkaProducer.php index c902a91..679e733 100644 --- a/src/Clients/Producer/KafkaProducer.php +++ b/src/Clients/Producer/KafkaProducer.php @@ -53,7 +53,7 @@ public function produce( ); } - /** @psalm-var ProducerTopic $topic Psalm thinks this is a Topic https://github.com/vimeo/psalm/issues/3406 */ + /** @phpstan-var ProducerTopic $topic Psalm thinks this is a Topic https://github.com/vimeo/psalm/issues/3406 */ $topic = $this->newTopic($topicName); $topic->producev( $partition ?? RD_KAFKA_PARTITION_UA,