Skip to content

Conversation

@petrdobr
Copy link

Problem this PR solves

I tried to use this library in my project (PHP 8.4) to hyphenate words. Hyphenation works fine, but when I run scripts I get a lot of messages of this type

Deprecated: PHP_Typography\Fixes\Token_Fixes\Wrap_Emails_Fix::apply(): Implicitly marking parameter $textnode as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/mundschenk-at/php-typography/src/fixes/token-fixes/class-wrap-emails-fix.php on line 90

To fix this behavior I added null ? symbol in every place I found which can cause such deprecation message, .i.e. places with null default value for arguments, like

function (?string $a = null) {}

This should help the library work without any non-relevant messages in stdOut

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant