minor #36075 [UID] Rename NullUuid to NilUuid (ro0NL)
This PR was merged into the 5.1-dev branch.
Discussion
----------
[UID] Rename NullUuid to NilUuid
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix #... <!-- prefix each issue number with "Fix #", if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.
Additionally (see https://symfony.com/releases):
- Always add tests and ensure they pass.
- Never break backward compatibility (see https://symfony.com/bc).
- Bug fixes must be submitted against the lowest maintained branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too.)
- Features and deprecations must be submitted against branch master.
-->
As per https://tools.ietf.org/html/rfc4122#section-4.1.7
Commits
-------
cbb6d233a1
[UID] Rename NullUuid to NilUuid
This commit is contained in:
commit
1d955cc1f6
@ -16,7 +16,7 @@ namespace Symfony\Component\Uid;
|
||||
*
|
||||
* @author Grégoire Pineau <lyrixx@lyrixx.info>
|
||||
*/
|
||||
class NullUuid extends Uuid
|
||||
class NilUuid extends Uuid
|
||||
{
|
||||
protected const TYPE = UUID_TYPE_NULL;
|
||||
|
@ -12,7 +12,7 @@
|
||||
namespace Symfony\Tests\Component\Uid;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Uid\NullUuid;
|
||||
use Symfony\Component\Uid\NilUuid;
|
||||
use Symfony\Component\Uid\Uuid;
|
||||
use Symfony\Component\Uid\UuidV1;
|
||||
use Symfony\Component\Uid\UuidV3;
|
||||
@ -146,11 +146,11 @@ class UuidTest extends TestCase
|
||||
$this->assertSame([$a, $b, $c, $d], $uuids);
|
||||
}
|
||||
|
||||
public function testNullUuid()
|
||||
public function testNilUuid()
|
||||
{
|
||||
$uuid = Uuid::fromString('00000000-0000-0000-0000-000000000000');
|
||||
|
||||
$this->assertInstanceOf(NullUuid::class, $uuid);
|
||||
$this->assertInstanceOf(NilUuid::class, $uuid);
|
||||
$this->assertSame('00000000-0000-0000-0000-000000000000', (string) $uuid);
|
||||
}
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ class Uuid implements \JsonSerializable
|
||||
case UuidV4::TYPE: return new UuidV4($uuid);
|
||||
case UuidV5::TYPE: return new UuidV5($uuid);
|
||||
case UuidV6::TYPE: return new UuidV6($uuid);
|
||||
case NullUuid::TYPE: return new NullUuid();
|
||||
case NilUuid::TYPE: return new NilUuid();
|
||||
case self::TYPE: return new self($uuid);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user