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] Add CacheItem::validateKey utility method#18597

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
nicolas-grekas merged 1 commit intosymfony:masterfromnicolas-grekas:cache-valid
Apr 20, 2016

Conversation

@nicolas-grekas
Copy link
Member

@nicolas-grekasnicolas-grekas commentedApr 20, 2016
edited
Loading

QA
Branch?3.1
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets-
LicenseMIT
Doc PR-

Ping@dunglas

@stof
Copy link
Member

👍

@nicolas-grekasnicolas-grekas merged commitaf09cde intosymfony:masterApr 20, 2016
nicolas-grekas added a commit that referenced this pull requestApr 20, 2016
…olas-grekas)This PR was merged into the 3.1-dev branch.Discussion----------[Cache] Add CacheItem::validateKey utility method| Q             | A| ------------- | ---| Branch?       | 3.1| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | -| License       | MIT| Doc PR        | -Ping@dunglasCommits-------af09cde [Cache] Add CacheItem::validateKey utility method
@nicolas-grekasnicolas-grekas deleted the cache-valid branchApril 20, 2016 14:17
}

privatefunctiongetId($key,$ns =false)
privatefunctiongetId($key)

Choose a reason for hiding this comment

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

Sorry for adding comments in a merged PR, but this was merged a bit quickly. I have some concerns about howvalidateKey() is used. It's a validator, but it's used like a getter or a normalizer.

Instead of this:

privatefunctiongetId($key){return$this->namespace.CacheItem::validateKey($key);}

Why not using it like this?

privatefunctiongetId($key){    CacheItem::validateKey($key);return$this->namespace.$key;}

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

This would just raise the boilerplate, whereas the current behavior keep it low IMHO.

@fabpotfabpot mentioned this pull requestMay 13, 2016
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@nicolas-grekas@stof@javiereguiluz@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp