Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .github/workflows/code_analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,6 @@ jobs:
name: 'Tests'
run: vendor/bin/phpunit

-
name: 'PHP Linter'
run: vendor/bin/parallel-lint src tests

-
name: 'Check Commented Code'
run: vendor/bin/easy-ci check-commented-code src tests --ansi

-
name: 'Check Active Classes'
run: vendor/bin/class-leak check src --ansi
Expand Down
15 changes: 6 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,18 @@
"license": "MIT",
"require": {
"php": ">=8.1",
"phpstan/phpstan": "^1.10"
"phpstan/phpstan": "^1.10.52"
},
"require-dev": {
"illuminate/container": "^10.23",
"php-parallel-lint/php-parallel-lint": "^1.3",
"phpstan/extension-installer": "^1.2",
"illuminate/container": "^10.39",
"phpstan/extension-installer": "^1.3",
"phpunit/phpunit": "^10.3",
"rector/rector": "^0.18",
"symfony/dependency-injection": "^6.2",
"symfony/dependency-injection": "^6.4",
"symfony/finder": "^6.2",
"symplify/easy-ci": "11.3.1.72",
"symplify/easy-coding-standard": "^12.0",
"symplify/phpstan-rules": "^12.0",
"tomasvotruba/class-leak": "0.1.1.72",
"tomasvotruba/unused-public": "^0.3",
"symplify/phpstan-rules": "^12.4",
"tomasvotruba/class-leak": "^0.2",
"tracy/tracy": "^2.9"
},
"autoload": {
Expand Down
5 changes: 3 additions & 2 deletions src/ErrorFormatter/SymplifyErrorFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Symplify\PHPStanExtensions\ErrorFormatter;

use Nette\Utils\Strings;
use PHPStan\Analyser\Error;
use PHPStan\Command\AnalysisResult;
use PHPStan\Command\ErrorFormatter\ErrorFormatter;
Expand Down Expand Up @@ -87,7 +86,9 @@ private function separator(): void
private function getRelativePath(string $filePath): string
{
// remove trait clutter
$clearFilePath = Strings::replace($filePath, self::FILE_WITH_TRAIT_CONTEXT_REGEX, '$1');
/** @var string $clearFilePath */
$clearFilePath = preg_replace(self::FILE_WITH_TRAIT_CONTEXT_REGEX, '$1', $filePath);

if (! file_exists($clearFilePath)) {
return $clearFilePath;
}
Expand Down