Skip to content

Homogenize PHP-CS-Fixer configuration with symfony/symfony, and run it #2768

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 2.x
Choose a base branch
from

Conversation

Kocal
Copy link
Member

@Kocal Kocal commented May 23, 2025

Q A
Bug fix? no
New feature? no
Docs? no
Issues Fix #...
License MIT

@carsonbot carsonbot added the Status: Needs Review Needs to be reviewed label May 23, 2025
@Kocal
Copy link
Member Author

Kocal commented May 23, 2025

Interesting, because PHP-CS-Fixer changed:

namespace Symfony\UX\LiveComponent\Tests\Integration;

use Symfony\UX\LiveComponent\Tests\Fixtures\Dto\Address;

// ...

/**
 * @var \Symfony\UX\LiveComponent\Tests\Fixtures\Dto\Address[]
 */
#[LiveProp(writable: true, useSerializerForHydration: true)]

for:

namespace Symfony\UX\LiveComponent\Tests\Integration;

use Symfony\UX\LiveComponent\Tests\Fixtures\Dto\Address;

// ...

/**
 * @var Address[]
 */
#[LiveProp(writable: true, useSerializerForHydration: true)]

The following error now happens:

1) Symfony\UX\LiveComponent\Tests\Integration\LiveComponentHydratorTest::testCanDehydrateAndHydrateComponentWithTestCases with data set "Array with DTOs: fully writable allows anything to change" (Closure Object (...))
Symfony\Component\Serializer\Exception\NotNormalizableValueException: Could not denormalize object of type "\Address[]", no supporting normalizer found.

/home/runner/work/ux/ux/src/LiveComponent/vendor/symfony/serializer/Serializer.php:222
/home/runner/work/ux/ux/src/LiveComponent/src/LiveComponentHydrator.php:292
/home/runner/work/ux/ux/src/LiveComponent/src/LiveComponentHydrator.php:169
/home/runner/work/ux/ux/src/LiveComponent/tests/Integration/LiveComponentHydratorTest.php:128
/home/runner/work/ux/ux/src/LiveComponent/tests/Integration/LiveComponentHydratorTest.php:157

That's weird, I would expect Address from the PHPDoc to be resolved to \Symfony\UX\LiveComponent\Tests\Fixtures\Dto\Address. Maybe that's because of the anonymous class?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Review Needs to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants