Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for PHP < 7.4 #12

Merged
merged 2 commits into from
Dec 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
15 changes: 7 additions & 8 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",
"jms/serializer": "~2.0|~3.0",
"php": "~7.4",
"jms/serializer": "~3.2",
"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;

}