From 9f0ad7301aac2315a4abf3b858be7a9104e78662 Mon Sep 17 00:00:00 2001 From: Belle Aerni Date: Sat, 6 Apr 2024 21:33:55 -0700 Subject: [PATCH] + PHPStan --- .github/workflows/phpstan.yml | 17 +++++++++ composer.json | 3 ++ composer.lock | 67 +++++++++++++++++++++++++++++++++-- 3 files changed, 85 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/phpstan.yml diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml new file mode 100644 index 0000000..50ea535 --- /dev/null +++ b/.github/workflows/phpstan.yml @@ -0,0 +1,17 @@ +name: PHPStan + +on: + push: + branches: [main] + pull_request: + +jobs: + build-test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: php-actions/composer@v6 + with: + php_extensions: brotli zstd zlib + - uses: php-actions/phpstan@v3 diff --git a/composer.json b/composer.json index 5dc6abe..b1b31c3 100644 --- a/composer.json +++ b/composer.json @@ -25,5 +25,8 @@ }, "config": { "sort-packages": true + }, + "require-dev": { + "phpstan/phpstan": "^1.10" } } diff --git a/composer.lock b/composer.lock index 10b9301..1a6f70e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5e4e7c54c9c6ea6f663266fcea162b25", + "content-hash": "f4c96c7ca71c012fcc4d30dba920a897", "packages": [ { "name": "asispts/http-accept", @@ -62,7 +62,70 @@ "time": "2023-04-28T02:59:23+00:00" } ], - "packages-dev": [], + "packages-dev": [ + { + "name": "phpstan/phpstan", + "version": "1.10.66", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "94779c987e4ebd620025d9e5fdd23323903950bd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/94779c987e4ebd620025d9e5fdd23323903950bd", + "reference": "94779c987e4ebd620025d9e5fdd23323903950bd", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], + "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", + "issues": "https://github.com/phpstan/phpstan/issues", + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" + } + ], + "time": "2024-03-28T16:17:31+00:00" + } + ], "aliases": [], "minimum-stability": "stable", "stability-flags": [],