scrivo / highlight.php

A port of highlight.js by Ivan Sagalaev to PHP
BSD 3-Clause "New" or "Revised" License
695 stars 45 forks source link

PHP 8.1 deprecation messages #95

Closed SharkMachine closed 2 years ago

SharkMachine commented 2 years ago
PHP Deprecated:  Return type of Highlight\RegExMatch::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in src/Highlight/RegExMatch.php on line 70
PHP Deprecated:  Return type of Highlight\RegExMatch::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in src/Highlight/RegExMatch.php on line 78
PHP Deprecated:  Return type of Highlight\RegExMatch::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in src/Highlight/RegExMatch.php on line 86
PHP Deprecated:  Return type of Highlight\RegExMatch::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in src/Highlight/RegExMatch.php on line 94
PHP Deprecated:  Return type of Highlight\RegExMatch::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in src/Highlight/RegExMatch.php on line 104
PHP Deprecated:  Return type of Highlight\RegExMatch::getIterator
SharkMachine commented 2 years ago

Ah, this has been fixed already in https://github.com/scrivo/highlight.php/commit/1791d2d1a33d8b73d998770c4f1855a6f3f4a32b

allejo commented 2 years ago

Oops, my bad! I've tagged v9.18.1.9 with this patch included.