Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Validator] Return types change on ExecutionContextInterface break BC #50526

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

Closed
upchuk opened this issue Jun 1, 2023 · 7 comments
Closed

[Validator] Return types change on ExecutionContextInterface break BC #50526

upchuk opened this issue Jun 1, 2023 · 7 comments

Comments

@upchuk
Copy link
Contributor

upchuk commented Jun 1, 2023

Symfony version(s) affected

6.3.0

Description

Hello,

I noticed that in 6.3.0 version of the Validator, the ExecutionContextInterface got it's public method signatures updated to add a return type: symfony/validator@c2801bc.

This breaks any implementation of the ExecutionContextInterface. AFAIK, minors should not make changes to public APIs no?

Thanks!

How to reproduce

No real steps.

Possible Solution

No response

Additional Context

No response

@nicolas-grekas
Copy link
Member

Can you please send a PR to turn them into @return void annotations?

@wouterj
Copy link
Member

wouterj commented Jun 1, 2023

We only added PHP return types to the @internal methods. This is expected, as per BC promise:

Experimental Features and code marked with the @internal tags are excluded from our Backward Compatibility promise.

@wouterj wouterj closed this as completed Jun 1, 2023
@wouterj wouterj closed this as not planned Won't fix, can't repro, duplicate, stale Jun 1, 2023
upchuk added a commit to upchuk/symfony that referenced this issue Jun 1, 2023
@wouterj
Copy link
Member

wouterj commented Jun 2, 2023

Hi @upchuk. After a quick internal discussion, we've concluded that it was wrong to mark these methods as internal (as the interface is not internal). I've submitted a PR to remove the internal annotation: #50539

I see you started creating a PR for the return type already, can you finish that so we can give you credits for finding and reporting this issue? :)

@wouterj wouterj reopened this Jun 2, 2023
@upchuk
Copy link
Contributor Author

upchuk commented Jun 2, 2023

@wouterj Sure, opened #50540. Wasnt sure which branch to open against, I did it against 6.3

xabbuh pushed a commit to upchuk/symfony that referenced this issue Jun 5, 2023
xabbuh pushed a commit to upchuk/symfony that referenced this issue Jun 5, 2023
nicolas-grekas added a commit that referenced this issue Jun 5, 2023
…void return types in favor of docblock annotations. (upchuk)

This PR was merged into the 6.3 branch.

Discussion
----------

[Validator] GH-50526: Reverting ExecutionContextInterface void return types in favor of docblock annotations.

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #50526
| License       | MIT
| Doc PR        |

Commits
-------

7c7b0b2 GH-50526: Reverting ExecutionContextInterface void return types in favor of docblock annotations.
nicolas-grekas added a commit that referenced this issue Jun 5, 2023
* 6.3:
  [PhpUnitBridge] Ignore deprecations about the annotation mapping driver when it's not possible to move to the attribute driver yet
  [SecurityBundle] Mark SignatureAlgorithmFactory as internal
  remove unusable cache pools
  GH-50526: Reverting ExecutionContextInterface void return types in favor of docblock annotations.
nicolas-grekas added a commit that referenced this issue Jun 5, 2023
* 6.4:
  [PhpUnitBridge] Ignore deprecations about the annotation mapping driver when it's not possible to move to the attribute driver yet
  [SecurityBundle] Mark SignatureAlgorithmFactory as internal
  remove unusable cache pools
  GH-50526: Reverting ExecutionContextInterface void return types in favor of docblock annotations.
@upchuk
Copy link
Contributor Author

upchuk commented Jun 6, 2023

@nicolas-grekas @stof Thanks for this. Do you plan on making a patch release to 6.3.0 to include this change? As it stands, we some problems in Drupal which implements this interface. Thanks!

@wouterj
Copy link
Member

wouterj commented Jun 6, 2023

Yes, there will for sure be a 6.3.1 :)

Normally, we release patch releases once a month. After a new minor release, we sometimes release 6.3.1 a bit quicker, but we also want to gather as much bug fixes for the .1 release as possible. Given there are no big bugs in 6.3.0, I think you can expect a 6.3.1 release in 1 to 3 weeks.

@upchuk
Copy link
Contributor Author

upchuk commented Jun 6, 2023

@wouterj ok, cool, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants