tbela99 / css

A CSS parser and minifier and sourcemap generator written in PHP
Other
14 stars 1 forks source link

Fix deprecation warnings #150

Open shish opened 10 months ago

shish commented 10 months ago

Using php 8.2 I'm getting a ton of error messages in my logs like:

Deprecated: Return type of TBela\CSS\Element::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/ArrayTrait.php on line 72

and

Deprecated: strtolower(): Passing null to parameter #1 ($string) of type
string is deprecated in [...]/src/Value.php on line 590

I'm not sure if this will break compatibility with php 8.0, I hope that the automated test suite will say if that's the case (if so, maybe the #[\ReturnTypeWillChange] approach would work?)

There are still two deprecation warnings coming from the upstream opis/closure library though...

tbela99 commented 10 months ago

thanks,

I will review the updates ASAP