Skip to content

Commit

Permalink
drop support for PHP < 7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
mhujer committed Dec 31, 2020
1 parent 06afda8 commit 7a5182f
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 27 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/build
/composer.lock
/vendor
/.phpunit.result.cache
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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=""
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
------------------------------------
Expand Down
13 changes: 6 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,20 @@
"authors": [
{
"name": "Martin Hujer",
"email": "[email protected]",
"email": "[email protected]",
"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" ] },
Expand Down
15 changes: 7 additions & 8 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@
</testsuite>
</testsuites>

<filter>
<whitelist>
<coverage>
<include>
<directory suffix=".php">src/Uuid/</directory>
</whitelist>
</filter>

<logging>
<log type="coverage-clover" target="build/logs/clover.xml"/>
</logging>
</include>
<report>
<clover outputFile="build/logs/clover.xml"/>
</report>
</coverage>
</phpunit>
3 changes: 1 addition & 2 deletions src/Uuid/exceptions/DeserializationInvalidValueException.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
3 changes: 1 addition & 2 deletions src/Uuid/exceptions/InvalidUuidException.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
8 changes: 3 additions & 5 deletions tests/Uuid/data/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

}

0 comments on commit 7a5182f

Please sign in to comment.