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

Fix deprecation warnings #150

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix deprecation warnings #150

wants to merge 2 commits into from

Conversation

shish
Copy link

@shish shish commented Aug 18, 2023

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...

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
```
@tbela99
Copy link
Owner

tbela99 commented Aug 18, 2023

thanks,

I will review the updates ASAP

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.

2 participants