aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/ramsey/uuid
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-06-01 07:00:21 +0000
committerMario <mario@mariovavti.com>2022-06-01 07:00:21 +0000
commite63f0438415bb364f3085286ca2f199e83ab187b (patch)
treeb107429276ebfc92dc9b4f78e302a4967e5bf0a6 /vendor/ramsey/uuid
parentc5f33baf27d80e2a7ad7307eacd3137609eeb089 (diff)
parent33dd0c83e377b8adf00559337d13784ec136cecb (diff)
downloadvolse-hubzilla-7.4.tar.gz
volse-hubzilla-7.4.tar.bz2
volse-hubzilla-7.4.zip
Merge branch '7.4RC'7.4
Diffstat (limited to 'vendor/ramsey/uuid')
-rw-r--r--vendor/ramsey/uuid/LICENSE2
-rw-r--r--vendor/ramsey/uuid/composer.json46
-rw-r--r--vendor/ramsey/uuid/src/Builder/BuilderCollection.php5
-rw-r--r--vendor/ramsey/uuid/src/Builder/FallbackBuilder.php6
-rw-r--r--vendor/ramsey/uuid/src/FeatureSet.php11
-rw-r--r--vendor/ramsey/uuid/src/Generator/CombGenerator.php2
-rw-r--r--vendor/ramsey/uuid/src/Generator/RandomLibAdapter.php4
-rw-r--r--vendor/ramsey/uuid/src/Provider/Dce/SystemDceSecurityProvider.php2
-rw-r--r--vendor/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php6
-rw-r--r--vendor/ramsey/uuid/src/Provider/Node/NodeProviderCollection.php5
-rw-r--r--vendor/ramsey/uuid/src/Uuid.php3
11 files changed, 53 insertions, 39 deletions
diff --git a/vendor/ramsey/uuid/LICENSE b/vendor/ramsey/uuid/LICENSE
index 5e06cf43b..2e8ef166d 100644
--- a/vendor/ramsey/uuid/LICENSE
+++ b/vendor/ramsey/uuid/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2012-2021 Ben Ramsey <ben@benramsey.com>
+Copyright (c) 2012-2022 Ben Ramsey <ben@benramsey.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/vendor/ramsey/uuid/composer.json b/vendor/ramsey/uuid/composer.json
index 3f3b5ac42..112fabf10 100644
--- a/vendor/ramsey/uuid/composer.json
+++ b/vendor/ramsey/uuid/composer.json
@@ -1,23 +1,19 @@
{
"name": "ramsey/uuid",
- "type": "library",
"description": "A PHP library for generating and working with universally unique identifiers (UUIDs).",
+ "license": "MIT",
+ "type": "library",
"keywords": [
"uuid",
"identifier",
"guid"
],
- "license": "MIT",
"require": {
- "php": "^7.2 || ^8.0",
+ "php": "^8.0",
+ "ext-ctype": "*",
"ext-json": "*",
"brick/math": "^0.8 || ^0.9",
- "ramsey/collection": "^1.0",
- "symfony/polyfill-ctype": "^1.8",
- "symfony/polyfill-php80": "^1.14"
- },
- "replace": {
- "rhumsaa/uuid": "self.version"
+ "ramsey/collection": "^1.0"
},
"require-dev": {
"captainhook/captainhook": "^5.10",
@@ -41,6 +37,9 @@
"squizlabs/php_codesniffer": "^3.5",
"vimeo/psalm": "^4.9"
},
+ "replace": {
+ "rhumsaa/uuid": "self.version"
+ },
"suggest": {
"ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.",
"ext-ctype": "Enables faster processing of character classification using ctype functions.",
@@ -49,17 +48,8 @@
"paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter",
"ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type."
},
- "config": {
- "sort-packages": true
- },
- "extra": {
- "branch-alias": {
- "dev-main": "4.x-dev"
- },
- "captainhook": {
- "force-install": true
- }
- },
+ "minimum-stability": "dev",
+ "prefer-stable": true,
"autoload": {
"psr-4": {
"Ramsey\\Uuid\\": "src/"
@@ -75,8 +65,20 @@
"Ramsey\\Uuid\\Test\\": "tests/"
}
},
- "minimum-stability": "dev",
- "prefer-stable": true,
+ "config": {
+ "allow-plugins": {
+ "captainhook/plugin-composer": true,
+ "ergebnis/composer-normalize": true,
+ "phpstan/extension-installer": true,
+ "dealerdirect/phpcodesniffer-composer-installer": true
+ },
+ "sort-packages": true
+ },
+ "extra": {
+ "captainhook": {
+ "force-install": true
+ }
+ },
"scripts": {
"analyze": [
"@phpstan",
diff --git a/vendor/ramsey/uuid/src/Builder/BuilderCollection.php b/vendor/ramsey/uuid/src/Builder/BuilderCollection.php
index 89fa1e3c8..9df3110fd 100644
--- a/vendor/ramsey/uuid/src/Builder/BuilderCollection.php
+++ b/vendor/ramsey/uuid/src/Builder/BuilderCollection.php
@@ -27,6 +27,11 @@ use Traversable;
/**
* A collection of UuidBuilderInterface objects
*
+ * @deprecated this class has been deprecated, and will be removed in 5.0.0. The use-case for this class comes from
+ * a pre-`phpstan/phpstan` and pre-`vimeo/psalm` ecosystem, in which type safety had to be mostly enforced
+ * at runtime: that is no longer necessary, now that you can safely verify your code to be correct, and use
+ * more generic types like `iterable<T>` instead.
+ *
* @extends AbstractCollection<UuidBuilderInterface>
*/
class BuilderCollection extends AbstractCollection
diff --git a/vendor/ramsey/uuid/src/Builder/FallbackBuilder.php b/vendor/ramsey/uuid/src/Builder/FallbackBuilder.php
index 470d2f755..8ab438a19 100644
--- a/vendor/ramsey/uuid/src/Builder/FallbackBuilder.php
+++ b/vendor/ramsey/uuid/src/Builder/FallbackBuilder.php
@@ -28,14 +28,14 @@ use Ramsey\Uuid\UuidInterface;
class FallbackBuilder implements UuidBuilderInterface
{
/**
- * @var BuilderCollection
+ * @var iterable<UuidBuilderInterface>
*/
private $builders;
/**
- * @param BuilderCollection $builders An array of UUID builders
+ * @param iterable<UuidBuilderInterface> $builders An array of UUID builders
*/
- public function __construct(BuilderCollection $builders)
+ public function __construct(iterable $builders)
{
$this->builders = $builders;
}
diff --git a/vendor/ramsey/uuid/src/FeatureSet.php b/vendor/ramsey/uuid/src/FeatureSet.php
index a8ab2fdbb..668366601 100644
--- a/vendor/ramsey/uuid/src/FeatureSet.php
+++ b/vendor/ramsey/uuid/src/FeatureSet.php
@@ -14,7 +14,6 @@ declare(strict_types=1);
namespace Ramsey\Uuid;
-use Ramsey\Uuid\Builder\BuilderCollection;
use Ramsey\Uuid\Builder\FallbackBuilder;
use Ramsey\Uuid\Builder\UuidBuilderInterface;
use Ramsey\Uuid\Codec\CodecInterface;
@@ -43,7 +42,6 @@ use Ramsey\Uuid\Nonstandard\UuidBuilder as NonstandardUuidBuilder;
use Ramsey\Uuid\Provider\Dce\SystemDceSecurityProvider;
use Ramsey\Uuid\Provider\DceSecurityProviderInterface;
use Ramsey\Uuid\Provider\Node\FallbackNodeProvider;
-use Ramsey\Uuid\Provider\Node\NodeProviderCollection;
use Ramsey\Uuid\Provider\Node\RandomNodeProvider;
use Ramsey\Uuid\Provider\Node\SystemNodeProvider;
use Ramsey\Uuid\Provider\NodeProviderInterface;
@@ -350,10 +348,10 @@ class FeatureSet
return new RandomNodeProvider();
}
- return new FallbackNodeProvider(new NodeProviderCollection([
+ return new FallbackNodeProvider([
new SystemNodeProvider(),
new RandomNodeProvider(),
- ]));
+ ]);
}
/**
@@ -432,11 +430,10 @@ class FeatureSet
return new GuidBuilder($this->numberConverter, $this->timeConverter);
}
- /** @psalm-suppress ImpureArgument */
- return new FallbackBuilder(new BuilderCollection([
+ return new FallbackBuilder([
new Rfc4122UuidBuilder($this->numberConverter, $this->timeConverter),
new NonstandardUuidBuilder($this->numberConverter, $this->timeConverter),
- ]));
+ ]);
}
/**
diff --git a/vendor/ramsey/uuid/src/Generator/CombGenerator.php b/vendor/ramsey/uuid/src/Generator/CombGenerator.php
index 49b09381d..25b7988ec 100644
--- a/vendor/ramsey/uuid/src/Generator/CombGenerator.php
+++ b/vendor/ramsey/uuid/src/Generator/CombGenerator.php
@@ -87,7 +87,7 @@ class CombGenerator implements RandomGeneratorInterface
*/
public function generate(int $length): string
{
- if ($length < self::TIMESTAMP_BYTES || $length < 0) {
+ if ($length < self::TIMESTAMP_BYTES) {
throw new InvalidArgumentException(
'Length must be a positive integer greater than or equal to ' . self::TIMESTAMP_BYTES
);
diff --git a/vendor/ramsey/uuid/src/Generator/RandomLibAdapter.php b/vendor/ramsey/uuid/src/Generator/RandomLibAdapter.php
index 24ed56920..793ccd5a4 100644
--- a/vendor/ramsey/uuid/src/Generator/RandomLibAdapter.php
+++ b/vendor/ramsey/uuid/src/Generator/RandomLibAdapter.php
@@ -21,6 +21,10 @@ use RandomLib\Generator;
* RandomLibAdapter generates strings of random binary data using the
* paragonie/random-lib library
*
+ * @deprecated This class will be removed in 5.0.0. Use the default
+ * RandomBytesGenerator or implement your own generator that implements
+ * RandomGeneratorInterface.
+ *
* @link https://packagist.org/packages/paragonie/random-lib paragonie/random-lib
*/
class RandomLibAdapter implements RandomGeneratorInterface
diff --git a/vendor/ramsey/uuid/src/Provider/Dce/SystemDceSecurityProvider.php b/vendor/ramsey/uuid/src/Provider/Dce/SystemDceSecurityProvider.php
index 6d6240b7a..7ff407648 100644
--- a/vendor/ramsey/uuid/src/Provider/Dce/SystemDceSecurityProvider.php
+++ b/vendor/ramsey/uuid/src/Provider/Dce/SystemDceSecurityProvider.php
@@ -229,6 +229,6 @@ class SystemDceSecurityProvider implements DceSecurityProviderInterface
return '';
}
- return trim((string) substr($sid, $lastHyphen + 1));
+ return trim(substr($sid, $lastHyphen + 1));
}
}
diff --git a/vendor/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php b/vendor/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php
index cad01045c..fe890cc4d 100644
--- a/vendor/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php
+++ b/vendor/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php
@@ -25,14 +25,14 @@ use Ramsey\Uuid\Type\Hexadecimal;
class FallbackNodeProvider implements NodeProviderInterface
{
/**
- * @var NodeProviderCollection
+ * @var iterable<NodeProviderInterface>
*/
private $nodeProviders;
/**
- * @param NodeProviderCollection $providers Array of node providers
+ * @param iterable<NodeProviderInterface> $providers Array of node providers
*/
- public function __construct(NodeProviderCollection $providers)
+ public function __construct(iterable $providers)
{
$this->nodeProviders = $providers;
}
diff --git a/vendor/ramsey/uuid/src/Provider/Node/NodeProviderCollection.php b/vendor/ramsey/uuid/src/Provider/Node/NodeProviderCollection.php
index 536cb6034..1b979faee 100644
--- a/vendor/ramsey/uuid/src/Provider/Node/NodeProviderCollection.php
+++ b/vendor/ramsey/uuid/src/Provider/Node/NodeProviderCollection.php
@@ -21,6 +21,11 @@ use Ramsey\Uuid\Type\Hexadecimal;
/**
* A collection of NodeProviderInterface objects
*
+ * @deprecated this class has been deprecated, and will be removed in 5.0.0. The use-case for this class comes from
+ * a pre-`phpstan/phpstan` and pre-`vimeo/psalm` ecosystem, in which type safety had to be mostly enforced
+ * at runtime: that is no longer necessary, now that you can safely verify your code to be correct, and use
+ * more generic types like `iterable<T>` instead.
+ *
* @extends AbstractCollection<NodeProviderInterface>
*/
class NodeProviderCollection extends AbstractCollection
diff --git a/vendor/ramsey/uuid/src/Uuid.php b/vendor/ramsey/uuid/src/Uuid.php
index 945480ba4..5f0922b9c 100644
--- a/vendor/ramsey/uuid/src/Uuid.php
+++ b/vendor/ramsey/uuid/src/Uuid.php
@@ -476,10 +476,11 @@ class Uuid implements UuidInterface
*/
public static function fromString(string $uuid): UuidInterface
{
+ $uuid = strtolower($uuid);
if (! self::$factoryReplaced && preg_match(LazyUuidFromString::VALID_REGEX, $uuid) === 1) {
assert($uuid !== '');
- return new LazyUuidFromString(strtolower($uuid));
+ return new LazyUuidFromString($uuid);
}
return self::getFactory()->fromString($uuid);