Skip to content

Commit

Permalink
Use PHPStan instead of Psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Jun 26, 2024
1 parent cfa37ed commit 11bb73b
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 40 deletions.
24 changes: 12 additions & 12 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/.gitattributes export-ignore
/.gitignore export-ignore
/.github export-ignore
/.phive export-ignore
/.php-cs-fixer.dist.php export-ignore
/.psalm export-ignore
/build export-ignore
/build.xml export-ignore
/phpunit.xml export-ignore
/tests export-ignore
/tools export-ignore
/tools/* binary
/.gitattributes export-ignore
/.gitignore export-ignore
/.github export-ignore
/.phive export-ignore
/.php-cs-fixer.dist.php export-ignore
/build export-ignore
/build.xml export-ignore
/phpstan.neon export-ignore
/phpunit.xml export-ignore
/tests export-ignore
/tools export-ignore
/tools/* binary

*.php diff=php
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
- name: Run PHP-CS-Fixer
run: ./tools/php-cs-fixer fix --dry-run --show-progress=dots --using-cache=no --verbose

type-checker:
name: Type Checker
static-analysis:
name: Static Analysis

runs-on: ubuntu-latest

Expand All @@ -49,8 +49,8 @@ jobs:
- name: Install dependencies with Composer
run: ./tools/composer update --no-interaction --no-ansi --no-progress

- name: Run Psalm
run: ./tools/psalm --config=.psalm/config.xml --no-progress --shepherd --show-info=false --stats
- name: Run PHPStan
run: ./tools/phpstan analyse --no-progress --error-format=github

tests:
name: Tests
Expand Down
6 changes: 3 additions & 3 deletions .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="php-cs-fixer" version="^3.0" installed="3.41.1" location="./tools/php-cs-fixer" copy="true"/>
<phar name="psalm" version="^5.0" installed="5.18.0" location="./tools/psalm" copy="true"/>
<phar name="composer" version="^2.0.3" installed="2.6.6" location="./tools/composer" copy="true"/>
<phar name="php-cs-fixer" version="^3.59" installed="3.59.3" location="./tools/php-cs-fixer" copy="true"/>
<phar name="composer" version="^2.7" installed="2.7.7" location="./tools/composer" copy="true"/>
<phar name="phpstan" version="^1.11" installed="1.11.5" location="./tools/phpstan" copy="true"/>
</phive>
2 changes: 0 additions & 2 deletions .psalm/baseline.xml

This file was deleted.

17 changes: 0 additions & 17 deletions .psalm/config.xml

This file was deleted.

1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[![Latest Stable Version](https://poser.pugx.org/sebastian/object-reflector/v/stable.png)](https://packagist.org/packages/sebastian/object-reflector)
[![CI Status](https://github.com/sebastianbergmann/object-reflector/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/object-reflector/actions)
[![Type Coverage](https://shepherd.dev/github/sebastianbergmann/object-reflector/coverage.svg)](https://shepherd.dev/github/sebastianbergmann/object-reflector)
[![codecov](https://codecov.io/gh/sebastianbergmann/object-reflector/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/object-reflector)

# sebastian/object-reflector
Expand Down
5 changes: 5 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
parameters:
level: 9
paths:
- src
- tests/unit
2 changes: 1 addition & 1 deletion src/ObjectReflector.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
final class ObjectReflector
{
/**
* @psalm-return array<string,mixed>
* @return array<string, mixed>
*/
public function getProperties(object $object): array
{
Expand Down
Binary file modified tools/composer
Binary file not shown.
Binary file modified tools/php-cs-fixer
Binary file not shown.
Binary file added tools/phpstan
Binary file not shown.
Binary file removed tools/psalm
Binary file not shown.

0 comments on commit 11bb73b

Please sign in to comment.