Hi,
We are using sage custom theme in our WP project.
Recently i have updated WordPress to the latest version and PHP from 7.4 to 8.2.
After the update, i am seeing lots of error in my theme/vendor/ folder files.
Some of the errors are:
[11-Jan-2024 11:11:35 UTC] PHP Deprecated: Return type of Illuminate\Support\Collection::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /code/wp-content/themes/theme-name/vendor/illuminate/support/Collection.php on line 1789
[11-Jan-2024 11:11:35 UTC] PHP Deprecated: Return type of Illuminate\Support\Collection::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /code/wp-content/themes/theme-name/vendor/illuminate/support/Collection.php on line 1800
[11-Jan-2024 11:11:35 UTC] PHP Deprecated: Return type of Illuminate\Support\Collection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /code/wp-content/themes/theme-name/vendor/illuminate/support/Collection.php on line 1768
[11-Jan-2024 11:11:35 UTC] PHP Deprecated: Return type of Illuminate\Support\Collection::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /code/wp-content/themes/theme-name/vendor/illuminate/support/Collection.php on line 1747
[11-Jan-2024 11:11:35 UTC] PHP Deprecated: Return type of Illuminate\Support\Collection::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /code/wp-content/themes/theme-name/vendor/illuminate/support/Collection.php on line 1716
Here is screenshot of composer.json file -Screenshot by Lightshot
Should i need to update composer file with PHP 8.2 version or update theme ?
How to update ? Please provide a solution…
Thanks.