markstory / mini-asset

A simple set of asset build tools that provides a config file and extensible integrations with pre-processors & minifiers.
MIT License
64 stars 17 forks source link

Fix PHP8 deprecations #67

Closed jaykay-design closed 2 years ago

jaykay-design commented 2 years ago

Added the return types for the Iterator overrides

dereuromark commented 2 years ago

I have similar errors now on my end:

PHP Deprecated:  Return type of MiniAsset\AssetCollection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vendor/markstory/mini-asset/src/AssetCollection.php on line 142
PHP Deprecated:  Return type of MiniAsset\AssetCollection::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vendor/markstory/mini-asset/src/AssetCollection.php on line 167
PHP Deprecated:  Return type of MiniAsset\AssetCollection::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vendor/markstory/mini-asset/src/AssetCollection.php on line 152
PHP Deprecated:  Return type of MiniAsset\AssetCollection::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vendor/markstory/mini-asset/src/AssetCollection.php on line 157
PHP Deprecated:  Return type of MiniAsset\AssetCollection::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vendor/markstory/mini-asset/src/AssetCollection.php on line 162
PHP Deprecated:  Return type of MiniAsset\AssetCollection::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vendor/markstory/mini-asset/src/AssetCollection.php on line 147
dereuromark commented 2 years ago

Is there any plan on releasing this? We face this now also in our default env (local dev is now 8.1)