When using the library with PHP 8.1, I'm getting a deprecation error for the ArrayAccess implementations of GlobalSession:
Return type of Jasny\Session\GlobalSession::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/gbirke/src/mealplan/vendor/jasny/session-middleware/src/GlobalSession.php on line 149
Depending on how compatible you want this library to be, you could either add a mixed return type (min. PHP version 8.0) or a #[\ReturnTypeWillChange] (backwards compatible for PHP 7.x) to the methods of the ArrayAccess implementation. The MockSession is probably affected too
When using the library with PHP 8.1, I'm getting a deprecation error for the
ArrayAccessimplementations ofGlobalSession:Return type of Jasny\Session\GlobalSession::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/gbirke/src/mealplan/vendor/jasny/session-middleware/src/GlobalSession.php on line 149Depending on how compatible you want this library to be, you could either add a
mixedreturn type (min. PHP version 8.0) or a#[\ReturnTypeWillChange](backwards compatible for PHP 7.x) to the methods of theArrayAccessimplementation. TheMockSessionis probably affected too