Skip to content

Commit e70c3dd

Browse files
authored
Merge pull request #603 from mimmi20/dependabot/composer/development-dependencies-4bd66fff28
composer (master)(deps-dev): bump the development-dependencies group with 3 updates
2 parents cb50419 + 45997dc commit e70c3dd

7 files changed

Lines changed: 367 additions & 328 deletions

composer-dependency-analyser.php

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,24 @@
2020
// Adjusting scanned paths
2121
->addPathToScan(__DIR__ . '/src', isDev: false)
2222
->addPathToScan(__DIR__ . '/tests', isDev: true)
23-
->addPathToScan(__DIR__ . '/vendor', isDev: false)
24-
->addPathToExclude(__DIR__ . '/vendor/rector/rector')
25-
->addPathToExclude(__DIR__ . '/vendor/phpstan/phpstan')
2623
// applies only to directory scanning, not directly listed files
2724
->setFileExtensions(['php'])
2825

29-
// Ignoring errors in vendor directory
30-
->ignoreErrorsOnPath(__DIR__ . '/vendor', [ErrorType::SHADOW_DEPENDENCY])
31-
->ignoreErrorsOnPath(__DIR__ . '/vendor', [ErrorType::UNKNOWN_FUNCTION])
32-
->ignoreErrorsOnPath(__DIR__ . '/vendor', [ErrorType::UNKNOWN_CLASS])
33-
->ignoreErrorsOnPath(__DIR__ . '/vendor', [ErrorType::DEV_DEPENDENCY_IN_PROD])
34-
3526
// do not complain about some modules
3627
->ignoreErrorsOnPackage('mimmi20/coding-standard', [ErrorType::UNUSED_DEPENDENCY])
3728
->ignoreErrorsOnPackage('phpstan/extension-installer', [ErrorType::UNUSED_DEPENDENCY])
3829
->ignoreErrorsOnPackage('phpstan/phpstan-deprecation-rules', [ErrorType::UNUSED_DEPENDENCY])
30+
->ignoreErrorsOnPackage('ergebnis/composer-normalize', [ErrorType::UNUSED_DEPENDENCY])
31+
->ignoreErrorsOnPackage('infection/infection', [ErrorType::UNUSED_DEPENDENCY])
32+
->ignoreErrorsOnPackage('phpstan/phpstan', [ErrorType::UNUSED_DEPENDENCY])
33+
->ignoreErrorsOnPackage('rector/rector', [ErrorType::UNUSED_DEPENDENCY])
34+
->ignoreErrorsOnPackage('shipmonk/composer-dependency-analyser', [ErrorType::UNUSED_DEPENDENCY])
35+
->ignoreErrorsOnPackage('symplify/phpstan-rules', [ErrorType::UNUSED_DEPENDENCY])
36+
->ignoreErrorsOnPackage('tomasvotruba/cognitive-complexity', [ErrorType::UNUSED_DEPENDENCY])
37+
->ignoreErrorsOnPackage('tomasvotruba/type-coverage', [ErrorType::UNUSED_DEPENDENCY])
38+
->ignoreErrorsOnPackage('tomasvotruba/unused-public', [ErrorType::UNUSED_DEPENDENCY])
39+
->ignoreErrorsOnPackage('phpstan/phpstan-phpunit', [ErrorType::UNUSED_DEPENDENCY])
40+
->ignoreErrorsOnPackage('rector/type-perfect', [ErrorType::UNUSED_DEPENDENCY])
3941
->ignoreErrorsOnPackage(
4042
'jbelien/phpstan-sarif-formatter',
4143
[ErrorType::UNUSED_DEPENDENCY],

composer.json

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,19 @@
3333
"psr/http-server-middleware": "^1.0.2"
3434
},
3535
"require-dev": {
36-
"ext-ctype": "*",
37-
"ext-dom": "*",
38-
"ext-simplexml": "*",
39-
"ext-tokenizer": "*",
40-
"ext-xml": "*",
41-
"ext-xmlwriter": "*",
4236
"ergebnis/composer-normalize": "^2.52.0",
43-
"infection/infection": "^0.34.1",
37+
"infection/infection": "^0.34.2",
4438
"jbelien/phpstan-sarif-formatter": "^1.2.0",
4539
"laminas/laminas-servicemanager": "^4.5.1",
4640
"mimmi20/coding-standard": "^6.2.5",
47-
"nikic/php-parser": "^5.8.0",
4841
"phpstan/extension-installer": "^1.4.3",
49-
"phpstan/phpstan": "^2.2.7",
42+
"phpstan/phpstan": "^2.2.8",
5043
"phpstan/phpstan-deprecation-rules": "^2.0.5",
44+
"phpstan/phpstan-phpunit": "^2.0.18",
5145
"phpunit/phpunit": "^12.4.5",
52-
"rector/rector": "^2.5.9",
46+
"rector/rector": "^2.6.2",
5347
"rector/type-perfect": "^2.2.0",
5448
"shipmonk/composer-dependency-analyser": "^1.8.4",
55-
"symfony/process": "^7.3.4",
5649
"symplify/phpstan-rules": "^14.10.0",
5750
"tomasvotruba/cognitive-complexity": "^1.2.0",
5851
"tomasvotruba/type-coverage": "^2.2.1",

phpstan.neon

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ parameters:
109109

110110
ignoreErrors:
111111
- '~will always evaluate to true~'
112+
-
113+
identifier: argument.named
112114

113115
stubFiles:
114116
- stubs/psr/http-factory/ResponseFactoryInterface.stub

rector.php

Lines changed: 48 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,40 +11,63 @@
1111

1212
declare(strict_types = 1);
1313

14+
use Rector\CodeQuality\Rector\If_\ExplicitBoolCompareRector;
1415
use Rector\Config\RectorConfig;
1516
use Rector\DeadCode\Rector\If_\RemoveAlwaysTrueIfConditionRector;
1617
use Rector\DeadCode\Rector\If_\RemoveDeadInstanceOfRector;
1718
use Rector\DeadCode\Rector\StaticCall\RemoveParentCallWithoutParentRector;
1819
use Rector\DeadCode\Rector\StmtsAwareInterface\RemoveDeadInstanceOfAssertRector;
20+
use Rector\Naming\Rector\Class_\RenamePropertyToMatchTypeRector;
21+
use Rector\Naming\Rector\ClassMethod\RenameParamToMatchTypeRector;
22+
use Rector\Php80\Rector\Class_\AnnotationToAttributeRector;
1923
use Rector\Php81\Rector\Property\ReadOnlyPropertyRector;
20-
use Rector\PHPUnit\Set\PHPUnitSetList;
21-
use Rector\Set\ValueObject\LevelSetList;
22-
use Rector\Set\ValueObject\SetList;
24+
use Rector\PHPUnit\CodeQuality\Rector\Class_\PreferPHPUnitThisCallRector;
25+
use Rector\PHPUnit\CodeQuality\Rector\Class_\YieldDataProviderRector;
26+
use Rector\PHPUnit\CodeQuality\Rector\ClassMethod\NoSetupWithParentCallOverrideRector;
27+
use Rector\PHPUnit\CodeQuality\Rector\FuncCall\AssertFuncCallToPHPUnitAssertRector;
28+
use Rector\ValueObject\PhpVersion;
2329

24-
return static function (RectorConfig $rectorConfig): void {
25-
$rectorConfig->paths([
30+
return RectorConfig::configure()
31+
->withPaths([
2632
__DIR__ . '/src',
2733
__DIR__ . '/tests',
28-
]);
29-
30-
$rectorConfig->sets([
31-
SetList::DEAD_CODE,
32-
LevelSetList::UP_TO_PHP_83,
33-
PHPUnitSetList::PHPUNIT_100,
34-
]);
35-
36-
$rectorConfig->skip(
37-
[
38-
RemoveDeadInstanceOfRector::class,
39-
RemoveAlwaysTrueIfConditionRector::class,
40-
RemoveParentCallWithoutParentRector::class,
41-
RemoveDeadInstanceOfAssertRector::class,
42-
],
43-
);
44-
45-
$rectorConfig->skip([
34+
])
35+
->withPhpVersion(PhpVersion::PHP_83)
36+
->withPreparedSets(
37+
deadCode: true,
38+
codeQuality: true,
39+
typeDeclarations: true,
40+
typeDeclarationDocblocks: true,
41+
naming: true,
42+
namedArgs: true,
43+
instanceOf: true,
44+
if: true,
45+
earlyReturn: true,
46+
phpunitCodeQuality: true,
47+
phpunitNarrowAsserts: true,
48+
phpunitMockToStub: true,
49+
)
50+
->withPhpSets(php83: true)
51+
->withAttributesSets(phpunit: true)
52+
->withComposerBased(phpunit: true)
53+
->withSkip([
54+
RemoveDeadInstanceOfRector::class,
55+
RemoveAlwaysTrueIfConditionRector::class,
56+
RemoveParentCallWithoutParentRector::class,
57+
AnnotationToAttributeRector::class,
58+
RemoveDeadInstanceOfAssertRector::class,
59+
PreferPHPUnitThisCallRector::class,
60+
AssertFuncCallToPHPUnitAssertRector::class,
61+
YieldDataProviderRector::class,
62+
RenamePropertyToMatchTypeRector::class,
63+
RenameParamToMatchTypeRector::class,
64+
ExplicitBoolCompareRector::class,
65+
NoSetupWithParentCallOverrideRector::class,
66+
])
67+
->withSkip([
4668
ReadOnlyPropertyRector::class => [
4769
__DIR__ . '/src/LaminasRbacFactory.php',
4870
],
49-
]);
50-
};
71+
])
72+
->withoutParallel()
73+
->withMemoryLimit('2048M');

src/AuthorizationMiddleware.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,14 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
8787
return $handler->handle($request);
8888
}
8989
}
90-
} else {
91-
if ($this->authorization->isGranted(null, $routeName, $this->defaultPrivilege, $request)) {
92-
return $handler->handle($request);
93-
}
90+
} elseif (
91+
$this->authorization->isGranted(
92+
resource: $routeName,
93+
privilege: $this->defaultPrivilege,
94+
request: $request,
95+
)
96+
) {
97+
return $handler->handle($request);
9498
}
9599

96100
try {

0 commit comments

Comments
 (0)