matteosister / GitElephant

An abstraction layer for git written in PHP
GNU Lesser General Public License v3.0
613 stars 74 forks source link

PHP 8.1 compatibility fix for deprecated return #183

Closed olstjos closed 2 years ago

olstjos commented 2 years ago

Hello, I just upgraded to php 8.1 and I'm getting a deprecated notice. I'm using the git_status module for Drupal 9

this module requires cypresslab/gitelephant.

I didn't see any available updates or existing open issues fixing this.


Error message

    Deprecated function: Return type of GitElephant\Objects\Log::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 33 of /www/vendor/cypresslab/gitelephant/src/GitElephant/Objects/Log.php).

see pull request to follow