diff --git a/.gitignore b/.gitignore index 2e1a6a6..083b9e1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /build /composer.lock /vendor +/.phpunit.result.cache diff --git a/.travis.yml b/.travis.yml index ab97a91..394ad0a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,11 @@ language: php php: - - 7.2 - - 7.3 + - 7.4 env: + global: + - XDEBUG_MODE=coverage matrix: - PREFER_LOWEST="--prefer-lowest --prefer-stable" - PREFER_LOWEST="" diff --git a/README.md b/README.md index 7fc0839..7d3fc43 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ class User Requirements ------------ -Works with PHP 7.2 or higher. +Works with PHP 7.4 or higher. Submitting bugs and feature requests ------------------------------------ diff --git a/composer.json b/composer.json index 29f1cb5..73356af 100644 --- a/composer.json +++ b/composer.json @@ -12,21 +12,20 @@ "authors": [ { "name": "Martin Hujer", - "email": "mhujer@gmail.com", + "email": "mail@martinhujer.cz", "homepage": "https://www.martinhujer.cz" } ], "require": { - "php": "~7.2", + "php": "~7.4", "jms/serializer": "~2.0|~3.0", "ramsey/uuid": "~3.0|~4.0" }, "require-dev": { - "consistence/coding-standard": "3.5", - "jakub-onderka/php-parallel-lint": "1.0.0", - "php-coveralls/php-coveralls": "2.1.0", - "phpunit/phpunit": "7.4.4", - "squizlabs/php_codesniffer": "3.3.2" + "consistence/coding-standard": "3.10.1", + "php-parallel-lint/php-parallel-lint": "1.2.0", + "php-coveralls/php-coveralls": "2.4.1", + "phpunit/phpunit": "9.5.0" }, "autoload": { "psr-4": { "Mhujer\\JmsSerializer\\": [ "src" ] }, diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 28057ae..21b1e24 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -17,13 +17,12 @@ - - + + src/Uuid/ - - - - - - + + + + + diff --git a/src/Uuid/exceptions/DeserializationInvalidValueException.php b/src/Uuid/exceptions/DeserializationInvalidValueException.php index ee8462d..8622086 100644 --- a/src/Uuid/exceptions/DeserializationInvalidValueException.php +++ b/src/Uuid/exceptions/DeserializationInvalidValueException.php @@ -9,8 +9,7 @@ class DeserializationInvalidValueException implements \Mhujer\JmsSerializer\Uuid\Exception { - /** @var string */ - private $fieldPath; + private string $fieldPath; public function __construct(string $fieldPath, \Throwable $exception) { diff --git a/src/Uuid/exceptions/InvalidUuidException.php b/src/Uuid/exceptions/InvalidUuidException.php index 80aff7a..cf1c128 100644 --- a/src/Uuid/exceptions/InvalidUuidException.php +++ b/src/Uuid/exceptions/InvalidUuidException.php @@ -9,8 +9,7 @@ class InvalidUuidException implements \Mhujer\JmsSerializer\Uuid\Exception { - /** @var string */ - private $invalidUuid; + private string $invalidUuid; public function __construct(string $invalidUuid, ?\Throwable $exception = null) { diff --git a/tests/Uuid/data/User.php b/tests/Uuid/data/User.php index 45025af..e1e70a0 100644 --- a/tests/Uuid/data/User.php +++ b/tests/Uuid/data/User.php @@ -5,14 +5,12 @@ namespace Mhujer\JmsSerializer\Uuid; use JMS\Serializer\Annotation as JMS; +use Ramsey\Uuid\UuidInterface; class User { - /** - * @JMS\Type("uuid") - * @var \Ramsey\Uuid\UuidInterface - */ - public $id; + /** @JMS\Type("uuid") */ + public UuidInterface $id; }