-
-
Notifications
You must be signed in to change notification settings - Fork 358
[LiveComponent] Fix PropertyTypeExtractorInterface::getTypes()
deprecation, use TypeInfo ^7.2 Type
#2607
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
base: 2.x
Are you sure you want to change the base?
Conversation
87a72aa
to
d3edb38
Compare
Actually, didn't notice that PHP 8.1 is still supported by Symfony UX. |
8777e0e
to
81650fd
Compare
Anyway, I think we must wait for the bump of PHP in |
Added milestone 3.x |
This PR was merged into the 7.3 branch. Discussion ---------- [PropertyInfo] Deprecate `Type` | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | no | New feature? | no | Deprecations? | yes | Issues | | License | MIT A new attempt to #53160, now that `symfony/type-info` is not experimental anymore. Deprecates: - `Type` class in favor of the `Type` class of `symfony/type-info` - `PropertyTypeExtractorInterface::getTypes()` in favor of the `PropertyTypeExtractorInterface::getType()` method - `ConstructorArgumentTypeExtractorInterface::getTypesFromConstructor()` in favor of the `ConstructorArgumentTypeExtractorInterface::getTypeFromConstructor()` method The work for upgrading dependent packages has begun already: - api-platform/core#6979 - symfony/ux#2607 Commits ------- 4d2ccf4 Fix md formatting f819aed [PropertyInfo] Deprecate Type
This PR was merged into the 7.3 branch. Discussion ---------- [PropertyInfo] Deprecate `Type` | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | no | New feature? | no | Deprecations? | yes | Issues | | License | MIT A new attempt to symfony/symfony#53160, now that `symfony/type-info` is not experimental anymore. Deprecates: - `Type` class in favor of the `Type` class of `symfony/type-info` - `PropertyTypeExtractorInterface::getTypes()` in favor of the `PropertyTypeExtractorInterface::getType()` method - `ConstructorArgumentTypeExtractorInterface::getTypesFromConstructor()` in favor of the `ConstructorArgumentTypeExtractorInterface::getTypeFromConstructor()` method The work for upgrading dependent packages has begun already: - api-platform/core#6979 - symfony/ux#2607 Commits ------- 4d2ccf4ac94 Fix md formatting f819aed8d13 [PropertyInfo] Deprecate Type
src/LiveComponent/src/DependencyInjection/LiveComponentExtension.php
Outdated
Show resolved
Hide resolved
@mtarld Sorry to bring this up again, but are we sure it's not possible at all to ship this PR for 2.x? |
The UX LiveComponent is requiring a too low PHP version (lower than TypeInfo), which means that a As discussed with @Kocal , the solution for 2.x will be:
Then for 3.x:
I'll update the PR in that way ASAP 🙂 |
I'd like to keep the CI testing the actual behaviour users would have with 8.1 🤷 @mtarld poke me if you want some hand there :) |
It won't change for 8.1, since symfony/type-info is not installable, but it will change for higher jobs |
81650fd
to
69cdc81
Compare
Status: Needs Work |
69cdc81
to
3ce901a
Compare
d9f68c9
to
a615100
Compare
2e5126f
to
0b25cab
Compare
PropertyTypeExtractorInterface::getTypes()
deprecation, use TypeInfo Type
PropertyTypeExtractorInterface::getTypes()
deprecation, use TypeInfo ^7.2 Type
…ly available in TypeInfo 7.3)
0b25cab
to
b12ee10
Compare
I rebased the PR but didn't squash my commits (if it can ease reviews), CI is full green (we can ignore fabbot). After reviews, we can merge this PR for UX 2.x instead of 3.x, since the initial PR changed from "only use TypeInfo" to "use TypeInfo when possible" 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow so nice! |
Fix the
PropertyTypeExtractorInterface::getTypes()
deprecation and usePropertyTypeExtractorInterface::getType()
(based on TypeInfoType
) instead.This PR allows TypeInfo ^7.2 to be used, thanks to the compatibility layers added for
Type::accepts()
andType::traverse()
(added in 7.3). In order to reduce frictions when users will upgrade their apps dependencies.The CI changed a bit too:
symfony/property-info:7.1.* symfony/type-info:7.2.*
symfony/property-info:7.2.* symfony/type-info:7.2.*
symfony/property-info:7.3.* symfony/type-info:7.3.*
symfony/property-info:>=7.3 symfony/type-info:>=7.3
Allowing us to covers a maximum versions of PropertyInfo and TypeInfo.