Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Test support for libpcre2 10.47 #20397

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

Open
orlitzky wants to merge 1 commit into php:PHP-8.3
base: PHP-8.3
Choose a base branch
Loading
from orlitzky:test-support-for-libpcre2-10.47

Conversation

@orlitzky
Copy link
Contributor

@orlitzky orlitzky commented Nov 5, 2025
edited
Loading

In the latest version of libpcre2, the offsets appearing in some "compilation failed" warnings have increased by one due to PCRE2Project/pcre2#756. This is causing spurious test failures, so in this commit we replace the hard-coded offsets by %d to match any integer.

An example failure:

---- EXPECTED OUTPUT
Warning: preg_grep(): Compilation failed: quantifier does not follow a repeatable item at offset 0 in %sgrep2.php on line %d
...
---- ACTUAL OUTPUT
Warning: preg_grep(): Compilation failed: quantifier does not follow a repeatable item at offset 1 in /var/tmp/portage/dev-lang/php-8.4.13/work/php-8.4.13/ext/pcre/tests/grep2.php on line 3

This was originally reported as https://bugs.gentoo.org/965018

Copy link
Contributor Author

orlitzky commented Nov 5, 2025

(Sorry, I forgot to rebase on 8.3 before opening the PR and confused the hell out of the label/review bot.)

Copy link
Member

@iluuu1994 iluuu1994 left a comment

Choose a reason for hiding this comment

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

Assuming the change in libpcre2 is intentional.

?>
--EXPECTF--
Warning: preg_grep(): Compilation failed: quantifier does not follow a repeatable item at offset 0 in %sgrep2.php on line %d
Warning: preg_grep(): Compilation failed: quantifier does not follow a repeatable item at offset %d in %sgrep2.php on line %d
Copy link
Member

@iluuu1994 iluuu1994 Nov 5, 2025

Choose a reason for hiding this comment

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

Maybe use %r(0|1)%r instead?

mvorisek reacted with thumbs up emoji
Copy link
Contributor Author

@orlitzky orlitzky Nov 5, 2025

Choose a reason for hiding this comment

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

Because I forgot about %r :)

Done!

Copy link
Contributor Author

orlitzky commented Nov 5, 2025

It was intentional, I went digging: PCRE2Project/pcre2#756

iluuu1994 reacted with thumbs up emoji

@orlitzky orlitzky force-pushed the test-support-for-libpcre2-10.47 branch from cfd8972 to 245b796 Compare November 5, 2025 19:15
In the latest version of libpcre2, the offsets appearing in some
"compilation failed" warnings have increased by one, as a result of
 PCRE2Project/pcre2#756
This is causing spurious test failures, so in this commit we replace
the hard-coded offsets by a regex that matches both values.
Gentoo-bug: https://bugs.gentoo.org/965018 
@orlitzky orlitzky force-pushed the test-support-for-libpcre2-10.47 branch from 245b796 to 5f61eeb Compare November 5, 2025 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@iluuu1994 iluuu1994 iluuu1994 left review comments

@dstogov dstogov Awaiting requested review from dstogov

@TimWolla TimWolla Awaiting requested review from TimWolla

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /