Closed demiankatz closed 1 year ago
I see there are some style issues that need addressing; I have to run for a few minutes, but I'll fix them as soon as I get back!
Okay, style issues fixed -- this should be ready for review, if @greg0ire or @TomHAnderson has a moment.
Thanks, @TomHAnderson! I don't expect to need to do any more work here in the immediate future, so if you don't mind releasing 6.0.2, that would be fantastic. :-)
This change is breaking things. An example is: annotation methods are cached by Doctrine using a hash symbol (ie. #) which isn't included in the regex.
Feel free to open a new PR to further open up the regex. I'm not familiar enough with doctrine to know all the possibilities, but it was even more broken before my changes. I'd appreciate any help you can offer to fix it the rest of the way!
Reconfiguring the caching is a big change, hence the major release. If you can improve the regex or give examples of the problem you're seeing it would be most helpful.
It would probably be a good idea to have a unit test that exercises common cache keys to prevent regressions like this. I'll see if I can help with that in the near future!
The default Laminas cache key pattern is incompatible with Doctrine's basic assumptions. This PR loosens things up a bit. It might not be perfect -- I'm open to suggestions for cleaner regexes -- but it at least works with the current DoctrineORMModule test suite.
Additionally, the old Doctrine file system cache adapter included automatic serialization, but the Laminas file system cache adapter does not. This adjusts the configuration to fix that inconsistency and ensure compatible behavior.
See https://github.com/doctrine/DoctrineORMModule/pull/734 for related discussion.