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.1: Deprecated function: Return type of FacetapiFacet::offsetExists($offset) should either be compatible with ArrayAccess #14

Closed
argiepiano opened this issue Mar 13, 2023 · 4 comments · Fixed by #18

Comments

@argiepiano
Copy link
Contributor

When running this module on PHP 8.1, I'm getting:

Deprecated function: Return type of FacetapiFacet::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 require_once() (line 1131 of... Sites/localhost/panettone/modules/facetapi/plugins/adapter.inc).

This is similar to several other places in core and contrib where we've had to add #[\ReturnTypeWillChange] right above the offending methods.

@herbdool
Copy link
Contributor

@argiepiano feel like making a PR? I can test it and we can merge it later as part of Bug Squad.

@argiepiano
Copy link
Contributor Author

Done! PR #18

@herbdool
Copy link
Contributor

LGTM

@argiepiano
Copy link
Contributor Author

I'll merge this, since it was LGTM back in August.

argiepiano added a commit that referenced this issue Nov 29, 2023
Issue #14. Add   #[\ReturnTypeWillChange] to methods that extend ArrayAccess
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 a pull request may close this issue.

2 participants