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
1 change: 1 addition & 0 deletions build/ignore-by-php-version.neon.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
}
if (PHP_VERSION_ID >= 80100) {
$includes[] = __DIR__ . '/baseline-8.1.neon';
$includes[] = __DIR__ . '/../vendor/shipmonk/dead-code-detector/rules.neon';
} else {
$includes[] = __DIR__ . '/enums.neon';
$includes[] = __DIR__ . '/readonly-property.neon';
Expand Down
15 changes: 14 additions & 1 deletion build/phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ includes:
- ../vendor/phpstan/phpstan-phpunit/extension.neon
- ../vendor/phpstan/phpstan-phpunit/rules.neon
- ../vendor/phpstan/phpstan-strict-rules/rules.neon
- ../vendor/shipmonk/dead-code-detector/rules.neon
- ../conf/bleedingEdge.neon
- ../phpstan-baseline.neon
- ../phpstan-baseline.php
Expand Down Expand Up @@ -81,16 +80,27 @@ parameters:
-
identifier: shipmonk.deadMethod
message: '#^Unused .*?Factory::create#' # likely used in DIC
reportUnmatched: false
-
identifier: shipmonk.deadMethod
message: '#^Unused PHPStan\\DependencyInjection\\BleedingEdgeToggle::isBleedingEdge#' # kept for future use
reportUnmatched: false
-
identifier: shipmonk.deadMethod
paths:
- ../tests/PHPStan/Tests
- ../tests/e2e
reportUnmatched: false
-
identifier: shipmonk.deadConstant
paths:
- ../tests/PHPStan/Fixture
reportUnmatched: false # constants on enums, not reported on PHP8-
-
identifier: shipmonk.deadEnumCase
paths:
- ../tests/PHPStan/Fixture
reportUnmatched: false # enum cases, not reported on PHP8-
-
message: '''
#^Access to constant on deprecated class DeprecatedAnnotations\\DeprecatedFoo\:
Expand Down Expand Up @@ -120,6 +130,9 @@ parameters:
identifier: shipmonk.deadMethod
path: ../src/Internal/CombinationsHelper.php
reportUnmatched: false
-
rawMessage: 'Property PHPStan\Command\CommandHelper::$reservedMemory is never read' # intentional
reportUnmatched: false
reportStaticMethodSignatures: true
tmpDir: %rootDir%/tmp
stubFiles:
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"phpstan/phpstan-strict-rules": "^2.0",
"phpunit/phpunit": "^11.5.23",
"shipmonk/composer-dependency-analyser": "^1.5",
"shipmonk/dead-code-detector": "^0.14.0",
"shipmonk/dead-code-detector": "^1.0.0",
"shipmonk/name-collision-detector": "^2.0"
},
"config": {
Expand Down
47 changes: 27 additions & 20 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/DependencyInjection/BleedingEdgeToggle.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ final class BleedingEdgeToggle

private static bool $bleedingEdge = false;

public static function isBleedingEdge(): bool // @phpstan-ignore shipmonk.deadMethod (kept for future use)
public static function isBleedingEdge(): bool
{
return self::$bleedingEdge;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Internal/DirectoryCreatorException.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
final class DirectoryCreatorException extends Exception
{

public function __construct(public readonly string $directory)
public function __construct(string $directory)
{
$error = error_get_last();

Expand Down
Loading