Skip to content

Commit 811de08

Browse files
authored
chore(cs): update cs fixer for php 8.4 support (#288)
2 parents 1303314 + d1467a2 commit 811de08

File tree

56 files changed

+81
-81
lines changed

Some content is hidden

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

56 files changed

+81
-81
lines changed

castor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
#[AsTask('cs:check', namespace: 'qa', description: 'Check for coding standards without fixing them')]
1111
function qa_cs_check()
1212
{
13-
php_cs_fixer(['fix', '--config', __DIR__ . '/.php-cs-fixer.php', '--dry-run', '--diff'], '3.50', [
13+
php_cs_fixer(['fix', '--config', __DIR__ . '/.php-cs-fixer.php', '--dry-run', '--diff'], '3.85.1', [
1414
'kubawerlos/php-cs-fixer-custom-fixers' => '^3.21',
1515
]);
1616
}
1717

1818
#[AsTask('cs:fix', namespace: 'qa', description: 'Fix all coding standards', aliases: ['cs'])]
1919
function qa_cs_fix()
2020
{
21-
php_cs_fixer(['fix', '--config', __DIR__ . '/.php-cs-fixer.php', '-v'], '3.50', [
21+
php_cs_fixer(['fix', '--config', __DIR__ . '/.php-cs-fixer.php', '-v'], '3.85.1', [
2222
'kubawerlos/php-cs-fixer-custom-fixers' => '^3.21',
2323
]);
2424
}

src/EventListener/MapFromListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ public function __invoke(GenerateMapperEvent $event): void
3939

4040
if ($reflectionClassOrPropertyOrMethod instanceof \ReflectionClass) {
4141
if ($mapFromAttributeInstance->property === null) {
42-
throw new BadMapDefinitionException(sprintf('Required `property` property in the "%s" attribute on "%s" class.', MapFrom::class, $reflectionClassOrPropertyOrMethod->getName()));
42+
throw new BadMapDefinitionException(\sprintf('Required `property` property in the "%s" attribute on "%s" class.', MapFrom::class, $reflectionClassOrPropertyOrMethod->getName()));
4343
}
4444

4545
if ($mapFromAttributeInstance->transformer === null) {
46-
throw new BadMapDefinitionException(sprintf('Required `transformer` property in the "%s" attribute on "%s" class.', MapFrom::class, $reflectionClassOrPropertyOrMethod->getName()));
46+
throw new BadMapDefinitionException(\sprintf('Required `transformer` property in the "%s" attribute on "%s" class.', MapFrom::class, $reflectionClassOrPropertyOrMethod->getName()));
4747
}
4848

4949
$property = $mapFromAttributeInstance->property;

src/EventListener/MapListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ protected function getTransformerFromMapAttribute(string $class, MapTo|MapFrom $
6262
try {
6363
$expression = $this->expressionLanguage->compile($transformerCallable, ['value' => 'source', 'context']);
6464
} catch (SyntaxError $e) {
65-
throw new BadMapDefinitionException(sprintf('Transformer "%s" targeted by %s transformer on class "%s" is not valid.', $transformerCallable, $attribute::class, $class), 0, $e);
65+
throw new BadMapDefinitionException(\sprintf('Transformer "%s" targeted by %s transformer on class "%s" is not valid.', $transformerCallable, $attribute::class, $class), 0, $e);
6666
}
6767

6868
$transformer = new ExpressionLanguageTransformer($expression);
6969
} else {
70-
throw new BadMapDefinitionException(sprintf('Callable "%s" targeted by %s transformer on class "%s" is not valid.', json_encode($transformerCallable), $attribute::class, $class));
70+
throw new BadMapDefinitionException(\sprintf('Callable "%s" targeted by %s transformer on class "%s" is not valid.', json_encode($transformerCallable), $attribute::class, $class));
7171
}
7272
}
7373

src/EventListener/MapProviderListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ public function __invoke(GenerateMapperEvent $event): void
3838

3939
if ($mapProvider->source === null) {
4040
if ($defaultMapProvider !== null) {
41-
throw new BadMapDefinitionException(sprintf('multiple default providers found for class "%s"', $event->mapperMetadata->targetReflectionClass->getName()));
41+
throw new BadMapDefinitionException(\sprintf('multiple default providers found for class "%s"', $event->mapperMetadata->targetReflectionClass->getName()));
4242
}
4343

4444
$defaultMapProvider = $mapProvider->provider;
4545
} elseif ($mapProvider->source === $event->mapperMetadata->source) {
4646
if ($provider !== null) {
47-
throw new BadMapDefinitionException(sprintf('multiple providers found for class "%s"', $event->mapperMetadata->targetReflectionClass->getName()));
47+
throw new BadMapDefinitionException(\sprintf('multiple providers found for class "%s"', $event->mapperMetadata->targetReflectionClass->getName()));
4848
}
4949

5050
$provider = $mapProvider->provider;

src/EventListener/MapToContextListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
final readonly class MapToContextListener
1717
{
1818
public function __construct(
19-
private ReflectionExtractor $extractor
19+
private ReflectionExtractor $extractor,
2020
) {
2121
}
2222

src/EventListener/MapToListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ public function __invoke(GenerateMapperEvent $event): void
3838

3939
if ($reflectionClassOrPropertyOrMethod instanceof \ReflectionClass) {
4040
if ($mapToAttributeInstance->property === null) {
41-
throw new BadMapDefinitionException(sprintf('Required `property` property in the "%s" attribute on "%s" class.', MapTo::class, $reflectionClassOrPropertyOrMethod->getName()));
41+
throw new BadMapDefinitionException(\sprintf('Required `property` property in the "%s" attribute on "%s" class.', MapTo::class, $reflectionClassOrPropertyOrMethod->getName()));
4242
}
4343

4444
if ($mapToAttributeInstance->transformer === null) {
45-
throw new BadMapDefinitionException(sprintf('Required `transformer` property in the "%s" attribute on "%s" class.', MapTo::class, $reflectionClassOrPropertyOrMethod->getName()));
45+
throw new BadMapDefinitionException(\sprintf('Required `transformer` property in the "%s" attribute on "%s" class.', MapTo::class, $reflectionClassOrPropertyOrMethod->getName()));
4646
}
4747

4848
$property = $mapToAttributeInstance->property;

src/EventListener/Symfony/AdvancedNameConverterListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
final readonly class AdvancedNameConverterListener
1212
{
1313
public function __construct(
14-
private AdvancedNameConverterInterface|NameConverterInterface $nameConverter
14+
private AdvancedNameConverterInterface|NameConverterInterface $nameConverter,
1515
) {
1616
}
1717

src/EventListener/Symfony/SerializerGroupListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
final readonly class SerializerGroupListener
1111
{
1212
public function __construct(
13-
private ClassMetadataFactoryInterface $classMetadataFactory
13+
private ClassMetadataFactoryInterface $classMetadataFactory,
1414
) {
1515
}
1616

src/EventListener/Symfony/SerializerIgnoreListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
final readonly class SerializerIgnoreListener
1111
{
1212
public function __construct(
13-
private ClassMetadataFactoryInterface $classMetadataFactory
13+
private ClassMetadataFactoryInterface $classMetadataFactory,
1414
) {
1515
}
1616

src/EventListener/Symfony/SerializerMaxDepthListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
final readonly class SerializerMaxDepthListener
1111
{
1212
public function __construct(
13-
private ClassMetadataFactoryInterface $classMetadataFactory
13+
private ClassMetadataFactoryInterface $classMetadataFactory,
1414
) {
1515
}
1616

0 commit comments

Comments
 (0)