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

PHP 8.3 highlight_file/highlight_string output changes #8313

Closed
PhilETaylor opened this issue Nov 16, 2023 · 1 comment
Closed

PHP 8.3 highlight_file/highlight_string output changes #8313

PhilETaylor opened this issue Nov 16, 2023 · 1 comment
Labels

Comments

@PhilETaylor
Copy link

PhilETaylor commented Nov 16, 2023

Feature Request

Provide a migration rector for highlight_file/highlight_string for PHP 8.3 (and for UP_TO_PHP_83 LevelSetList etc)

PHP 8.3 makes several changes to how the highlighter process white-spaces, and now wraps the output with a <pre></pre> HTML tag. Further, it no longer converts new-line characters to HTML
tags, resulting in a multi-line highlighted HTML output.

Full details and diff examples at:
https://php.watch/versions/8.3/highlight_file-highlight_string-html-changes

This has already effected the Symfony project here (as an example, already fixed) symfony/symfony#51586

@PhilETaylor
Copy link
Author

PhilETaylor commented Nov 16, 2023

Ignore me - Im being dumb today haha... The signature of the function is the same, its the output that is different haha

Im such a dumb idiot since I switched to Tea from Coffee....

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

No branches or pull requests

1 participant