Skip to content

Commit bb213fc

Browse files
committed
Renaming method for clarity
1 parent 7e7ed0d commit bb213fc

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

src/LiveComponent/src/EventListener/InterceptChildComponentRenderSubscriber.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function preComponentCreated(PreCreateForRenderEvent $event): void
7272
$deterministicId,
7373
$childFingerprints[$deterministicId],
7474
$event->getName(),
75-
$event->getProps(),
75+
$event->getInputProps(),
7676
);
7777
$event->setRenderedString($rendered);
7878
}

src/TwigComponent/src/Event/PreCreateForRenderEvent.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ final class PreCreateForRenderEvent extends Event
2424

2525
public function __construct(
2626
private string $name,
27-
private array $props = []
27+
private array $inputProps = []
2828
) {
2929
}
3030

@@ -34,11 +34,19 @@ public function getName(): string
3434
}
3535

3636
/**
37-
* @return array the array of data passed to originally create this component
37+
* @deprecated since 2.8, use getInputProps() instead.
3838
*/
3939
public function getProps(): array
4040
{
41-
return $this->props;
41+
return $this->inputProps;
42+
}
43+
44+
/**
45+
* @return array the array of "input" data passed to originally create this component
46+
*/
47+
public function getInputProps(): array
48+
{
49+
return $this->inputProps;
4250
}
4351

4452
public function setRenderedString(string $renderedString): void

0 commit comments

Comments
 (0)