Closed Novynn closed 1 year ago
Can you give a full key that uses the hash?
As @Novynn has pointed out, /^[a-z0-9_\+\-\[\]\\\\$]*$/Di
is the regex for the Filesystem cache. Because that's the case does it make sense to include a regex for each cache?
Good point, I'll fix it.
See #809. This should be a more focused fix now, and it also has test coverage. Thanks, @Novynn!
Thank you to @TomHAnderson and @demiankatz for sorting this out. Moving the filter to the filesystem has solved any concerns I had as we don't use the adapter. I'm sure using the filesystem to cache has all kinds of restrictions.
This change (#806) is breaking things. An example is: annotation methods are cached by Doctrine using a hash symbol (ie. #) which isn't included in the regex.
The initial regex that was breaking the tests in https://github.com/doctrine/DoctrineORMModule/pull/734 is only relevant to the "Filesystem" storage adapter.
https://github.com/laminas/laminas-cache-storage-adapter-filesystem/blob/d78283f47a7d0fd3968c63836ee2805b53bff06f/src/FilesystemOptions.php#L27