From c8cde50420266b698fb760dda50f6a8646dd9d52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Wed, 26 Feb 2020 21:03:32 +0100 Subject: [PATCH 1/7] Require PHP 7.4 --- .scrutinizer.yml | 2 +- .travis.yml | 2 +- composer.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 53e89b0d..a6619605 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -8,7 +8,7 @@ build: rabbitmq: false mongodb: false php: - version: 7.2 + version: 7.4 cache: disabled: false directories: diff --git a/.travis.yml b/.travis.yml index 12ae7f13..a29a95f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ language: php sudo: false php: - - 7.2 + - 7.4 - nightly cache: diff --git a/composer.json b/composer.json index 55f9fc37..b70409a4 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ } ], "require": { - "php": "^7.2" + "php": "^7.4" }, "require-dev": { "infection/infection": "^0.13", From d74d008788da15882c41171f4a8f306923ab63f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Wed, 26 Feb 2020 21:06:47 +0100 Subject: [PATCH 2/7] Upgrade PHPStan to v0.12 --- composer.json | 8 ++++---- src/SystemClock.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index b70409a4..74a5b1dc 100644 --- a/composer.json +++ b/composer.json @@ -15,10 +15,10 @@ "require-dev": { "infection/infection": "^0.13", "lcobucci/coding-standard": "^1.0", - "phpstan/phpstan": "^0.10", - "phpstan/phpstan-deprecation-rules": "^0.10", - "phpstan/phpstan-phpunit": "^0.10", - "phpstan/phpstan-strict-rules": "^0.10", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-deprecation-rules": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpstan/phpstan-strict-rules": "^0.12", "phpunit/phpunit": "^8.5.2" }, "autoload": { diff --git a/src/SystemClock.php b/src/SystemClock.php index 3d38ef4c..959ad293 100644 --- a/src/SystemClock.php +++ b/src/SystemClock.php @@ -16,7 +16,7 @@ final class SystemClock implements Clock public function __construct(?DateTimeZone $timezone = null) { - $this->timezone = $timezone ?: new DateTimeZone(date_default_timezone_get()); + $this->timezone = $timezone ?? new DateTimeZone(date_default_timezone_get()); } public function now(): DateTimeImmutable From 55e488b4c8f3e68d3ac30801d60ccc03884725c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Wed, 26 Feb 2020 21:07:42 +0100 Subject: [PATCH 3/7] Use PHPStan extension installer --- composer.json | 1 + phpstan.neon.dist | 6 ------ 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/composer.json b/composer.json index 74a5b1dc..a59755ad 100644 --- a/composer.json +++ b/composer.json @@ -15,6 +15,7 @@ "require-dev": { "infection/infection": "^0.13", "lcobucci/coding-standard": "^1.0", + "phpstan/extension-installer": "^1.0", "phpstan/phpstan": "^0.12", "phpstan/phpstan-deprecation-rules": "^0.12", "phpstan/phpstan-phpunit": "^0.12", diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 52d355a4..673b56c6 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,9 +1,3 @@ -includes: - - vendor/phpstan/phpstan-phpunit/extension.neon - - vendor/phpstan/phpstan-phpunit/rules.neon - - vendor/phpstan/phpstan-strict-rules/rules.neon - - vendor/phpstan/phpstan-deprecation-rules/rules.neon - parameters: level: 7 paths: From 55bda78602a70fdda92db902c749b387172b44a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Wed, 26 Feb 2020 21:08:35 +0100 Subject: [PATCH 4/7] Fix Travis-CI URL --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8856d787..31160e83 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Latest Stable Version](https://img.shields.io/packagist/v/lcobucci/clock.svg?style=flat-square)](https://packagist.org/packages/lcobucci/clock) ![Branch master](https://img.shields.io/badge/branch-master-brightgreen.svg?style=flat-square) -[![Build Status](https://img.shields.io/travis/lcobucci/clock/master.svg?style=flat-square)](http://travis-ci.org/#!/lcobucci/clock) +[![Build Status](https://img.shields.io/travis/lcobucci/clock/master.svg?style=flat-square)](http://travis-ci.org/lcobucci/clock) [![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/lcobucci/clock/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/lcobucci/clock/?branch=master) [![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/lcobucci/clock/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/lcobucci/clock/?branch=master) [![SensioLabsInsight](https://insight.sensiolabs.com/projects/50e3ef67-0f42-48fe-ace5-0beb9f78d117/mini.png)](https://insight.sensiolabs.com/projects/50e3ef67-0f42-48fe-ace5-0beb9f78d117) From 3ef00a124641269e47314a91fab0f04de975cd61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Wed, 26 Feb 2020 21:09:11 +0100 Subject: [PATCH 5/7] Upgrade Infection to v0.15 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index a59755ad..2887eee0 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "php": "^7.4" }, "require-dev": { - "infection/infection": "^0.13", + "infection/infection": "^0.15", "lcobucci/coding-standard": "^1.0", "phpstan/extension-installer": "^1.0", "phpstan/phpstan": "^0.12", From d583f99c51b5aa5f7a500c757b86086b6fa45e73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Wed, 26 Feb 2020 21:10:14 +0100 Subject: [PATCH 6/7] Upgrade coding-standards --- composer.json | 2 +- src/FrozenClock.php | 5 +---- src/SystemClock.php | 5 +---- test/FrozenClockTest.php | 1 + 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index 2887eee0..67a9150c 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ }, "require-dev": { "infection/infection": "^0.15", - "lcobucci/coding-standard": "^1.0", + "lcobucci/coding-standard": "^4.0", "phpstan/extension-installer": "^1.0", "phpstan/phpstan": "^0.12", "phpstan/phpstan-deprecation-rules": "^0.12", diff --git a/src/FrozenClock.php b/src/FrozenClock.php index 4de161a5..c6b90cb4 100644 --- a/src/FrozenClock.php +++ b/src/FrozenClock.php @@ -7,10 +7,7 @@ final class FrozenClock implements Clock { - /** - * @var DateTimeImmutable - */ - private $now; + private DateTimeImmutable $now; public function __construct(DateTimeImmutable $now) { diff --git a/src/SystemClock.php b/src/SystemClock.php index 959ad293..460d5bc1 100644 --- a/src/SystemClock.php +++ b/src/SystemClock.php @@ -9,10 +9,7 @@ final class SystemClock implements Clock { - /** - * @var DateTimeZone - */ - private $timezone; + private DateTimeZone $timezone; public function __construct(?DateTimeZone $timezone = null) { diff --git a/test/FrozenClockTest.php b/test/FrozenClockTest.php index 6b85fbae..fa168094 100644 --- a/test/FrozenClockTest.php +++ b/test/FrozenClockTest.php @@ -27,6 +27,7 @@ public function nowShouldReturnAlwaysTheSameObject(): void * @test * * @covers \Lcobucci\Clock\FrozenClock::setTo + * * @uses \Lcobucci\Clock\FrozenClock::__construct() * @uses \Lcobucci\Clock\FrozenClock::now */ From 8efb0d479b166356ddcc732236104629f0104ca8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Wed, 26 Feb 2020 21:11:31 +0100 Subject: [PATCH 7/7] Upgrade PHPUnit to v9.0 --- .gitignore | 1 + composer.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index ea7c474c..830fae86 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /.phpcs.cache /infection-log.txt /phpstan.neon +/.phpunit.result.cache diff --git a/composer.json b/composer.json index 67a9150c..31051de8 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "phpstan/phpstan-deprecation-rules": "^0.12", "phpstan/phpstan-phpunit": "^0.12", "phpstan/phpstan-strict-rules": "^0.12", - "phpunit/phpunit": "^8.5.2" + "phpunit/phpunit": "^9.0" }, "autoload": { "psr-4": {