Skip to content

Fix deprecations on PHP 8.2 #45532

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
Mar 2, 2022
Merged

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets On the road to #44282
License MIT
Doc PR -

@nicolas-grekas nicolas-grekas changed the title Fix some deprecations on PHP 8.2 Fix deprecations on PHP 8.2 Feb 25, 2022
@nicolas-grekas
Copy link
Member Author

Code is now 100% deprecation-free on PHP 8.2.
Changes on VarExporter are required to work around php/php-src#8152

new \DatePeriod('R4/2012-07-01T00:00:00Z/P7D'),
]];

$value = \PHP_VERSION_ID >= 70406 ? new ArrayObject() : new \ArrayObject();
Copy link
Member

Choose a reason for hiding this comment

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

I'm curious, what's the reason for this version check?

Copy link
Member Author

Choose a reason for hiding this comment

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

PHP 8.2 needs the attribute for this test but I also want to keep a test that creates a native ArrayObject.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I see. That version number 7.4.6 seemed so oddly specific that I though I had missed something in PHP's ChangeLog. 😅

@nicolas-grekas nicolas-grekas mentioned this pull request Feb 26, 2022
29 tasks
@nicolas-grekas nicolas-grekas merged commit d4150be into symfony:4.4 Mar 2, 2022
@nicolas-grekas nicolas-grekas deleted the php82 branch March 3, 2022 09:51
This was referenced Mar 5, 2022
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