From 28b5b0cab5eeaecaa4cb2b4f765c1d0d354550e4 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Tue, 12 Nov 2024 09:42:11 +0100 Subject: Add PHPStan as a developer dependency. PHPStan is a static PHP code analyzer that's aimed at finding actual bugs in the code. Where PHP Code Sniffer is about codeing standards, PHPStan is about correctness of code. The provided configuration file (`phpstan.neon.dist`) is configured to use the _lowest_ level of checks that PHPStan will report on. See https://phpstan.org/user-guide/rule-levels for information about the various rule levels. Run an analysis of the code base like this: % ./vendor/bin/phpstan It will output any found issues to stdout. You can also run it like this: % ./vendor/bin/phpstan --error-format=raw > phpstan.log This will give you an output file in a format that's suitable for use with typical editors for mapping errors to source locations. --- composer.lock | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) (limited to 'composer.lock') diff --git a/composer.lock b/composer.lock index bd93a21c3..ff18325b6 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": "af78c134e185358751c8cbbfc10be926", + "content-hash": "e5653c972f4ef70468062a8b16627cd1", "packages": [ { "name": "blueimp/jquery-file-upload", @@ -3292,6 +3292,64 @@ ], "time": "2022-03-24T13:33:01+00:00" }, + { + "name": "phpstan/phpstan", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "72115ab2bf1e40af1f9b238938d493ba7f3221e7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/72115ab2bf1e40af1f9b238938d493ba7f3221e7", + "reference": "72115ab2bf1e40af1f9b238938d493ba7f3221e7", + "shasum": "" + }, + "require": { + "php": "^7.4|^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" + } + ], + "time": "2024-11-11T07:06:55+00:00" + }, { "name": "phpunit/php-code-coverage", "version": "10.1.14", -- cgit v1.2.3