From 599b7c0e6ed49bae83a40caa175271f8e0e6cacb Mon Sep 17 00:00:00 2001 From: Cees-Jan Kiewiet Date: Tue, 24 Sep 2024 15:14:30 +0200 Subject: [PATCH] Add: yamadashy/phpstan-friendly-formatter Add and enable https://github.com/yamadashy/phpstan-friendly-formatter to show PHPStan errors in a more useful way --- composer.json | 3 +- composer.lock | 164 ++++++++++++++++++++++++++++++++++++++++++++++++- extension.neon | 1 + 3 files changed, 166 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 90d7b01..905eee9 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,8 @@ "phpstan/phpstan-strict-rules": "^1.6.1", "thecodingmachine/phpstan-safe-rule": "^1.2", "thecodingmachine/phpstan-strict-rules": "^1.0", - "tomasvotruba/type-coverage": "^0.3.1" + "tomasvotruba/type-coverage": "^0.3.1", + "yamadashy/phpstan-friendly-formatter": "^1.1" }, "config": { "sort-packages": true, diff --git a/composer.lock b/composer.lock index 314c27b..fbfe941 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": "869fa068ce40b8fa4c0d7f9d0948b521", + "content-hash": "f78fdde0d6fb6f655ee6d5931a0ccb2a", "packages": [ { "name": "ergebnis/phpstan-rules", @@ -222,6 +222,107 @@ }, "time": "2024-03-05T20:51:40+00:00" }, + { + "name": "php-parallel-lint/php-console-color", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-parallel-lint/PHP-Console-Color.git", + "reference": "7adfefd530aa2d7570ba87100a99e2483a543b88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-parallel-lint/PHP-Console-Color/zipball/7adfefd530aa2d7570ba87100a99e2483a543b88", + "reference": "7adfefd530aa2d7570ba87100a99e2483a543b88", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "replace": { + "jakub-onderka/php-console-color": "*" + }, + "require-dev": { + "php-parallel-lint/php-code-style": "^2.0", + "php-parallel-lint/php-parallel-lint": "^1.0", + "php-parallel-lint/php-var-dump-check": "0.*", + "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHP_Parallel_Lint\\PhpConsoleColor\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Jakub Onderka", + "email": "jakub.onderka@gmail.com" + } + ], + "description": "Simple library for creating colored console ouput.", + "support": { + "issues": "https://github.com/php-parallel-lint/PHP-Console-Color/issues", + "source": "https://github.com/php-parallel-lint/PHP-Console-Color/tree/v1.0.1" + }, + "time": "2021-12-25T06:49:29+00:00" + }, + { + "name": "php-parallel-lint/php-console-highlighter", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-parallel-lint/PHP-Console-Highlighter.git", + "reference": "5b4803384d3303cf8e84141039ef56c8a123138d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-parallel-lint/PHP-Console-Highlighter/zipball/5b4803384d3303cf8e84141039ef56c8a123138d", + "reference": "5b4803384d3303cf8e84141039ef56c8a123138d", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.2", + "php-parallel-lint/php-console-color": "^1.0.1" + }, + "replace": { + "jakub-onderka/php-console-highlighter": "*" + }, + "require-dev": { + "php-parallel-lint/php-code-style": "^2.0", + "php-parallel-lint/php-parallel-lint": "^1.0", + "php-parallel-lint/php-var-dump-check": "0.*", + "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHP_Parallel_Lint\\PhpConsoleHighlighter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jakub Onderka", + "email": "acci@acci.cz", + "homepage": "http://www.acci.cz/" + } + ], + "description": "Highlight PHP code in terminal", + "support": { + "issues": "https://github.com/php-parallel-lint/PHP-Console-Highlighter/issues", + "source": "https://github.com/php-parallel-lint/PHP-Console-Highlighter/tree/v1.0.0" + }, + "time": "2022-02-18T08:23:19+00:00" + }, { "name": "phpstan/extension-installer", "version": "1.4.3", @@ -833,6 +934,67 @@ } ], "time": "2024-06-14T15:11:04+00:00" + }, + { + "name": "yamadashy/phpstan-friendly-formatter", + "version": "v1.1.2", + "source": { + "type": "git", + "url": "https://github.com/yamadashy/phpstan-friendly-formatter.git", + "reference": "da0cdb8eeb83433358a41a7f7b41f6e04a31d969" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yamadashy/phpstan-friendly-formatter/zipball/da0cdb8eeb83433358a41a7f7b41f6e04a31d969", + "reference": "da0cdb8eeb83433358a41a7f7b41f6e04a31d969", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "php-parallel-lint/php-console-highlighter": "^0.3 || ^0.4 || ^0.5 || ^1.0", + "phpstan/phpstan": "^0.12 || ^1.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.4.0", + "grifart/phpstan-oneline": "^0.4.2", + "phpstan/phpstan-phpunit": "^0.12.22 || ^1.0", + "phpunit/phpunit": "^8.5.26 || ^10.0.0" + }, + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "Yamadashy\\PhpStanFriendlyFormatter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kazuki Yamada", + "email": "koukun0120@gmail.com" + } + ], + "description": "Simple error formatter for PHPStan that display code frame", + "keywords": [ + "PHPStan", + "package", + "php", + "static analysis" + ], + "support": { + "issues": "https://github.com/yamadashy/phpstan-friendly-formatter/issues", + "source": "https://github.com/yamadashy/phpstan-friendly-formatter/tree/v1.1.2" + }, + "time": "2024-09-22T06:15:47+00:00" } ], "packages-dev": [], diff --git a/extension.neon b/extension.neon index b243cd4..cec9448 100644 --- a/extension.neon +++ b/extension.neon @@ -1,4 +1,5 @@ parameters: + errorFormat: friendly type_coverage: constant: 100 declare: 100