From 89e0895f236a5e5ee4b5467a6bae5f03644bc934 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 9 Aug 2021 09:21:47 +0200 Subject: update to 4.2.0 --- 352.patch | 54 ------------------------------------------------------ 1 file changed, 54 deletions(-) delete mode 100644 352.patch (limited to '352.patch') diff --git a/352.patch b/352.patch deleted file mode 100644 index b7ba70d..0000000 --- a/352.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 2a39b0a67413e902274b09f640c6b68ffbd199fa Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Thu, 29 Oct 2020 16:34:55 +0100 -Subject: [PATCH 1/2] catch ValueError raised by PHP 8 - ---- - src/Generator/DefaultNameGenerator.php | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/src/Generator/DefaultNameGenerator.php b/src/Generator/DefaultNameGenerator.php -index 270e8fbe..be552b91 100644 ---- a/src/Generator/DefaultNameGenerator.php -+++ b/src/Generator/DefaultNameGenerator.php -@@ -29,7 +29,11 @@ class DefaultNameGenerator implements NameGeneratorInterface - public function generate(UuidInterface $ns, string $name, string $hashAlgorithm): string - { - /** @var string|bool $bytes */ -- $bytes = @hash($hashAlgorithm, $ns->getBytes() . $name, true); -+ try { -+ $bytes = @hash($hashAlgorithm, $ns->getBytes() . $name, true); -+ } catch (\ValueError $e) { -+ $bytes = false; // keep same behavior than PHP 7 */ -+ } - - if ($bytes === false) { - throw new NameException(sprintf( - -From 3a488f24e05e711809f61626aeb8740d53e56feb Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Thu, 29 Oct 2020 16:40:08 +0100 -Subject: [PATCH 2/2] CS - ---- - src/Generator/DefaultNameGenerator.php | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/Generator/DefaultNameGenerator.php b/src/Generator/DefaultNameGenerator.php -index be552b91..1c0b0048 100644 ---- a/src/Generator/DefaultNameGenerator.php -+++ b/src/Generator/DefaultNameGenerator.php -@@ -28,11 +28,11 @@ class DefaultNameGenerator implements NameGeneratorInterface - /** @psalm-pure */ - public function generate(UuidInterface $ns, string $name, string $hashAlgorithm): string - { -- /** @var string|bool $bytes */ - try { -+ /** @var string|bool $bytes */ - $bytes = @hash($hashAlgorithm, $ns->getBytes() . $name, true); - } catch (\ValueError $e) { -- $bytes = false; // keep same behavior than PHP 7 */ -+ $bytes = false; // keep same behavior than PHP 7 - } - - if ($bytes === false) { -- cgit