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

[ClassLoader] Fix storing not-found classes in APC cache#18312

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
Tobion merged 1 commit intosymfony:2.3fromnicolas-grekas:apc-classload
Mar 28, 2016

Conversation

@nicolas-grekas
Copy link
Member

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

@xabbuh
Copy link
Member

Did this cause issues somewhere? The docs state that the return value will also befalse on failures.

@nicolas-grekas
Copy link
MemberAuthor

Its false on failure, but also false when false is the cached value... $success is the way to check for cache hit or miss.

@xabbuh
Copy link
Member

👍 ah of course

Status: Reviewed

* @param string $class A class name to resolve to file
*
* @return string|null
* @return string|false
Copy link
Contributor

Choose a reason for hiding this comment

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

This does not seem correct. The other class loaders havestring|null. As they are decorated by ApcClassLoader something is wrong. If they do not return false at all, then this whole change seems irrelevant.

@Tobion
Copy link
Contributor

Status: Needs Work

@nicolas-grekas
Copy link
MemberAuthor

@Tobion fixed
Status: needs review

$file =apcu_fetch($this->prefix.$class,$success);

if (!$success) {
apcu_store($this->prefix.$class,$file =$this->decorated->findFile($class) ?:null);
Copy link
Contributor

Choose a reason for hiding this comment

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

what is the point of the null condition?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Composer's ClassLoader returns false here.

Copy link
Contributor

Choose a reason for hiding this comment

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

then WinCache and Xcache class loaders should do the same normalization

@Tobion
Copy link
Contributor

ApcUniversalClassLoader needs the same fix.

@nicolas-grekas
Copy link
MemberAuthor

@Tobion PR updated

@Tobion
Copy link
Contributor

Thank you@nicolas-grekas.

@TobionTobion merged commit106ed06 intosymfony:2.3Mar 28, 2016
Tobion added a commit that referenced this pull requestMar 28, 2016
…nicolas-grekas)This PR was merged into the 2.3 branch.Discussion----------[ClassLoader] Fix storing not-found classes in APC cache| Q             | A| ------------- | ---| Branch?       | 2.3| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | -| License       | MIT| Doc PR        | -Commits-------106ed06 [ClassLoader] Fix storing not-found classes in APC cache
@nicolas-grekasnicolas-grekas deleted the apc-classload branchMarch 30, 2016 06:44
@fabpotfabpot mentioned this pull requestMar 30, 2016
This was referencedApr 29, 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@xabbuh@Tobion@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp