aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/ramsey/uuid/src
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-05-19 08:18:15 +0000
committerMario <mario@mariovavti.com>2022-05-19 08:18:15 +0000
commit55d833a9c86ad9356e76bf47d0f48dd40552944a (patch)
tree4c5921be76eb249ec623aa576e2d2528537308cf /vendor/ramsey/uuid/src
parent8ba47450970bab036664f03a558917c13d8c1574 (diff)
downloadvolse-hubzilla-55d833a9c86ad9356e76bf47d0f48dd40552944a.tar.gz
volse-hubzilla-55d833a9c86ad9356e76bf47d0f48dd40552944a.tar.bz2
volse-hubzilla-55d833a9c86ad9356e76bf47d0f48dd40552944a.zip
update composer libs
Diffstat (limited to 'vendor/ramsey/uuid/src')
-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
9 files changed, 28 insertions, 16 deletions
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);