Skip to content

Commit

Permalink
ci: drop psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
simPod committed Feb 26, 2024
1 parent 717e9b6 commit a4250ab
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 61 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -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
32 changes: 0 additions & 32 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
/composer.lock
/phpcs.xml
/phpstan.neon
/psalm.xml
/phpunit.xml
/vendor/
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -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]
Expand Down Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
18 changes: 0 additions & 18 deletions psalm.xml.dist

This file was deleted.

2 changes: 1 addition & 1 deletion src/Clients/Producer/KafkaProducer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a4250ab

Please sign in to comment.