Compatibility with PHP 8.1
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
@mlambley Any chance this can be merged?
Fixed via https://github.com/gliterd/backblaze-b2/pull/78 Please confirm it now works.
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.
Yeah that's a good point. Please resolve your conflicts and I'll merge this instead.
@mlambley Done!