8000 Merge branch '6.0' into 6.1 · symfony/symfony-docs@bfe810e · GitHub
[go: up one dir, main page]

Skip to content

Commit bfe810e

Browse files
committed
Merge branch '6.0' into 6.1
* 6.0: Use a better name than "class Foo" Update uid.rst
2 parents 2af12c7 + 2903200 commit bfe810e

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

components/event_dispatcher.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,9 +489,9 @@ is dispatched, are passed as arguments to the listener::
489489
use Symfony\Contracts\EventDispatcher\Event;
490490
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
491491

492-
class Foo
492+
class MyListener
493493
{
494-
public function myEventListener(Event $event, $eventName, EventDispatcherInterface $dispatcher)
494+
public function myEventListener(Event $event, string $eventName, EventDispatcherInterface $dispatcher)
495495
{
496496
// ... do something with the event name
497497
}

components/uid.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,10 @@ UUID objects created with the ``Uuid`` class can use the following methods
106106

107107
// getting the UUID datetime (it's only available in certain UUID types)
108108
$uuid = Uuid::v1();
109-
$uuid->getDateTime(); // returns a \DateTimeImmutable instance
109+
$uuid->getDateTime(); // returns a \DateTimeImmutable instance
110+
111+
// checking if a given value is valid as UUID
112+
$isValid = Uuid::isValid($uuid); // true or false
110113

111114
// comparing UUIDs and checking for equality
112115
$uuid1 = Uuid::v1();

0 commit comments

Comments
 (0)
0