Skip to content

Commit

Permalink
Update dependencies (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
fre5h authored Sep 25, 2020
1 parent 7560f78 commit 8b7ebcf
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 16 deletions.
15 changes: 10 additions & 5 deletions .styleci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
risky: true
preset: symfony

version: 7

tab-width: 4
use-tabs: false
enabled:
- combine_consecutive_unsets
- ordered_class_elements
- ordered_imports

- alpha_ordered_imports
- declare_strict_types
- phpdoc_order
disabled:
- no_superfluous_phpdoc_tags_symfony
- native_function_invocation_symfony
finder:
exclude:
- "Tests"
- "vendor"
name:
- "*.php"
2 changes: 1 addition & 1 deletion DBAL/Types/AbstractEnumType.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function requiresSQLCommentHint(AbstractPlatform $platform): bool
*/
public function getName(): string
{
return $this->name ?: (string) \array_search(\get_class($this), self::getTypesMap(), true);
return $this->name ?: (string) \array_search(static::class, self::getTypesMap(), true);
}

/**
Expand Down
4 changes: 3 additions & 1 deletion FreshDoctrineEnumBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace Fresh\DoctrineEnumBundle;

use Doctrine\Common\Persistence\ConnectionRegistry;
use Doctrine\Persistence\ConnectionRegistry;
use Fresh\DoctrineEnumBundle\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpKernel\Bundle\Bundle;
Expand Down
2 changes: 1 addition & 1 deletion Tests/Form/EnumTypeGuesserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

namespace Fresh\DoctrineEnumBundle\Tests\Form;

use Doctrine\Common\Persistence\ManagerRegistry;
use Doctrine\ORM\Mapping\ClassMetadataInfo;
use Doctrine\Persistence\ManagerRegistry;
use Fresh\DoctrineEnumBundle\Exception\EnumType\EnumTypeIsRegisteredButClassDoesNotExistException;
use Fresh\DoctrineEnumBundle\Form\EnumTypeGuesser;
use Fresh\DoctrineEnumBundle\Tests\Fixtures\DBAL\Types\BasketballPositionType;
Expand Down
2 changes: 1 addition & 1 deletion Tests/FreshDoctrineEnumBundleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

namespace Fresh\DoctrineEnumBundle\Tests;

use Doctrine\Common\Persistence\ManagerRegistry;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\Persistence\ManagerRegistry;
use Fresh\DoctrineEnumBundle\Exception\InvalidArgumentException;
use Fresh\DoctrineEnumBundle\FreshDoctrineEnumBundle;
use PHPUnit\Framework\MockObject\MockObject;
Expand Down
6 changes: 3 additions & 3 deletions Tests/Validator/EnumValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ public function testInvalidBasketballPositionType(): void
$constraintValidationBuilder
->expects(self::at(0))
->method('setParameter')
->with($this->equalTo('{{ value }}'), $this->equalTo('"Pitcher"'))
->with(self::equalTo('{{ value }}'), self::equalTo('"Pitcher"'))
->willReturnSelf()
;

$constraintValidationBuilder
->expects(self::at(1))
->method('setParameter')
->with($this->equalTo('{{ choices }}'), $this->equalTo('"PG", "SG", "SF", "PF", "C"'))
->with(self::equalTo('{{ choices }}'), self::equalTo('"PG", "SG", "SF", "PF", "C"'))
->willReturnSelf()
;

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

Expand Down
4 changes: 2 additions & 2 deletions Twig/Extension/ReadableEnumValueTwigExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ public function getFilters(): array
* @param string|null $enumValue
* @param string|null $enumType
*
* @return string|null
*
* @throws EnumTypeIsNotRegisteredException
* @throws NoRegisteredEnumTypesException
* @throws ValueIsFoundInFewRegisteredEnumTypesException
* @throws ValueIsNotFoundInAnyRegisteredEnumTypeException
*
* @return string|null
*/
public function getReadableEnumValue(?string $enumValue, ?string $enumType = null): ?string
{
Expand Down
2 changes: 2 additions & 0 deletions Validator/Constraints/EnumValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace Fresh\DoctrineEnumBundle\Validator\Constraints;

use Fresh\DoctrineEnumBundle\Exception\RuntimeException;
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"require": {
"php": ">=7.1.3",
"doctrine/doctrine-bundle": "^2.0",
"doctrine/common": "~2.8",
"doctrine/common": "~2.8 || ^3.0",
"doctrine/orm": "~2.6",
"symfony/config": "^4.3",
"symfony/dependency-injection": "^4.3",
Expand All @@ -35,7 +35,7 @@
"twig/twig": "~2.11 || ^3.0"
},
"require-dev": {
"escapestudios/symfony2-coding-standard": "^3.10",
"escapestudios/symfony2-coding-standard": "^3.11",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-doctrine":"^0.12",
"phpstan/phpstan-phpunit": "^0.12",
Expand Down

0 comments on commit 8b7ebcf

Please sign in to comment.