Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

ArrayStorage find() deletes entires #97

Open
cvejanovic opened this issue Apr 20, 2020 · 1 comment · May be fixed by #98
Open

ArrayStorage find() deletes entires #97

cvejanovic opened this issue Apr 20, 2020 · 1 comment · May be fixed by #98
Labels

Comments

@cvejanovic
Copy link

Looks like the find() method is a copy of the delete() method. It unsets the key rather than returning it.

https://github.com/doctrine/KeyValueStore/blob/master/lib/Doctrine/KeyValueStore/Storage/ArrayStorage.php#L124

`public function find($storageName, $key)
{
if (!isset($this->data[$storageName])) {
throw new NotFoundException();
}

    if (!isset($this->data[$storageName][serialize($key)])) {
        throw new NotFoundException();
    }

    unset($this->data[$storageName][serialize($key)]);
}`
@alcaeus
Copy link
Member

alcaeus commented Apr 22, 2020

Just an FYI that this library hasn't seen any significant development activity over the past years and is not very high on our list of priorities. That said, a PR fixing the issue is highly appreciated!

@SenseException SenseException linked a pull request May 19, 2020 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3 participants