Skip to content

Conversation

derrabus
Copy link
Member

@derrabus derrabus commented Jun 5, 2021

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Part of #41552
License MIT
Doc PR N/A

On 4.4, TokenInterface extends Serializable but does not enforce implementations to implement __serialize() as well. When creating a mock from this interface, PHPUnit will emit code that triggers a deprecation warning on PHP 8.1.

This PR introduces stricter versions of TokenInterface to work around that problem.

My goal was to keep the diff small and mergable. We can probably drop most of the changes when merging to 5.2 because the two methods have been added there.

@nicolas-grekas
Copy link
Member

Thank you @derrabus.

@nicolas-grekas nicolas-grekas merged commit ec80d3c into symfony:4.4 Jun 6, 2021
@derrabus derrabus deleted the bugfix/serializable branch June 6, 2021 09:03
@derrabus
Copy link
Member Author

derrabus commented Jun 6, 2021

FYI: I've reverted the patch while merging up to 5.2.

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.

3 participants