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

[Cache][FrameworkBundle] Fix logging for TagAwareAdapter#40740

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

Merged

Conversation

@fancyweb
Copy link
Contributor

QA
Branch?4.4
Bug fix?yes
New feature?no
Deprecations?no
Tickets#40108
LicenseMIT
Doc PR-

@carsonbotcarsonbot added this to the4.4 milestoneApr 8, 2021
@carsonbotcarsonbot changed the title[Cache] [FrameworkBundle] Fix logging for TagAwareAdapter[Cache][FrameworkBundle] Fix logging for TagAwareAdapterApr 8, 2021
@fancywebfancywebforce-pushed thecache-fwb/tag-aware-log branch fromcccd9d1 to22de60aCompareApril 8, 2021 12:20
@fancyweb
Copy link
ContributorAuthor

Do we want to bump the required minimum symfony/cache version in FWB for this or add a runtime check?

@carsonbot
Copy link

Hey!

I think@v-m-i has recently worked with this code. Maybe they can help review this?

Cheers!

Carsonbot

Copy link
Contributor

@v-m-iv-m-i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Hi@fancyweb, thank you for this PR.

Kudos for detailed and readable tests.

I have added one typo-fix suggestion. Everything else looks good :)

Besides code, I see that some builds have failed so I would suggest looking into that.

fancyweb reacted with heart emoji
Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

(once the typo is fixed)

@fancywebfancywebforce-pushed thecache-fwb/tag-aware-log branch 9 times, most recently fromc08849f tobeb338bCompareApril 11, 2021 16:46
@fancywebfancywebforce-pushed thecache-fwb/tag-aware-log branch frombeb338b to6b0becaCompareApril 11, 2021 17:06
publicstaticfunctioncompute(callable$callback,ItemInterface$item,bool &$save,CacheInterface$pool,\Closure$setMetadata =null,LoggerInterface$logger =null)
{
$key =self::$files ?crc32($item->getKey()) %\count(self::$files) : -1;
$key =self::$files ?abs(crc32($item->getKey())) %\count(self::$files) : -1;
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Because PHP's integer type is signed many crc32 checksums will result in negative integers on 32bit platforms.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I find it better to usesprintf('%u')

@fancyweb
Copy link
ContributorAuthor

Tests are green 🎉

v-m-i reacted with hooray emoji

@nicolas-grekas
Copy link
Member

Thank you@fancyweb.

@nicolas-grekasnicolas-grekas merged commit4e904ec intosymfony:4.4Apr 11, 2021
@fancywebfancyweb deleted the cache-fwb/tag-aware-log branchApril 16, 2021 13:36
This was referencedMay 1, 2021
nicolas-grekas added a commit that referenced this pull requestFeb 4, 2022
…yweb)This PR was merged into the 4.4 branch.Discussion----------[FrameworkBundle] Fix log channel of TagAwareAdapter| Q             | A| ------------- | ---| Branch?       | 4.4| Bug fix?      | yes| New feature?  | no| Deprecations? | no| Tickets       | -| License       | MIT| Doc PR        | -Forgot to add the tag in#40740, therefore the "app" logger is injected instead of the "cache" one.Commits-------494ceaf [FrameworkBundle] Fix log channel of TagAwareAdapter
symfony-splitter pushed a commit to symfony/framework-bundle that referenced this pull requestFeb 4, 2022
…yweb)This PR was merged into the 4.4 branch.Discussion----------[FrameworkBundle] Fix log channel of TagAwareAdapter| Q             | A| ------------- | ---| Branch?       | 4.4| Bug fix?      | yes| New feature?  | no| Deprecations? | no| Tickets       | -| License       | MIT| Doc PR        | -Forgot to add the tag insymfony/symfony#40740, therefore the "app" logger is injected instead of the "cache" one.Commits-------494ceaf6cc [FrameworkBundle] Fix log channel of TagAwareAdapter
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

+2 more reviewers

@glenscglenscglensc left review comments

@v-m-iv-m-iv-m-i requested changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

5 participants

@fancyweb@carsonbot@nicolas-grekas@glensc@v-m-i

[8]ページ先頭

©2009-2025 Movatter.jp