Skip to content
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

WP/I18n: allow for new PHP 8.0+ [s]printf() placeholders #2233

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Apr 21, 2023

PHP 8.0 silently (not mentioned in migration guide, changelog etc - I only discovered it by accident via a small note in the manual) introduced two new placeholder characters for the *printf() range of functions.

This commit updates the regexes used in the WordPress.WP.I18n sniff to allow them to recognize those characters as placeholders which should be examined.

Includes unit tests.

Ref: https://www.php.net/manual/en/function.sprintf.php

PHP 8.0 silently (not mentioned in migration guide, changelog etc - I only discovered it by accident via a small note in the manual) introduced two new placeholder characters for the `*printf()` range of functions.

This commit updates the regexes used in the `WordPress.WP.I18n` sniff to allow them to recognize those characters as placeholders which should be examined.

Includes unit tests.

Ref: https://www.php.net/manual/en/function.sprintf.php
Copy link
Member

@GaryJones GaryJones left a comment

Choose a reason for hiding this comment

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

@GaryJones GaryJones merged commit 119cc0c into develop Apr 24, 2023
@GaryJones GaryJones deleted the feature/wp-i18n-adjust-sprintf-regexes-for-new-php-80-modifiers branch April 24, 2023 13:11
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.

None yet

3 participants