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

StaticPrefixCollection error handling broken when PHP is using libpcre2-10.43 #54067

Closed
Lustmored opened this issue Feb 26, 2024 · 2 comments
Closed

Comments

@Lustmored
Copy link
Contributor

Symfony version(s) affected

7.0.3

Description

The error message for lookbehind assertion of not fixed length has changed in new libpcre2 version to:

Compilation failed: length of lookbehind assertion is not limited at offset 0

This breaks error handling in StatixPrefixCollection::handleError, which checks for:

public static function handleError(int $type, string $msg): bool
{
        return str_contains($msg, 'Compilation failed: lookbehind assertion is not fixed length');
}

Downgrading libpcre2 solves the issue.

How to reproduce

  1. Update system to libpcre2-10.43 (on Gentoo systems this gets pulled automatically)
  2. Run symfony console cache:clear on a project with declared route prefixes

Possible Solution

No response

Additional Context

No response

@nicolas-grekas
Copy link
Member

Can you please send a PR to fix this? I guess it should target branch 5.4?

@Lustmored
Copy link
Contributor Author

@nicolas-grekas I surely can and will submit a PR tomorrow 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants