Skip to content
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

[LiveComponent] Transition to TypeInfo (fix 7.1 deprecations) #1708

Open
smnandre opened this issue Apr 9, 2024 · 3 comments
Open

[LiveComponent] Transition to TypeInfo (fix 7.1 deprecations) #1708

smnandre opened this issue Apr 9, 2024 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@smnandre
Copy link
Collaborator

smnandre commented Apr 9, 2024

LiveComponent CI has failures on PHP 8.3 / high dependency

Symfony 7.1 introduces a new TypeInfo component that will partially replace PropertyInfo, and triggers a lot of deprecations.

We use this in two places : LivePropMetadata(/Factory) and in the Hydrate/Dehydate methods

Original PR: symfony/symfony#52510
Documentation (wip): symfony/symfony-docs#19554

That means that we must find a way to handle both for a time, so any good idea very welcome :)

CI Fail examples here: https://github.com/symfony/ux/actions/runs/8613628361/job/23605334525#step:7:122

Remaining direct deprecation notices (2793)

  705x: Since symfony/property-info 7.1: The "Symfony\Component\PropertyInfo\PropertyInfoExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\PropertyInfoExtractor::getType()" instead.
    126x in LiveComponentHydratorTest::testCanDehydrateAndHydrateComponentWithTestCases from Symfony\UX\LiveComponent\Tests\Integration
    110x in QueryStringPropsExtractorTest::testExtract from Symfony\UX\LiveComponent\Tests\Functional\Util
    102x in LiveComponentHydratorTest::testCoerceFalseyValuesForScalarTypes from Symfony\UX\LiveComponent\Tests\Integration
    30x in LiveComponentHydratorTest::testCoerceTruthyValuesForScalarTypes from Symfony\UX\LiveComponent\Tests\Integration
    20x in ComponentWithFormTest::testHandleCheckboxChanges from Symfony\UX\LiveComponent\Tests\Functional\Form
    ...

  705x: Since symfony/property-info 7.1: The "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getType()" instead.
    126x in LiveComponentHydratorTest::testCanDehydrateAndHydrateComponentWithTestCases from Symfony\UX\LiveComponent\Tests\Integration
    110x in QueryStringPropsExtractorTest::testExtract from Symfony\UX\LiveComponent\Tests\Functional\Util
    102x in LiveComponentHydratorTest::testCoerceFalseyValuesForScalarTypes from Symfony\UX\LiveComponent\Tests\Integration
    30x in LiveComponentHydratorTest::testCoerceTruthyValuesForScalarTypes from Symfony\UX\LiveComponent\Tests\Integration
    20x in ComponentWithFormTest::testHandleCheckboxChanges from Symfony\UX\LiveComponent\Tests\Functional\Form
    ...

  691x: Since symfony/property-info 7.1: The "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getType()" instead.
    112x in LiveComponentHydratorTest::testCanDehydrateAndHydrateComponentWithTestCases from Symfony\UX\LiveComponent\Tests\Integration
    110x in QueryStringPropsExtractorTest::testExtract from Symfony\UX\LiveComponent\Tests\Functional\Util
    102x in LiveComponentHydratorTest::testCoerceFalseyValuesForScalarTypes from Symfony\UX\LiveComponent\Tests\Integration
    30x in LiveComponentHydratorTest::testCoerceTruthyValuesForScalarTypes from Symfony\UX\LiveComponent\Tests\Integration
    20x in ComponentWithFormTest::testHandleCheckboxChanges from Symfony\UX\LiveComponent\Tests\Functional\Form
    ...

If anyone has some time / motivation to look at this ❤️ ?

@smnandre smnandre added the help wanted Extra attention is needed label Apr 17, 2024
@derrabus
Copy link
Member

#1862

@derrabus
Copy link
Member

The deprecation has been taken back in symfony/symfony#54789. I suggest that we stick to the old type system as long as PHP 8.1 is still supported and we cannot require the new TypeInfo component. Otherwise, we need to introduce complex code to support both type systems as seen in my attempt in #1862.

@smnandre
Copy link
Collaborator Author

Thank you for this @derrabus :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants