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 deprecation warning #150

Closed
ericpugh opened this issue Jun 3, 2022 · 2 comments · Fixed by #155
Closed

PHP 8.1 deprecation warning #150

ericpugh opened this issue Jun 3, 2022 · 2 comments · Fixed by #155

Comments

@ericpugh
Copy link

ericpugh commented Jun 3, 2022

I'm receiving the following error using php-typograph 6.6.0 and PHP 8.1.2:

Deprecated function: Return type of PHP_Typography\Settings::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 include() (line 42 of /app/vendor/mundschenk-at/php-typography/src/class-settings.php).
zero2one added a commit to zero2one/php-typography that referenced this issue Sep 5, 2022
Fixed so that the code stays compatible with the composer PHP
requirements:

Added #[\ReturnTypeWillChange] comments to the methods that do not have
the proper return type set.

Better would be to release a new version of the package that supports
^7.4 || ^8.0 and that defines the proper input and output types.
@mundschenk-at
Copy link
Owner

Yeah, I need to bring the library up to current PHP versions. Will try do that soon-ish.

@mundschenk-at
Copy link
Owner

Fixed via #155.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants