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

Compatibility with PHP 8.1 #79

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

Conversation

BenMorel
Copy link
Contributor

Fix for a deprecation warning on PHP 8.1:

Return type of BackblazeB2\File::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

@BenMorel
Copy link
Contributor Author

BenMorel commented Oct 9, 2022

@mlambley Any chance this can be merged?

@mlambley
Copy link
Member

Fixed via #78
Please confirm it now works.

@BenMorel
Copy link
Contributor Author

This should work for PHP 8.0+, but I think you just broke compatibility with PHP 7.2 - 7.4 (the mixed return type is a new addition in PHP 8.0, while the #[ReturnTypeWillChange] is a way around the deprecation that is compatible with all versions).

It looks like your last Travis build ran 2 years ago, do you want a PR to add GitHub actions instead? This would prevent such issues.

@mlambley
Copy link
Member

Yeah that's a good point. Please resolve your conflicts and I'll merge this instead.

@BenMorel
Copy link
Contributor Author

BenMorel commented Nov 1, 2022

@mlambley Done!

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.

None yet

2 participants