diff --git a/src/LiveComponent/tests/Integration/LiveComponentHydratorTest.php b/src/LiveComponent/tests/Integration/LiveComponentHydratorTest.php index 66ea8cd24d6..004a6dff6a1 100644 --- a/src/LiveComponent/tests/Integration/LiveComponentHydratorTest.php +++ b/src/LiveComponent/tests/Integration/LiveComponentHydratorTest.php @@ -1875,6 +1875,7 @@ public function getTest(LiveComponentMetadataFactory $metadataFactory): Hydratio new ComponentMetadata([ 'key' => '__testing', 'mount' => $reflectionClass->hasMethod('mount') ? ['mount'] : [], + 'service_id' => '__testing_id', ]), $metadataFactory->createPropMetadatas($reflectionClass), ), diff --git a/src/TwigComponent/src/ComponentFactory.php b/src/TwigComponent/src/ComponentFactory.php index 6a2b5e963d2..664fb5b55f3 100644 --- a/src/TwigComponent/src/ComponentFactory.php +++ b/src/TwigComponent/src/ComponentFactory.php @@ -92,7 +92,7 @@ public function mountFromObject(object $component, array $data, ComponentMetadat $this->mount($component, $data, $componentMetadata); - if (true || !$componentMetadata->isAnonymous()) { + if (!$componentMetadata->isAnonymous()) { // set data that wasn't set in mount on the component directly foreach ($data as $property => $value) { if ($this->propertyAccessor->isWritable($component, $property)) {