You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug #1369 [LiveComponent] Fix test Kernel deprecations (smnandre)
This PR was merged into the 2.x branch.
Discussion
----------
[LiveComponent] Fix test Kernel deprecations
Fix some Kernel deprecation.
But the CS remains, because (and it's kinda weird) PhpCSFixer says
```diff
--- /home/runner/work/ux/ux/src/LiveComponent/tests/Integration/LiveComponentHydratorTest.php
+++ /home/runner/work/ux/ux/src/LiveComponent/tests/Integration/LiveComponentHydratorTest.php
@@ -752,7 +752,7 @@
return HydrationTest::create(new class() {
#[LiveProp()]
- /** `@var` \Symfony\UX\LiveComponent\Tests\Fixtures\Entity\ProductFixtureEntity[] */
+ /** `@var` ProductFixtureEntity[] */
public array $products = [];
})
->mountWith(['products' => [$prod1, $prod2, $prod3]])
```
But if we do that ....
```
1) Symfony\UX\LiveComponent\Tests\Integration\LiveComponentHydratorTest::testCanDehydrateAndHydrateComponentWithTestCases with data set "Array with objects: (de)hydrates correctly" (Closure Object (...))
LogicException: The LiveProp "products" on component "class@anonymous[...]src/LiveComponent/tests/Integration/LiveComponentHydratorTest.php:753$4c" is an array. We determined the array is full of \ProductFixtureEntity objects, but at least on key had a different value of Symfony\UX\LiveComponent\Tests\Fixtures\Entity\ProductFixtureEntity
```
Commits
-------
203f5e1 [LiveComponent] Fix test Kernel deprecations
0 commit comments