Skip to content

Commit

Permalink
Merge pull request #3 from lamoda/add-php8-to-supported-versions
Browse files Browse the repository at this point in the history
add php 8 to supported versions
  • Loading branch information
Pavel Batanov authored Feb 22, 2021
2 parents 8ef04ef + 19b1d4d commit fad5545
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build:
tests:
override:
-
command: vendor/bin/phpunit --coverage-clover=build/clover.xml
command: XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-clover=build/clover.xml
coverage:
file: build/clover.xml
format: clover
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ php:
- 7.1
- 7.2
- 7.3
- 8.0
- nightly

sudo: false
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
}
],
"require": {
"php": "^7.1",
"php": "^7.1 || ^8.0",
"paillechat/php-enum": "^1.2 || ^2.1",
"symfony/http-kernel": "^3.4 || ^4.0 || ^5.0",
"symfony/dependency-injection": "^3.4 || ^4.0 || ^5.0",
"symfony/config": "^3.4 || ^4.0 || ^5.0",
"doctrine/dbal": "^2.4"
},
"require-dev": {
"phpunit/phpunit": "^7.0",
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
"symfony/yaml": "^3.4 || ^4.0 || ^5.0"
},
"autoload": {
Expand Down
9 changes: 3 additions & 6 deletions tests/Unit/DBAL/EnumTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Lamoda\EnumBundle\Tests\Unit\DBAL;

use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Types\ConversionException;
use Doctrine\DBAL\Types\Type;
use Lamoda\EnumBundle\DBAL\EnumType;
use Lamoda\EnumBundle\Naming\LowercaseNamingStrategy;
Expand Down Expand Up @@ -54,19 +55,15 @@ public function getObjectToValueMap(): array
];
}

/**
* @expectedException \Doctrine\DBAL\Types\ConversionException
*/
public function testConvertToPHPValueInvalidValue(): void
{
$this->expectException(ConversionException::class);
self::createType()->convertToPHPValue('UNKNOWN', $this->createPlatformMock());
}

/**
* @expectedException \Doctrine\DBAL\Types\ConversionException
*/
public function testConvertToDataBaseValueInvalidValue(): void
{
$this->expectException(ConversionException::class);
self::createType()->convertToDatabaseValue(OtherEnum::BAR(), $this->createPlatformMock());
}

Expand Down

0 comments on commit fad5545

Please sign in to comment.