diff --git a/CHANGELOG.md b/CHANGELOG.md
index 81b8f7d..5283f67 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -54,6 +54,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
* Remove dependency on ramsey/collection package.
+## 4.4.0 - 2022-08-05
+
+### Changed
+
+* Allow brick/math 0.10.
+* Remove dev dependency to moontoast/math.
+* Un-deprecate `UuidInterface::getUrn()`.
+
+
## 4.3.1 - 2022-03-27
### Deprecated
diff --git a/composer.json b/composer.json
index 27f57b7..5e772eb 100644
--- a/composer.json
+++ b/composer.json
@@ -25,8 +25,8 @@
"php-parallel-lint/php-parallel-lint": "^1.1",
"phpbench/phpbench": "^1.0",
"phpstan/extension-installer": "^1.1",
- "phpstan/phpstan": "^1.5",
- "phpstan/phpstan-mockery": "^1.0",
+ "phpstan/phpstan": "^1.8",
+ "phpstan/phpstan-mockery": "^1.1",
"phpstan/phpstan-phpunit": "^1.1",
"phpunit/phpunit": "^9.5",
"psalm/plugin-phpunit": "^0.16.1",
diff --git a/composer.lock b/composer.lock
index 024ca2b..8a8294f 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "83dddf2c4361278b67e4751ac6962121",
+ "content-hash": "e124ffffff88920cb2fb7533c2416694",
"packages": [
{
"name": "brick/math",
@@ -2707,16 +2707,16 @@
},
{
"name": "phpstan/phpstan",
- "version": "1.5.3",
+ "version": "1.8.2",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
- "reference": "39953ac1452a8843702ee41a35b4861d3e8207a7"
+ "reference": "c53312ecc575caf07b0e90dee43883fdf90ca67c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpstan/zipball/39953ac1452a8843702ee41a35b4861d3e8207a7",
- "reference": "39953ac1452a8843702ee41a35b4861d3e8207a7",
+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/c53312ecc575caf07b0e90dee43883fdf90ca67c",
+ "reference": "c53312ecc575caf07b0e90dee43883fdf90ca67c",
"shasum": ""
},
"require": {
@@ -2742,7 +2742,7 @@
"description": "PHPStan - PHP Static Analysis Tool",
"support": {
"issues": "https://github.com/phpstan/phpstan/issues",
- "source": "https://github.com/phpstan/phpstan/tree/1.5.3"
+ "source": "https://github.com/phpstan/phpstan/tree/1.8.2"
},
"funding": [
{
@@ -2762,25 +2762,25 @@
"type": "tidelift"
}
],
- "time": "2022-03-30T21:55:08+00:00"
+ "time": "2022-07-20T09:57:31+00:00"
},
{
"name": "phpstan/phpstan-mockery",
- "version": "1.0.0",
+ "version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan-mockery.git",
- "reference": "1767581e025d830d9288702761ad3cc7b72ecca4"
+ "reference": "245b17ccd00f04be3c6b9fc6645f63793b37b2ea"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpstan-mockery/zipball/1767581e025d830d9288702761ad3cc7b72ecca4",
- "reference": "1767581e025d830d9288702761ad3cc7b72ecca4",
+ "url": "https://api.github.com/repos/phpstan/phpstan-mockery/zipball/245b17ccd00f04be3c6b9fc6645f63793b37b2ea",
+ "reference": "245b17ccd00f04be3c6b9fc6645f63793b37b2ea",
"shasum": ""
},
"require": {
- "php": "^7.1 || ^8.0",
- "phpstan/phpstan": "^1.0"
+ "php": "^7.2 || ^8.0",
+ "phpstan/phpstan": "^1.5.0"
},
"require-dev": {
"mockery/mockery": "^1.2.4",
@@ -2792,9 +2792,6 @@
},
"type": "phpstan-extension",
"extra": {
- "branch-alias": {
- "dev-master": "1.0-dev"
- },
"phpstan": {
"includes": [
"extension.neon"
@@ -2813,22 +2810,22 @@
"description": "PHPStan Mockery extension",
"support": {
"issues": "https://github.com/phpstan/phpstan-mockery/issues",
- "source": "https://github.com/phpstan/phpstan-mockery/tree/1.0.0"
+ "source": "https://github.com/phpstan/phpstan-mockery/tree/1.1.0"
},
- "time": "2021-09-20T16:03:58+00:00"
+ "time": "2022-05-09T13:12:35+00:00"
},
{
"name": "phpstan/phpstan-phpunit",
- "version": "1.1.0",
+ "version": "1.1.1",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan-phpunit.git",
- "reference": "09133ce914f1388a8bb8c7f8573aaa3723cff52a"
+ "reference": "4a3c437c09075736285d1cabb5c75bf27ed0bc84"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/09133ce914f1388a8bb8c7f8573aaa3723cff52a",
- "reference": "09133ce914f1388a8bb8c7f8573aaa3723cff52a",
+ "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/4a3c437c09075736285d1cabb5c75bf27ed0bc84",
+ "reference": "4a3c437c09075736285d1cabb5c75bf27ed0bc84",
"shasum": ""
},
"require": {
@@ -2865,9 +2862,9 @@
"description": "PHPUnit extensions and rules for PHPStan",
"support": {
"issues": "https://github.com/phpstan/phpstan-phpunit/issues",
- "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.1.0"
+ "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.1.1"
},
- "time": "2022-03-28T09:20:49+00:00"
+ "time": "2022-04-20T15:24:25+00:00"
},
{
"name": "phpunit/php-code-coverage",
diff --git a/phpstan.neon.dist b/phpstan.neon.dist
index acd9320..0897bfc 100644
--- a/phpstan.neon.dist
+++ b/phpstan.neon.dist
@@ -11,3 +11,5 @@ parameters:
message: '#^Comparison operation ">" between 6 and 0 is always true\.$#'
count: 1
path: ./src/Generator/CombGenerator.php
+
+ - '#^Method Ramsey\\Uuid\\Generator\\Pecl[A-Za-z]+Generator::generate\(\) should return string but returns string\|false\.$#'
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 97c1f24..14e81da 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -18,4 +18,9 @@
+
+
+
+
+
diff --git a/src/FeatureSet.php b/src/FeatureSet.php
index 038b006..c0a1972 100644
--- a/src/FeatureSet.php
+++ b/src/FeatureSet.php
@@ -73,7 +73,7 @@ class FeatureSet
private TimeConverterInterface $timeConverter;
private RandomGeneratorInterface $randomGenerator;
private TimeGeneratorInterface $timeGenerator;
- private TimeProviderInterface $timeProvider;
+ private ?TimeProviderInterface $timeProvider;
private ValidatorInterface $validator;
private CalculatorInterface $calculator;
@@ -224,7 +224,10 @@ class FeatureSet
public function setNodeProvider(NodeProviderInterface $nodeProvider): void
{
$this->nodeProvider = $nodeProvider;
- $this->timeGenerator = $this->buildTimeGenerator($this->timeProvider);
+
+ if (isset($this->timeProvider)) {
+ $this->timeGenerator = $this->buildTimeGenerator($this->timeProvider);
+ }
}
/**
diff --git a/src/Provider/Node/SystemNodeProvider.php b/src/Provider/Node/SystemNodeProvider.php
index e3a7d5b..d617936 100644
--- a/src/Provider/Node/SystemNodeProvider.php
+++ b/src/Provider/Node/SystemNodeProvider.php
@@ -27,6 +27,7 @@ use function ob_start;
use function preg_match;
use function preg_match_all;
use function reset;
+use function str_contains;
use function str_replace;
use function strtolower;
use function strtoupper;
@@ -177,6 +178,7 @@ class SystemNodeProvider implements NodeProviderInterface
&& preg_match(self::SYSFS_PATTERN, $address);
});
+ /** @var string|bool $mac */
$mac = reset($macs);
}
diff --git a/src/Type/Time.php b/src/Type/Time.php
index abe1ec9..b29cc86 100644
--- a/src/Type/Time.php
+++ b/src/Type/Time.php
@@ -34,8 +34,8 @@ final class Time implements TypeInterface
private IntegerObject $microseconds;
public function __construct(
- int | string | IntegerObject $seconds,
- int | string | IntegerObject $microseconds = new IntegerObject(0),
+ int | float | string | IntegerObject $seconds,
+ int | float | string | IntegerObject $microseconds = new IntegerObject(0),
) {
$this->seconds = $seconds instanceof IntegerObject ? $seconds : new IntegerObject($seconds);
$this->microseconds = $microseconds instanceof IntegerObject ? $microseconds : new IntegerObject($microseconds);
diff --git a/tests/Generator/DceSecurityGeneratorTest.php b/tests/Generator/DceSecurityGeneratorTest.php
index 4097d1a..418496b 100644
--- a/tests/Generator/DceSecurityGeneratorTest.php
+++ b/tests/Generator/DceSecurityGeneratorTest.php
@@ -44,11 +44,13 @@ class DceSecurityGeneratorTest extends TestCase
string $expectedNode,
string $expectedTimeMidHi
): void {
+ /** @var DceSecurityProviderInterface $dceSecurityProvider */
$dceSecurityProvider = Mockery::mock(DceSecurityProviderInterface::class, [
'getUid' => new IntegerObject($uid),
'getGid' => new IntegerObject($gid),
]);
+ /** @var NodeProviderInterface $nodeProvider */
$nodeProvider = Mockery::mock(NodeProviderInterface::class, [
'getNode' => new Hexadecimal($node),
]);
@@ -71,7 +73,7 @@ class DceSecurityGeneratorTest extends TestCase
}
/**
- * @phpcsSuppress SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification
+ * @return array
*/
public function provideValuesForDceSecurityGenerator(): array
{