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 PHP 8.1 compatibility #333

Merged
merged 3 commits into from
Jan 30, 2022
Merged

Fix PHP 8.1 compatibility #333

merged 3 commits into from
Jan 30, 2022

Conversation

jtojnar
Copy link
Contributor

@jtojnar jtojnar commented Jan 6, 2022

Cleaned up #332 and added some more fixes

Björn Lindh and others added 3 commits January 6, 2022 14:33
On PHP 8.1 program would crash with the following message:

    Fatal error: $GLOBALS can only be modified using the $GLOBALS[$name] = $value syntax

https://wiki.php.net/rfc/restrict_globals_usage
PHP 8.1 expects proper variance of child class methods,
otherwise it will print the following notice:

Return type of Base::offsetunset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void,...,

https://php.watch/versions/8.1/internal-method-return-types
PHP 8.1 deprecated implicit conversions of float to int and passing null to non-nullable parameters:

https://php.watch/versions/8.1/deprecate-implicit-conversion-incompatible-float-string
https://php.watch/versions/8.1/internal-func-non-nullable-null-deprecation

Co-authored-by: Jan Tojnar <jtojnar@gmail.com>
@ikkez
Copy link
Member

ikkez commented Jan 6, 2022

I'll have a look at this soon.

@jtojnar
Copy link
Contributor Author

jtojnar commented Jan 17, 2022

Any luck @ikkez?

@ikkez
Copy link
Member

ikkez commented Jan 30, 2022

almost done.

@ikkez ikkez merged commit 7825371 into f3-factory:master Jan 30, 2022
@jtojnar jtojnar deleted the php81 branch January 30, 2022 16:23
@ikkez
Copy link
Member

ikkez commented Jan 30, 2022

should be good to go now. I've build a new dev bench for all unit tests and testings across multiple php version https://github.com/f3-factory/fatfree-dev

I'll tag a new release soon.

@maietta
Copy link
Contributor

maietta commented Jan 31, 2022

Been waiting a while on this one! Thank you all so much!

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.

3 participants