Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6.0.2 regex change is too restrictive #807

Closed
Novynn opened this issue Jun 9, 2023 · 6 comments · Fixed by #809
Closed

6.0.2 regex change is too restrictive #807

Novynn opened this issue Jun 9, 2023 · 6 comments · Fixed by #809

Comments

@Novynn
Copy link

Novynn commented Jun 9, 2023

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 doctrine/DoctrineORMModule#734 is only relevant to the "Filesystem" storage adapter.

https://github.com/laminas/laminas-cache-storage-adapter-filesystem/blob/d78283f47a7d0fd3968c63836ee2805b53bff06f/src/FilesystemOptions.php#L27

@TomHAnderson
Copy link
Member

Can you give a full key that uses the hash?

@TomHAnderson
Copy link
Member

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?

@demiankatz
Copy link
Contributor

Good point, I'll fix it.

demiankatz added a commit to demiankatz/DoctrineModule that referenced this issue Jun 9, 2023
@demiankatz
Copy link
Contributor

demiankatz commented Jun 9, 2023

See #809. This should be a more focused fix now, and it also has test coverage. Thanks, @Novynn!

@Novynn
Copy link
Author

Novynn commented Jun 14, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants