Merge branch '4.x' into 5.x

This commit is contained in:
Ben Ramsey
2022-08-05 17:40:48 -05:00
4 changed files with 75 additions and 3 deletions
+60
View File
@@ -29,6 +29,11 @@
<code>uuid_parse</code>
</ImpureFunctionCall>
</file>
<file src="src/Guid/Guid.php">
<DeprecatedMethod occurrences="1">
<code>parent::__construct($fields, $numberConverter, $codec, $timeConverter)</code>
</DeprecatedMethod>
</file>
<file src="src/Guid/GuidBuilder.php">
<ImpureVariable occurrences="3">
<code>$this</code>
@@ -36,6 +41,11 @@
<code>$this</code>
</ImpureVariable>
</file>
<file src="src/Nonstandard/Uuid.php">
<DeprecatedMethod occurrences="1">
<code>parent::__construct($fields, $numberConverter, $codec, $timeConverter)</code>
</DeprecatedMethod>
</file>
<file src="src/Nonstandard/UuidBuilder.php">
<ImpureVariable occurrences="3">
<code>$this</code>
@@ -43,6 +53,11 @@
<code>$this</code>
</ImpureVariable>
</file>
<file src="src/Nonstandard/UuidV6.php">
<DeprecatedMethod occurrences="1">
<code>parent::__construct($fields, $numberConverter, $codec, $timeConverter)</code>
</DeprecatedMethod>
</file>
<file src="src/Provider/Dce/SystemDceSecurityProvider.php">
<ForbiddenCode occurrences="5">
<code>shell_exec('id -g')</code>
@@ -60,6 +75,11 @@
<code>$macs[]</code>
</MixedArrayAssignment>
</file>
<file src="src/Rfc4122/NilUuid.php">
<DeprecatedMethod occurrences="1">
<code>Uuid</code>
</DeprecatedMethod>
</file>
<file src="src/Rfc4122/UuidBuilder.php">
<ImpureVariable occurrences="15">
<code>$this</code>
@@ -79,6 +99,31 @@
<code>$this</code>
</ImpureVariable>
</file>
<file src="src/Rfc4122/UuidV1.php">
<DeprecatedMethod occurrences="1">
<code>parent::__construct($fields, $numberConverter, $codec, $timeConverter)</code>
</DeprecatedMethod>
</file>
<file src="src/Rfc4122/UuidV2.php">
<DeprecatedMethod occurrences="1">
<code>parent::__construct($fields, $numberConverter, $codec, $timeConverter)</code>
</DeprecatedMethod>
</file>
<file src="src/Rfc4122/UuidV3.php">
<DeprecatedMethod occurrences="1">
<code>parent::__construct($fields, $numberConverter, $codec, $timeConverter)</code>
</DeprecatedMethod>
</file>
<file src="src/Rfc4122/UuidV4.php">
<DeprecatedMethod occurrences="1">
<code>parent::__construct($fields, $numberConverter, $codec, $timeConverter)</code>
</DeprecatedMethod>
</file>
<file src="src/Rfc4122/UuidV5.php">
<DeprecatedMethod occurrences="1">
<code>parent::__construct($fields, $numberConverter, $codec, $timeConverter)</code>
</DeprecatedMethod>
</file>
<file src="src/Type/Decimal.php">
<InaccessibleProperty occurrences="1">
<code>$this-&gt;isNegative</code>
@@ -90,6 +135,21 @@
</InaccessibleProperty>
</file>
<file src="src/Uuid.php">
<DeprecatedMethod occurrences="13">
<code>self::getFactory()</code>
<code>self::getFactory()</code>
<code>self::getFactory()</code>
<code>self::getFactory()</code>
<code>self::getFactory()</code>
<code>self::getFactory()</code>
<code>self::getFactory()</code>
<code>self::getFactory()</code>
<code>self::getFactory()</code>
<code>self::getFactory()</code>
<code>self::getFactory()</code>
<code>self::getFactory()</code>
<code>self::getFactory()</code>
</DeprecatedMethod>
<ImpureMethodCall occurrences="6">
<code>getFactory</code>
<code>getFactory</code>
+1 -1
View File
@@ -4,7 +4,7 @@
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
errorLevel="1"
cacheDirectory="./build/cache/psalm"
errorBaseline="./psalm-baseline.xml">
errorBaseline="psalm-baseline.xml">
<projectFiles>
<directory name="./src"/>
+12
View File
@@ -207,6 +207,10 @@ class Uuid implements Rfc4122UuidInterface
* $namespaceSha1Uuid = Uuid::uuid5(Uuid::NAMESPACE_URL, 'http://php.net/');
* ```
*
* @deprecated ramsey/uuid version 5 will no longer allow direct
* instantiation of the base Ramsey\Uuid\Uuid class. Instead, you must
* use factories to create UUID objects.
*
* @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID
* @param NumberConverterInterface $numberConverter The number converter to use
* for converting hex values to/from integers
@@ -338,6 +342,9 @@ class Uuid implements Rfc4122UuidInterface
/**
* Returns the factory used to create UUIDs
*
* @deprecated ramsey/uuid version 5 will no longer support getting a
* factory instance from the base Ramsey\Uuid\Uuid class.
*/
public static function getFactory(): UuidFactoryInterface
{
@@ -351,6 +358,11 @@ class Uuid implements Rfc4122UuidInterface
/**
* Sets the factory used to create UUIDs
*
* @deprecated ramsey/uuid version 5 will no longer support setting a
* factory instance on the base Ramsey\Uuid\Uuid class. If you need to
* customize the properties used to build a UUID, use one of the
* dedicated factories that version 5 will introduce.
*
* @param UuidFactoryInterface $factory A factory that will be used by this
* class to create UUIDs
*/
+2 -2
View File
@@ -25,7 +25,7 @@ use Ramsey\Uuid\Type\Integer as IntegerObject;
* @param Hexadecimal|int|string|null $node A 48-bit number representing the
* hardware address; this number may be represented as an integer or a
* hexadecimal string
* @param int $clockSeq A 14-bit number used to help avoid duplicates that
* @param int|null $clockSeq A 14-bit number used to help avoid duplicates that
* could arise when the clock is set backwards in time or if the node ID
* changes
*
@@ -111,7 +111,7 @@ function v5($ns, string $name): string
*
* @param Hexadecimal|null $node A 48-bit number representing the hardware
* address
* @param int $clockSeq A 14-bit number used to help avoid duplicates that
* @param int|null $clockSeq A 14-bit number used to help avoid duplicates that
* could arise when the clock is set backwards in time or if the node ID
* changes
*