Skip to content

Commit 9688de9

Browse files
committed
Rollback of the minimum php version to 7.3
1 parent bde0048 commit 9688de9

9 files changed

+45
-37
lines changed

.travis.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
language: php
22

33
php:
4+
- 7.3
45
- 7.4snapshot
56

67
cache:
@@ -19,10 +20,9 @@ install:
1920

2021
script:
2122
- ./vendor/bin/phpunit --configuration ./phpunit.xml --coverage-clover=coverage.clover
22-
- ./vendor/bin/psalm --config=psalm.xml
23-
- ./vendor/bin/phpstan analyse src --level 7
24-
- ./vendor/bin/php-cs-fixer fix --allow-risky=yes --dry-run
23+
- if [ "$TRAVIS_PHP_VERSION" == "7.4snapshot"]; then ./vendor/bin/psalm --config=psalm.xml; fi
24+
- if [ "$TRAVIS_PHP_VERSION" == "7.4snapshot"]; then ./vendor/bin/php-cs-fixer fix --allow-risky=yes --dry-run; fi
2525

2626
after_script:
27-
- wget -c -nc --retry-connrefused --tries=0 https://scrutinizer-ci.com/ocular.phar
28-
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
27+
- if [ "$TRAVIS_PHP_VERSION" == "7.4snapshot"]; then wget -c -nc --retry-connrefused --tries=0 https://scrutinizer-ci.com/ocular.phar; fi
28+
- if [ "$TRAVIS_PHP_VERSION" == "7.4snapshot"]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
}
2828
},
2929
"require": {
30-
"php": ">=7.4",
30+
"php": ">=7.3",
3131
"amphp/amp": "v2.4.*",
3232
"amphp/file": "v1.0.*"
3333
},

composer.lock

+13-13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpunit.xml

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
3-
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
4-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/7.0/phpunit.xsd"
2+
<phpunit bootstrap="vendor/autoload.php"
63
backupGlobals="false"
4+
backupStaticAttributes="false"
5+
beStrictAboutTestsThatDoNotTestAnything="false"
76
colors="true"
8-
bootstrap="vendor/autoload.php"
7+
verbose="true"
8+
convertErrorsToExceptions="true"
9+
convertNoticesToExceptions="true"
10+
convertWarningsToExceptions="true"
911
failOnRisky="true"
1012
failOnWarning="true"
11-
beStrictAboutTestsThatDoNotTestAnything="false">
13+
stopOnFailure="false">
1214
<php>
1315
<ini name="error_reporting" value="-1"/>
1416
</php>

src/AmpLock.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ final class AmpLock implements Lock
2525
*
2626
* @var string
2727
*/
28-
private string $id;
28+
private $id;
2929

3030
/**
3131
* The function to be called on release or null if the lock has been released.
3232
*
3333
* @var \Closure|null
3434
*/
35-
private ?\Closure $releaser = null;
35+
private $releaser = null;
3636

3737
public function __construct(string $id, ?\Closure $releaser)
3838
{

src/FilesystemMutex.php

+9-3
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,24 @@ final class FilesystemMutex implements Mutex
3434

3535
/**
3636
* Mutex identifier.
37+
*
38+
* @var string
3739
*/
38-
private string $id;
40+
private $id;
3941

4042
/**
4143
* Barrier file path.
44+
*
45+
* @var string
4246
*/
43-
private string $filePath;
47+
private $filePath;
4448

4549
/**
4650
* Release handler.
51+
*
52+
* @var \Closure
4753
*/
48-
private \Closure $release;
54+
private $release;
4955

5056
public function __construct(string $id, string $filePath)
5157
{

src/FilesystemMutexFactory.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
*/
1818
final class FilesystemMutexFactory implements MutexFactory
1919
{
20-
private string $storageDirectory;
20+
/** @var string */
21+
private $storageDirectory;
2122

2223
public function __construct(string $storageDirectory)
2324
{

src/InMemoryMutex.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,8 @@ final class InMemoryMutex implements Mutex
2828
{
2929
private const LATENCY_TIMEOUT = 10;
3030

31-
/**
32-
* @var string
33-
*/
34-
private string $id;
31+
/** @var string */
32+
private $id;
3533

3634
public function __construct(string $id)
3735
{

src/Storage/InMemoryMutexStorage.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ final class InMemoryMutexStorage
2020
/**
2121
* @psalm-var array<string, bool>
2222
*/
23-
private array $localStorage = [];
23+
private $localStorage = [];
2424

25-
private static ?self $instance = null;
25+
/** @var self|null */
26+
private static $instance = null;
2627

2728
/**
2829
* @return self

0 commit comments

Comments
 (0)