From fa901e7feb8f6979302074a3f3cf714885715c32 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 24 Jan 2023 15:02:24 +0100 Subject: [PATCH 1/2] Update license years (last time) --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 0f262c2..0ed3a24 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2020-2023 Fabien Potencier +Copyright (c) 2020-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From a30744506976aafc807ccb0d4f95865c0a690d02 Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Wed, 14 Dec 2022 15:42:16 +0100 Subject: [PATCH 2/2] Migrate to `static` data providers using `rector/rector` --- Tests/Command/GenerateUlidCommandTest.php | 2 +- Tests/Command/GenerateUuidCommandTest.php | 8 ++++---- Tests/UlidTest.php | 8 ++++---- Tests/UuidTest.php | 14 +++++++------- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Tests/Command/GenerateUlidCommandTest.php b/Tests/Command/GenerateUlidCommandTest.php index 48814de..d1116c0 100644 --- a/Tests/Command/GenerateUlidCommandTest.php +++ b/Tests/Command/GenerateUlidCommandTest.php @@ -119,7 +119,7 @@ public function testComplete(array $input, array $expectedSuggestions) $this->assertSame($expectedSuggestions, $suggestions); } - public function provideCompletionSuggestions(): iterable + public static function provideCompletionSuggestions(): iterable { yield 'option --format' => [ ['--format', ''], diff --git a/Tests/Command/GenerateUuidCommandTest.php b/Tests/Command/GenerateUuidCommandTest.php index 65b9f87..a0ee281 100644 --- a/Tests/Command/GenerateUuidCommandTest.php +++ b/Tests/Command/GenerateUuidCommandTest.php @@ -132,7 +132,7 @@ public function testInvalidCombinationOfBasedOptions(array $input) $this->assertStringContainsString('Only one of "--time-based", "--name-based" or "--random-based"', $commandTester->getDisplay()); } - public function provideInvalidCombinationOfBasedOptions() + public static function provideInvalidCombinationOfBasedOptions() { return [ [['--time-based' => 'now', '--name-based' => 'foo']], @@ -153,7 +153,7 @@ public function testExtraNodeOption(array $input) $this->assertStringContainsString('Option "--node" can only be used with "--time-based"', $commandTester->getDisplay()); } - public function provideExtraNodeOption() + public static function provideExtraNodeOption() { return [ [['--node' => 'foo']], @@ -173,7 +173,7 @@ public function testExtraNamespaceOption(array $input) $this->assertStringContainsString('Option "--namespace" can only be used with "--name-based"', $commandTester->getDisplay()); } - public function provideExtraNamespaceOption() + public static function provideExtraNamespaceOption() { return [ [['--namespace' => 'foo']], @@ -248,7 +248,7 @@ public function testComplete(array $input, array $expectedSuggestions) $this->assertSame($expectedSuggestions, $suggestions); } - public function provideCompletionSuggestions(): iterable + public static function provideCompletionSuggestions(): iterable { yield 'option --format' => [ ['--format', ''], diff --git a/Tests/UlidTest.php b/Tests/UlidTest.php index 50801a8..27f0664 100644 --- a/Tests/UlidTest.php +++ b/Tests/UlidTest.php @@ -149,7 +149,7 @@ public function testFromBinaryInvalidFormat(string $ulid) Ulid::fromBinary($ulid); } - public function provideInvalidBinaryFormat() + public static function provideInvalidBinaryFormat() { return [ ['01EW2RYKDCT2SAK454KBR2QG08'], @@ -176,7 +176,7 @@ public function testFromBase58InvalidFormat(string $ulid) Ulid::fromBase58($ulid); } - public function provideInvalidBase58Format() + public static function provideInvalidBase58Format() { return [ ["\x01\x77\x05\x8F\x4D\xAC\xD0\xB2\xA9\x90\xA4\x9A\xF0\x2B\xC0\x08"], @@ -203,7 +203,7 @@ public function testFromBase32InvalidFormat(string $ulid) Ulid::fromBase32($ulid); } - public function provideInvalidBase32Format() + public static function provideInvalidBase32Format() { return [ ["\x01\x77\x05\x8F\x4D\xAC\xD0\xB2\xA9\x90\xA4\x9A\xF0\x2B\xC0\x08"], @@ -230,7 +230,7 @@ public function testFromRfc4122InvalidFormat(string $ulid) Ulid::fromRfc4122($ulid); } - public function provideInvalidRfc4122Format() + public static function provideInvalidRfc4122Format() { return [ ["\x01\x77\x05\x8F\x4D\xAC\xD0\xB2\xA9\x90\xA4\x9A\xF0\x2B\xC0\x08"], diff --git a/Tests/UuidTest.php b/Tests/UuidTest.php index 8e73eb0..dbf5ea0 100644 --- a/Tests/UuidTest.php +++ b/Tests/UuidTest.php @@ -38,7 +38,7 @@ public function testConstructorWithInvalidUuid(string $uuid) Uuid::fromString($uuid); } - public function provideInvalidUuids(): iterable + public static function provideInvalidUuids(): iterable { yield ['this is not a uuid']; yield ['these are just thirty-six characters']; @@ -61,7 +61,7 @@ public function testInvalidVariant(string $uuid) new $class($uuid); } - public function provideInvalidVariant(): iterable + public static function provideInvalidVariant(): iterable { yield ['8dac64d3-937a-1e7c-fa1d-d5d6c06a61f5']; yield ['8dac64d3-937a-3e7c-fa1d-d5d6c06a61f5']; @@ -206,7 +206,7 @@ public function testEqualsAgainstOtherType($other) $this->assertFalse((new UuidV4(self::A_UUID_V4))->equals($other)); } - public function provideInvalidEqualType() + public static function provideInvalidEqualType() { yield [null]; yield [self::A_UUID_V1]; @@ -268,7 +268,7 @@ public function testFromBinaryInvalidFormat(string $ulid) Uuid::fromBinary($ulid); } - public function provideInvalidBinaryFormat() + public static function provideInvalidBinaryFormat() { return [ ['01EW2RYKDCT2SAK454KBR2QG08'], @@ -295,7 +295,7 @@ public function testFromBase58InvalidFormat(string $ulid) Uuid::fromBase58($ulid); } - public function provideInvalidBase58Format() + public static function provideInvalidBase58Format() { return [ ["\x41\x4C\x08\x92\x57\x1B\x11\xEB\xBF\x70\x93\xF9\xB0\x82\x2C\x57"], @@ -322,7 +322,7 @@ public function testFromBase32InvalidFormat(string $ulid) Uuid::fromBase32($ulid); } - public function provideInvalidBase32Format() + public static function provideInvalidBase32Format() { return [ ["\x5B\xA8\x32\x72\x45\x6D\x5A\xC0\xAB\xE3\xAA\x8B\xF7\x01\x96\x73"], @@ -349,7 +349,7 @@ public function testFromRfc4122InvalidFormat(string $ulid) Uuid::fromRfc4122($ulid); } - public function provideInvalidRfc4122Format() + public static function provideInvalidRfc4122Format() { return [ ["\x1E\xB5\x71\xB4\x14\xC0\x68\x93\xBF\x70\x2D\x4C\x83\xCF\x75\x5A"],