Removed laminas/laminas-stdlib dependency and added native types to Storage module - #149
Conversation
Signed-off-by: Jurj-Bogdan <jurj@dotkernel.com>
|
Speaking of refactoring, I'd guess that |
gsteel
left a comment
There was a problem hiding this comment.
I'm not convinced that it's possible for session keys to be integers, so the key type could be refined to string across the board. You can also type the interface to @extends ArrayAccess<string, mixed> etc.
It should be possible to eliminate usage of Laminas\Stdlib.
It's unfortunate that this implements ArrayAccess so we're stuck with offsetSet(mixed $key, mixed $value): void etc - ArrayAccess methods could have assertions for string keys perhaps because the doc blocks will not be inferred via SA tools AFAIK
| * | ||
| * @param array|null $input | ||
| * @param int $flags | ||
| * @param string $iteratorClass |
There was a problem hiding this comment.
@param class-string<Iterator> $iteratorClass ??
…ode updates Signed-off-by: Jurj-Bogdan <jurj@dotkernel.com>
|
Since the storage module was the main place |
gsteel
left a comment
There was a problem hiding this comment.
Thanks @Jurj-Bogdan - Pretty sure that most additions of #[AllowDynamicProps] can be removed if all implementations define __set etc.
| * This test case fails on laminas-session 2.8.0 with the php error below and works fine on 2.7.*. | ||
| * "Only variable references should be returned by reference" | ||
| */ | ||
| #[IgnoreDeprecations] |
There was a problem hiding this comment.
I assume this is because of __get and offsetGet implementations returning by ref.
Perhaps, in a different patch, return by ref should be removed across the board and all these IgnoreDeprecations attributes removed.
Signed-off-by: Jurj-Bogdan <jurj@dotkernel.com>
Signed-off-by: Jurj-Bogdan <jurj@dotkernel.com>
Signed-off-by: Jurj-Bogdan <jurj@dotkernel.com>
Signed-off-by: Jurj-Bogdan <jurj@dotkernel.com>
gsteel
left a comment
There was a problem hiding this comment.
Thanks for sticking with me @Jurj-Bogdan - We got there in the end 😅
Description
Initial commit to add native method and return types to the
src/Storagemodule, based on issue #113.This PR might also be the place to further refactor the module as needed but I'm unsure how what the end goal of that refactoring might be.