Skip to content

Commit 8b7ebcf

Browse files
authored
Update dependencies (#175)
1 parent 7560f78 commit 8b7ebcf

File tree

9 files changed

+25
-16
lines changed

9 files changed

+25
-16
lines changed

.styleci.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1+
risky: true
12
preset: symfony
2-
3-
version: 7
4-
3+
tab-width: 4
4+
use-tabs: false
55
enabled:
66
- combine_consecutive_unsets
77
- ordered_class_elements
8-
- ordered_imports
9-
8+
- alpha_ordered_imports
9+
- declare_strict_types
10+
- phpdoc_order
11+
disabled:
12+
- no_superfluous_phpdoc_tags_symfony
13+
- native_function_invocation_symfony
1014
finder:
1115
exclude:
1216
- "Tests"
17+
- "vendor"
1318
name:
1419
- "*.php"

DBAL/Types/AbstractEnumType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function requiresSQLCommentHint(AbstractPlatform $platform): bool
122122
*/
123123
public function getName(): string
124124
{
125-
return $this->name ?: (string) \array_search(\get_class($this), self::getTypesMap(), true);
125+
return $this->name ?: (string) \array_search(static::class, self::getTypesMap(), true);
126126
}
127127

128128
/**

FreshDoctrineEnumBundle.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
* file that was distributed with this source code.
99
*/
1010

11+
declare(strict_types=1);
12+
1113
namespace Fresh\DoctrineEnumBundle;
1214

13-
use Doctrine\Common\Persistence\ConnectionRegistry;
15+
use Doctrine\Persistence\ConnectionRegistry;
1416
use Fresh\DoctrineEnumBundle\Exception\InvalidArgumentException;
1517
use Symfony\Component\DependencyInjection\ContainerInterface;
1618
use Symfony\Component\HttpKernel\Bundle\Bundle;

Tests/Form/EnumTypeGuesserTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
namespace Fresh\DoctrineEnumBundle\Tests\Form;
1414

15-
use Doctrine\Common\Persistence\ManagerRegistry;
1615
use Doctrine\ORM\Mapping\ClassMetadataInfo;
16+
use Doctrine\Persistence\ManagerRegistry;
1717
use Fresh\DoctrineEnumBundle\Exception\EnumType\EnumTypeIsRegisteredButClassDoesNotExistException;
1818
use Fresh\DoctrineEnumBundle\Form\EnumTypeGuesser;
1919
use Fresh\DoctrineEnumBundle\Tests\Fixtures\DBAL\Types\BasketballPositionType;

Tests/FreshDoctrineEnumBundleTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212

1313
namespace Fresh\DoctrineEnumBundle\Tests;
1414

15-
use Doctrine\Common\Persistence\ManagerRegistry;
1615
use Doctrine\DBAL\Connection;
1716
use Doctrine\DBAL\Platforms\AbstractPlatform;
17+
use Doctrine\Persistence\ManagerRegistry;
1818
use Fresh\DoctrineEnumBundle\Exception\InvalidArgumentException;
1919
use Fresh\DoctrineEnumBundle\FreshDoctrineEnumBundle;
2020
use PHPUnit\Framework\MockObject\MockObject;

Tests/Validator/EnumValidatorTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ public function testInvalidBasketballPositionType(): void
9090
$constraintValidationBuilder
9191
->expects(self::at(0))
9292
->method('setParameter')
93-
->with($this->equalTo('{{ value }}'), $this->equalTo('"Pitcher"'))
93+
->with(self::equalTo('{{ value }}'), self::equalTo('"Pitcher"'))
9494
->willReturnSelf()
9595
;
9696

9797
$constraintValidationBuilder
9898
->expects(self::at(1))
9999
->method('setParameter')
100-
->with($this->equalTo('{{ choices }}'), $this->equalTo('"PG", "SG", "SF", "PF", "C"'))
100+
->with(self::equalTo('{{ choices }}'), self::equalTo('"PG", "SG", "SF", "PF", "C"'))
101101
->willReturnSelf()
102102
;
103103

@@ -110,7 +110,7 @@ public function testInvalidBasketballPositionType(): void
110110
$this->context
111111
->expects(self::once())
112112
->method('buildViolation')
113-
->with($this->equalTo('The value you selected is not a valid choice.'))
113+
->with(self::equalTo('The value you selected is not a valid choice.'))
114114
->willReturn($constraintValidationBuilder)
115115
;
116116

Twig/Extension/ReadableEnumValueTwigExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ public function getFilters(): array
3737
* @param string|null $enumValue
3838
* @param string|null $enumType
3939
*
40-
* @return string|null
41-
*
4240
* @throws EnumTypeIsNotRegisteredException
4341
* @throws NoRegisteredEnumTypesException
4442
* @throws ValueIsFoundInFewRegisteredEnumTypesException
4543
* @throws ValueIsNotFoundInAnyRegisteredEnumTypeException
44+
*
45+
* @return string|null
4646
*/
4747
public function getReadableEnumValue(?string $enumValue, ?string $enumType = null): ?string
4848
{

Validator/Constraints/EnumValidator.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
* file that was distributed with this source code.
99
*/
1010

11+
declare(strict_types=1);
12+
1113
namespace Fresh\DoctrineEnumBundle\Validator\Constraints;
1214

1315
use Fresh\DoctrineEnumBundle\Exception\RuntimeException;

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"require": {
2525
"php": ">=7.1.3",
2626
"doctrine/doctrine-bundle": "^2.0",
27-
"doctrine/common": "~2.8",
27+
"doctrine/common": "~2.8 || ^3.0",
2828
"doctrine/orm": "~2.6",
2929
"symfony/config": "^4.3",
3030
"symfony/dependency-injection": "^4.3",
@@ -35,7 +35,7 @@
3535
"twig/twig": "~2.11 || ^3.0"
3636
},
3737
"require-dev": {
38-
"escapestudios/symfony2-coding-standard": "^3.10",
38+
"escapestudios/symfony2-coding-standard": "^3.11",
3939
"phpstan/phpstan": "^0.12",
4040
"phpstan/phpstan-doctrine":"^0.12",
4141
"phpstan/phpstan-phpunit": "^0.12",

0 commit comments

Comments
 (0)