mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-16 16:17:43 +03:00
chore(deps-dev): upgrade remaining development dependencies
This commit is contained in:
+11
-12
@@ -17,22 +17,21 @@
|
||||
"require-dev": {
|
||||
"captainhook/captainhook": "^5.25",
|
||||
"captainhook/plugin-composer": "^5.3",
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
|
||||
"doctrine/annotations": "^1.8",
|
||||
"ergebnis/composer-normalize": "^2.15",
|
||||
"mockery/mockery": "^1.3",
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
|
||||
"ergebnis/composer-normalize": "^2.47",
|
||||
"mockery/mockery": "^1.6",
|
||||
"paragonie/random-lib": "^2",
|
||||
"php-mock/php-mock": "^2.2",
|
||||
"php-mock/php-mock-mockery": "^1.3",
|
||||
"php-mock/php-mock": "^2.6",
|
||||
"php-mock/php-mock-mockery": "^1.5",
|
||||
"php-parallel-lint/php-parallel-lint": "^1.4.0",
|
||||
"phpbench/phpbench": "^1.0",
|
||||
"phpbench/phpbench": "^1.4",
|
||||
"phpstan/extension-installer": "^1.4",
|
||||
"phpstan/phpstan": "^2.1",
|
||||
"phpstan/phpstan-mockery": "^2.0",
|
||||
"phpstan/phpstan-phpunit": "^2.0",
|
||||
"phpunit/phpunit": "^8.5 || ^9",
|
||||
"slevomat/coding-standard": "^8.4",
|
||||
"squizlabs/php_codesniffer": "^3.5"
|
||||
"phpunit/phpunit": "^9.6",
|
||||
"slevomat/coding-standard": "^8.18",
|
||||
"squizlabs/php_codesniffer": "^3.13"
|
||||
},
|
||||
"replace": {
|
||||
"rhumsaa/uuid": "self.version"
|
||||
@@ -64,9 +63,9 @@
|
||||
"config": {
|
||||
"allow-plugins": {
|
||||
"captainhook/plugin-composer": true,
|
||||
"dealerdirect/phpcodesniffer-composer-installer": true,
|
||||
"ergebnis/composer-normalize": true,
|
||||
"phpstan/extension-installer": true,
|
||||
"dealerdirect/phpcodesniffer-composer-installer": true
|
||||
"phpstan/extension-installer": true
|
||||
},
|
||||
"sort-packages": true
|
||||
},
|
||||
|
||||
Generated
+890
-650
File diff suppressed because it is too large
Load Diff
+4
-3
@@ -428,15 +428,16 @@
|
||||
</rule>
|
||||
|
||||
<!-- Require space after language constructs -->
|
||||
<rule ref="Squiz.WhiteSpace.LanguageConstructSpacing"/>
|
||||
<rule ref="Generic.WhiteSpace.LanguageConstructSpacing"/>
|
||||
|
||||
<!-- Require space around logical operators -->
|
||||
<rule ref="Squiz.WhiteSpace.LogicalOperatorSpacing"/>
|
||||
|
||||
<rule ref="SlevomatCodingStandard.TypeHints.UnionTypeHintFormat">
|
||||
<rule ref="SlevomatCodingStandard.TypeHints.DNFTypeHintFormat">
|
||||
<properties>
|
||||
<property name="withSpaces" value="yes"/>
|
||||
<property name="withSpacesAroundOperators" value="yes"/>
|
||||
<property name="nullPosition" value="last"/>
|
||||
<property name="shortNullable" value="yes"/>
|
||||
</properties>
|
||||
</rule>
|
||||
|
||||
|
||||
@@ -81,6 +81,10 @@ class CombGenerator implements RandomGeneratorInterface
|
||||
);
|
||||
}
|
||||
|
||||
if ($length % 2 !== 0) {
|
||||
throw new InvalidArgumentException('Length must be an even number');
|
||||
}
|
||||
|
||||
$hash = '';
|
||||
|
||||
/** @phpstan-ignore greater.alwaysTrue (TIMESTAMP_BYTES constant could change in child classes) */
|
||||
|
||||
@@ -4,7 +4,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace Ramsey\Uuid\Test\Generator;
|
||||
|
||||
use Exception;
|
||||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
use Ramsey\Uuid\Converter\NumberConverterInterface;
|
||||
use Ramsey\Uuid\Exception\InvalidArgumentException;
|
||||
@@ -21,10 +20,7 @@ use const STR_PAD_LEFT;
|
||||
|
||||
class CombGeneratorTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $timestampBytes = 6;
|
||||
private int $timestampBytes = 6;
|
||||
|
||||
public function testGenerateUsesRandomGeneratorWithLengthMinusTimestampBytes(): void
|
||||
{
|
||||
@@ -97,8 +93,6 @@ class CombGeneratorTest extends TestCase
|
||||
/**
|
||||
* @param int<1, max> $length
|
||||
*
|
||||
* @throws Exception
|
||||
*
|
||||
* @dataProvider lengthLessThanSix
|
||||
*/
|
||||
public function testGenerateWithLessThanTimestampBytesThrowsException(int $length): void
|
||||
@@ -115,9 +109,6 @@ class CombGeneratorTest extends TestCase
|
||||
$generator->generate($length);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws Exception
|
||||
*/
|
||||
public function testGenerateWithOddNumberOverTimestampBytesCausesError(): void
|
||||
{
|
||||
/** @var MockObject & RandomGeneratorInterface $randomGenerator */
|
||||
@@ -128,7 +119,9 @@ class CombGeneratorTest extends TestCase
|
||||
|
||||
$generator = new CombGenerator($randomGenerator, $converter);
|
||||
|
||||
$this->expectError();
|
||||
$this->expectException(InvalidArgumentException::class);
|
||||
$this->expectExceptionMessage('Length must be an even number');
|
||||
|
||||
$generator->generate(7);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ use Ramsey\Uuid\Rfc4122\FieldsInterface;
|
||||
use Ramsey\Uuid\Rfc4122\UuidV2;
|
||||
use Ramsey\Uuid\Test\TestCase;
|
||||
use Ramsey\Uuid\Type\Hexadecimal;
|
||||
use Ramsey\Uuid\Type\Integer;
|
||||
use Ramsey\Uuid\Type\Integer as IntegerObject;
|
||||
use Ramsey\Uuid\Type\Time;
|
||||
use Ramsey\Uuid\Uuid;
|
||||
use Ramsey\Uuid\UuidFactory;
|
||||
@@ -76,7 +76,7 @@ class UuidV2Test extends TestCase
|
||||
*/
|
||||
public function testGetLocalDomainAndIdentifier(
|
||||
int $domain,
|
||||
Integer $identifier,
|
||||
IntegerObject $identifier,
|
||||
Time $time,
|
||||
int $expectedDomain,
|
||||
string $expectedDomainName,
|
||||
@@ -105,7 +105,7 @@ class UuidV2Test extends TestCase
|
||||
|
||||
$this->assertSame($expectedDomain, $uuid->getLocalDomain());
|
||||
$this->assertSame($expectedDomainName, $uuid->getLocalDomainName());
|
||||
$this->assertInstanceOf(Integer::class, $uuid->getLocalIdentifier());
|
||||
$this->assertInstanceOf(IntegerObject::class, $uuid->getLocalIdentifier());
|
||||
$this->assertSame($expectedIdentifier, $uuid->getLocalIdentifier()->toString());
|
||||
$this->assertSame($expectedTimestamp, $fields->getTimestamp()->toString());
|
||||
$this->assertInstanceOf(DateTimeInterface::class, $uuid->getDateTime());
|
||||
@@ -114,10 +114,9 @@ class UuidV2Test extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* phpcs:ignore SlevomatCodingStandard.TypeHints.LongTypeHints.UsedLongTypeHint
|
||||
* @return array<array{
|
||||
* domain: int,
|
||||
* identifier: Integer,
|
||||
* identifier: IntegerObject,
|
||||
* time: Time,
|
||||
* expectedDomain: int,
|
||||
* expectedDomainName: non-empty-string,
|
||||
@@ -134,7 +133,7 @@ class UuidV2Test extends TestCase
|
||||
return [
|
||||
[
|
||||
'domain' => Uuid::DCE_DOMAIN_PERSON,
|
||||
'identifier' => new Integer('12345678'),
|
||||
'identifier' => new IntegerObject('12345678'),
|
||||
'time' => new Time(0, 0),
|
||||
'expectedDomain' => 0,
|
||||
'expectedDomainName' => 'person',
|
||||
@@ -144,7 +143,7 @@ class UuidV2Test extends TestCase
|
||||
],
|
||||
[
|
||||
'domain' => Uuid::DCE_DOMAIN_GROUP,
|
||||
'identifier' => new Integer('87654321'),
|
||||
'identifier' => new IntegerObject('87654321'),
|
||||
'time' => new Time(0, 0),
|
||||
'expectedDomain' => 1,
|
||||
'expectedDomainName' => 'group',
|
||||
@@ -154,7 +153,7 @@ class UuidV2Test extends TestCase
|
||||
],
|
||||
[
|
||||
'domain' => Uuid::DCE_DOMAIN_ORG,
|
||||
'identifier' => new Integer('1'),
|
||||
'identifier' => new IntegerObject('1'),
|
||||
'time' => new Time(0, 0),
|
||||
'expectedDomain' => 2,
|
||||
'expectedDomainName' => 'org',
|
||||
@@ -164,7 +163,7 @@ class UuidV2Test extends TestCase
|
||||
],
|
||||
[
|
||||
'domain' => Uuid::DCE_DOMAIN_PERSON,
|
||||
'identifier' => new Integer('0'),
|
||||
'identifier' => new IntegerObject('0'),
|
||||
'time' => new Time(1583208664, 444109),
|
||||
'expectedDomain' => 0,
|
||||
'expectedDomainName' => 'person',
|
||||
@@ -174,7 +173,7 @@ class UuidV2Test extends TestCase
|
||||
],
|
||||
[
|
||||
'domain' => Uuid::DCE_DOMAIN_PERSON,
|
||||
'identifier' => new Integer('2147483647'),
|
||||
'identifier' => new IntegerObject('2147483647'),
|
||||
'time' => new Time(1583208879, 500000),
|
||||
'expectedDomain' => 0,
|
||||
'expectedDomainName' => 'person',
|
||||
@@ -186,7 +185,7 @@ class UuidV2Test extends TestCase
|
||||
],
|
||||
[
|
||||
'domain' => Uuid::DCE_DOMAIN_PERSON,
|
||||
'identifier' => new Integer('4294967295'),
|
||||
'identifier' => new IntegerObject('4294967295'),
|
||||
'time' => new Time(1583208879, 500000),
|
||||
'expectedDomain' => 0,
|
||||
'expectedDomainName' => 'person',
|
||||
@@ -198,7 +197,7 @@ class UuidV2Test extends TestCase
|
||||
],
|
||||
[
|
||||
'domain' => Uuid::DCE_DOMAIN_PERSON,
|
||||
'identifier' => new Integer('4294967295'),
|
||||
'identifier' => new IntegerObject('4294967295'),
|
||||
'time' => new Time(1583209093, 940838),
|
||||
'expectedDomain' => 0,
|
||||
'expectedDomainName' => 'person',
|
||||
@@ -210,7 +209,7 @@ class UuidV2Test extends TestCase
|
||||
],
|
||||
[
|
||||
'domain' => Uuid::DCE_DOMAIN_PERSON,
|
||||
'identifier' => new Integer('4294967295'),
|
||||
'identifier' => new IntegerObject('4294967295'),
|
||||
'time' => new Time(1583209093, 940839),
|
||||
'expectedDomain' => 0,
|
||||
'expectedDomainName' => 'person',
|
||||
|
||||
Reference in New Issue
Block a user