Skip to content

Commit 84b177e

Browse files
authored
Merge pull request #21 from w3c/fix-deprecations
Fix deprecations
2 parents cbc8fb1 + 8920e74 commit 84b177e

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

DependencyInjection/W3CLifecycleEventsExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use Symfony\Component\Config\FileLocator;
66
use Symfony\Component\DependencyInjection\ContainerBuilder;
77
use Symfony\Component\DependencyInjection\Loader;
8-
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
8+
use Symfony\Component\DependencyInjection\Extension\Extension;
99

1010
/**
1111
* This is the class that loads and manages your bundle configuration

Event/LifecycleCollectionChangedEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class LifecycleCollectionChangedEvent extends LifecycleEvent
2121
* @param array|null $deletedElements
2222
* @param array|null $insertedElements
2323
*/
24-
public function __construct(object $entity, string $property, array $deletedElements = null, array $insertedElements = null)
24+
public function __construct(object $entity, string $property, ?array $deletedElements = null, ?array $insertedElements = null)
2525
{
2626
parent::__construct($entity);
2727

Event/LifecycleDeletionEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class LifecycleDeletionEvent extends LifecycleEvent
1212
{
1313
protected array $identifier;
1414

15-
public function __construct(object $entity, array $identifier = null)
15+
public function __construct(object $entity, ?array $identifier = null)
1616
{
1717
parent::__construct($entity);
1818
$this->identifier = $identifier;

Services/LifecycleEventsDispatcher.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,8 @@ public function getUpdates(): array
249249
public function addUpdate(
250250
Update $attribute,
251251
object $entity,
252-
array $propertyChangeSet = null,
253-
array $collectionChangeSet = null
252+
?array $propertyChangeSet = null,
253+
?array $collectionChangeSet = null
254254
): void {
255255
if (list($key, $update) = $this->getUpdate($entity)) {
256256
$update[2] = array_merge_recursive((array)$update[2], (array)$propertyChangeSet);

0 commit comments

Comments
 (0)