RicLeP / laravel-storyblok

Make Laravel and Storyblok work together beautifully.
https://ls.sirric.co.uk/
MIT License
58 stars 15 forks source link

fix: php 8.1 deprecation notices #25

Closed chaseconey closed 2 years ago

chaseconey commented 2 years ago

Overview

This PR should make the necessary minor changes to allow PHP 8.1. Without adding these return types, the package will throw Deprecation notices.

For full changelog, check out the notes here.

Context

Here is an example error that is being thrown when using PHP 8.1:

Return type of Riclep\Storyblok\Block::getIterator() should either be compatible with IteratorAggregate::getIterator(): 
Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
chaseconey commented 2 years ago

@RicLeP let me know if you have any concerns with this one.