-
-
Notifications
You must be signed in to change notification settings - Fork 364
[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
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
2e5126f
to
0b25cab
Compare
PropertyTypeExtractorInterface::getTypes()
deprecation, use TypeInfo Type
PropertyTypeExtractorInterface::getTypes()
deprecation, use TypeInfo ^7.2 Type
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! |
I've just pushed a new commit for documentation, about upgrading EDIT: reverted, in fact it does not makes sense (the deprecation will be removed simply by upgrading the LiveComponent package). |
After discussing with @mtarld, we've just increased
|
🙇 Not enough time to make a deep review, but a huge thanks to you guys. 👏 |
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.
❤️
…recation, use TypeInfo ^7.2 `Type`
e560fa5
to
7a08cce
Compare
Thanks Mathias. 🙌🏻 |
This PR was merged into the 2.x branch. Discussion ---------- [LiveComponent] Fix conflict with `symfony/type-info` | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Docs? | no <!-- required for new features --> | Issues | Fix #2827 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT <!-- Replace this notice by a description of your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - For new features, provide some code snippets to help understand usage. - Features and deprecations must be submitted against branch main. - Update/add documentation as required (we can help!) - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (see https://symfony.com/bc). --> My bad, this conflict was supposed to be configured in #2607, but IDK where the commit went 🤷🏻 Commits ------- 0bb6d9f [LiveComponent] Fix conflict with `symfony/type-info`
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.