Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Config] PrefixingFileExistenceResource::__toString() to avoid conflict withFileResource#52502

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

weaverryan
Copy link
Member

@weaverryanweaverryan commentedNov 8, 2023
edited by nicolas-grekas
Loading

QA
Branch?5.4
Bug fix?yes
New feature?no
Deprecations?no
IssuesFixes issue in AssetMapper 6.4
LicenseMIT

Hi!

This bug causes a pretty critical AssetMapper 6.4 bug. The problem is that bothFileResource andFileExistenceResource return the same__toString() for the same file:

SelfCheckingResourceChecker uses a static cache where theResourceInterface::__toString() is the key for that string. That creates the following bug situation:

A) Something checks forFileExistenceResource forfoo/bar.php. This returns true andSelfCheckingResourceChecker now hastrue for fresh in its static cache
B) Something else checks forFileResource forfoo/bar.php: they are checking to see if the file has beenmodified. But in instead of calling the actualFileResource::isFresh() method, it uses thetrue value from the static cache.

Cheers!

@carsonbotcarsonbot added this to the6.3 milestoneNov 8, 2023
@OskarStarkOskarStark changed the title[Config] Prefixing FileExistenceResource::__toString() to avoid conflict with FileResource[Config] PrefixingFileExistenceResource::__toString() to avoid conflict withFileResourceNov 8, 2023
@nicolas-grekasnicolas-grekas modified the milestones:6.3,5.4Nov 9, 2023
@nicolas-grekas
Copy link
Member

Good catch, thanks@weaverryan.

@nicolas-grekasnicolas-grekas merged commit9b2c2a4 intosymfony:5.4Nov 9, 2023
@chalasr
Copy link
Member

🚀

@weaverryanweaverryan deleted the config-cache-clashing-resource-string branchNovember 9, 2023 11:49
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@lyrixxlyrixxAwaiting requested review from lyrixx

@ycerutoycerutoAwaiting requested review from yceruto

@chalasrchalasrAwaiting requested review from chalasr

@dunglasdunglasAwaiting requested review from dunglas

@OskarStarkOskarStarkAwaiting requested review from OskarStark

@xabbuhxabbuhAwaiting requested review from xabbuh

Assignees
No one assigned
Projects
None yet
Milestone
5.4
Development

Successfully merging this pull request may close these issues.

4 participants
@weaverryan@nicolas-grekas@chalasr@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp