Skip to content

Commit 2b380be

Browse files
committed
chore(api): rector to php82
Disable ClassPropertyAssignToConstructorPromotionRector It only added string casts to lambda arguments.
1 parent e9dc77d commit 2b380be

File tree

68 files changed

+145
-149
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+145
-149
lines changed

api/rector.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Rector\Doctrine\Bundle230\Rector\Class_\AddAnnotationToRepositoryRector;
1616
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;
1717
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
18+
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
1819
use Rector\PHPUnit\CodeQuality\Rector\Class_\PreferPHPUnitThisCallRector;
1920
use Rector\PHPUnit\CodeQuality\Rector\ClassMethod\AddInstanceofAssertForNullableInstanceRector;
2021
use Rector\PHPUnit\CodeQuality\Rector\MethodCall\AssertEmptyNullableObjectToAssertInstanceofRector;
@@ -36,7 +37,7 @@
3637
->withComposerBased(doctrine: true, phpunit: true, symfony: true)
3738
->withPreparedSets(deadCode: true, codeQuality: true, privatization: true, rectorPreset: true, phpunitCodeQuality: true, symfonyCodeQuality: true)
3839
->withAttributesSets(all: true)
39-
->withPhpSets(php80: true)
40+
->withPhpSets(php82: true)
4041
->withConfiguredRule(RenameFunctionRector::class, [
4142
'implode' => 'join',
4243
'join' => 'join',
@@ -54,6 +55,7 @@
5455
FinalizeTestCaseClassRector::class,
5556
FlipTypeControlToUseExclusiveTypeRector::class,
5657
LocallyCalledStaticMethodToNonStaticRector::class,
58+
NullToStrictStringFuncCallArgRector::class,
5759
PreferPHPUnitThisCallRector::class,
5860
RemoveDeadInstanceOfRector::class,
5961
SimplifyIfElseToTernaryRector::class,

api/src/Doctrine/Filter/CampCollaboratorFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ final class CampCollaboratorFilter extends AbstractFilter {
2020
public const QUERY_PARAM_NAME = 'campCollaborator';
2121

2222
public function __construct(
23-
private IriConverterInterface $iriConverter,
23+
private readonly IriConverterInterface $iriConverter,
2424
ManagerRegistry $managerRegistry,
2525
?LoggerInterface $logger = null,
2626
?array $properties = null,

api/src/Doctrine/Filter/ContentNodeCampFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ final class ContentNodeCampFilter extends AbstractFilter {
1818
public const CAMP_QUERY_NAME = 'camp';
1919

2020
public function __construct(
21-
private IriConverterInterface $iriConverter,
21+
private readonly IriConverterInterface $iriConverter,
2222
ManagerRegistry $managerRegistry,
2323
?LoggerInterface $logger = null,
2424
?array $properties = null,

api/src/Doctrine/Filter/ContentNodePeriodFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ final class ContentNodePeriodFilter extends AbstractFilter {
1919
public const PERIOD_QUERY_NAME = 'period';
2020

2121
public function __construct(
22-
private IriConverterInterface $iriConverter,
22+
private readonly IriConverterInterface $iriConverter,
2323
ManagerRegistry $managerRegistry,
2424
?LoggerInterface $logger = null,
2525
?array $properties = null,

api/src/Doctrine/Filter/MaterialItemPeriodFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ final class MaterialItemPeriodFilter extends AbstractFilter {
1818
public const PERIOD_QUERY_NAME = 'period';
1919

2020
public function __construct(
21-
private IriConverterInterface $iriConverter,
21+
private readonly IriConverterInterface $iriConverter,
2222
ManagerRegistry $managerRegistry,
2323
?LoggerInterface $logger = null,
2424
?array $properties = null,

api/src/Doctrine/FilterByCurrentUserExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
use Doctrine\ORM\QueryBuilder;
1313
use Symfony\Bundle\SecurityBundle\Security;
1414

15-
final class FilterByCurrentUserExtension implements QueryCollectionExtensionInterface, QueryItemExtensionInterface {
15+
final readonly class FilterByCurrentUserExtension implements QueryCollectionExtensionInterface, QueryItemExtensionInterface {
1616
public function __construct(private Security $security, private EntityManagerInterface $entityManager) {}
1717

1818
public function applyToCollection(QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator, ?string $resourceClass = null, ?Operation $operation = null, array $context = []): void {

api/src/Doctrine/Orm/Extension/FilterEagerLoadingsExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use Doctrine\ORM\Query\Expr\Orx;
1717
use Doctrine\ORM\QueryBuilder;
1818

19-
final class FilterEagerLoadingsExtension implements QueryCollectionExtensionInterface {
19+
final readonly class FilterEagerLoadingsExtension implements QueryCollectionExtensionInterface {
2020
public function __construct(private QueryCollectionExtensionInterface $decorated) {}
2121

2222
public function applyToCollection(

api/src/EventListener/JWTCreatedListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* to know where to fetch personal profile information.
1212
*/
1313
class JWTCreatedListener {
14-
public function __construct(private Security $security, private IriConverterInterface $iriConverter) {}
14+
public function __construct(private readonly Security $security, private readonly IriConverterInterface $iriConverter) {}
1515

1616
public function onJWTCreated(JWTCreatedEvent $event) {
1717
$payload = $event->getData();

api/src/EventListener/RequestTransactionListener.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
/**
1515
* Wraps a database transaction around all SQL statements in the whole request.
1616
*/
17-
final class RequestTransactionListener implements EventSubscriberInterface {
17+
final readonly class RequestTransactionListener implements EventSubscriberInterface {
1818
private \SplStack $transactionLevelStack;
1919

2020
public function __construct(
21-
private readonly EntityManagerInterface $entityManager,
22-
private readonly LoggerInterface $logger
21+
private EntityManagerInterface $entityManager,
22+
private LoggerInterface $logger
2323
) {
2424
$this->transactionLevelStack = new \SplStack();
2525
}

api/src/HttpCache/CacheControlListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* - caching is disabled (configurable via environment variable API_CACHE_ENABLED)
1212
* - total header size is too large to be handled by Varnish (configurable via parameter app.httpCache.maxHeaderSize).
1313
*/
14-
final class CacheControlListener {
14+
final readonly class CacheControlListener {
1515
private bool $apiCacheEnabled;
1616

1717
private int $maxHeaderSize;

0 commit comments

Comments
 (0)