Skip to content

[Form] Change FormTypeValidatorExtension construct signature #49502

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 4 commits into
base: 7.4
Choose a base branch
from

Conversation

alamirault
Copy link
Contributor

Q A
Branch? 6.3
Bug fix? no
New feature? no
Deprecations? yes
Tickets Fix #...
License MIT
Doc PR symfony/symfony-docs#...

$legacyErrorMessages is required in FormTypeValidatorExtension construct but it is not used anymore in class. This PR deprecate passing this argument.

@alamirault alamirault force-pushed the feature/change-form-type-validator-extension-signature branch from c74bc36 to 43f04bb Compare February 22, 2023 21:13
@carsonbot carsonbot changed the title Change FormTypeValidatorExtension construct signature [Form] Change FormTypeValidatorExtension construct signature Feb 22, 2023
@alamirault alamirault force-pushed the feature/change-form-type-validator-extension-signature branch from 2c616dd to a9e9b85 Compare February 23, 2023 20:48
@alamirault alamirault requested review from nicolas-grekas and removed request for xabbuh and yceruto February 23, 2023 20:48
alamirault and others added 2 commits March 5, 2023 11:29
Co-authored-by: Christian Flothmann <christian.flothmann@gmail.com>
@alamirault
Copy link
Contributor Author

Thanks @xabbuh and @HypeMC for the review.

I added TypeError when args types are not ok

@alamirault alamirault requested review from HypeMC and xabbuh and removed request for nicolas-grekas and HypeMC March 5, 2023 10:50
/**
* @group legacy
*/
public function testLegacyWithBadFormRendererType()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the legacy signature, but the new one though, as you don't pass the boolean.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. But when type hint will be set in 7.0. Args checking will be drop and tests must also be dropped.

I can keep @group legacy and only remove legacy in function name ?

@nicolas-grekas nicolas-grekas removed this from the 6.3 milestone May 23, 2023
@nicolas-grekas nicolas-grekas added this to the 6.4 milestone May 23, 2023
@nicolas-grekas nicolas-grekas modified the milestones: 6.4, 7.1 Nov 15, 2023
@xabbuh xabbuh modified the milestones: 7.1, 7.2 May 15, 2024
@fabpot fabpot modified the milestones: 7.2, 7.3 Nov 20, 2024
@fabpot fabpot modified the milestones: 7.3, 7.4 May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants