Skip to content

[VarExporter] Fix test on PHP 8.1 #41627

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

Merged
merged 1 commit into from
Jun 9, 2021

Conversation

derrabus
Copy link
Member

@derrabus derrabus commented Jun 8, 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 PHP 8.1, when dumping the properties of an object (either through serialization, var_dump or an array cast), those properties might appear in a different order than on PHP 8.0 and earlier.

Because of that, the test I'm fixing here fails. Since the order of the properties is not really important, I'm sorting the dumped array by key in order to get a stable order.

Signed-off-by: Alexander M. Turek <me@derrabus.de>
@nicolas-grekas
Copy link
Member

Thank you @derrabus.

@nicolas-grekas nicolas-grekas merged commit 12f3e37 into symfony:4.4 Jun 9, 2021
@derrabus derrabus deleted the bugfix/var-exporter-test branch June 9, 2021 10:48
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