-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[SoftDeleteable] Remove dollar sign from cache key #2978
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
Open
adambalint-srg
wants to merge
16
commits into
doctrine-extensions:main
Choose a base branch
from
adambalint-srg:cache-key-fix
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 15 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
2aa6ce4
Handle array parameters in QueryAnalyzer
adambalint-srg d1df20e
Merge branch 'doctrine-extensions:main' into main
adambalint-srg b9f4b8f
refactor: Remove dollar sign from cache key
adambalint-srg 0683d13
Cache key dollar sign - Add changelog entry
adambalint-srg 0ed5521
Merge remote-tracking branch 'upstream/main'
adambalint-srg f8bc8a8
Merge branch 'main' into cache-key-fix
adambalint-srg fdae25a
fix: Remove not related change
adambalint-srg 78de563
fix: Remove not related change
adambalint-srg 74d0e9f
Bump hadolint/hadolint-action from 3.2.0 to 3.3.0
dependabot[bot] 5f63ac6
Add a deprecations baseline to ignore selected deprecations in tests
mbabker 7f32378
3.21.0
phansys 6226afd
Cache key dollar sign - Add changelog entry
adambalint-srg 3fceb08
Merge branch 'main' into cache-key-fix
adambalint-srg 1acc141
docs: Add psr6 url to changelog
adambalint-srg dd26d78
Update CHANGELOG.md
adambalint-srg 9f12943
docs: Changelog update (All extensions are affected)
adambalint-srg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading the provided description and the referenced definition, I can't see this change as a fix.
The PSR-6 spec about cache keys states the following:
This does not mean that characters other than
A-Z
,a-z
,0-9
,_
, and.
are not allowed or discouraged. It confirms that at least these must be supported as minimum.However, even if the current choice of characters in this library complies with the PSR-6 spec but causes a problem, the
Fixed
section MUST explicitly and clearly state what problem this change is fixing.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@phansys
Should I link the Laminas File cache's pattern here?
https://github.com/laminas/laminas-cache-storage-adapter-filesystem/blob/3.2.x/src/FilesystemOptions.php#L26
This was the reason of the whole PR.
In my opinion if PSR6 says about what is the most strict standard, and this library follows this, it can be a fix, but it's your decision of course.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's my take on the changelog entry. It's not a fix per se as it's not directly fixing a bug, so let's call it a change. Also note it doesn't affect only SoftDeleteable as this is changing the base EMF class all extensions use.
FWIW,
doctrine/persistence
originally used$CLASSMETADATA
as its cache salt in the class metadata factory when thedoctrine/cache
library was used. It changed to the current__CLASSMETADATA__
value in doctrine/persistence#144 when support for PSR-6 was added and support for the Doctrine Cache library was deprecated. There isn't any explanation in that PR why the salt changed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with your proposal @mbabker.
@adambalint-srg, could you please rebase the PR and update the changelog according this suggestion?