8000 [PropertyAccess] Set a NullLogger in ApcuAdapter when Apcu is disabled in CLI by iamluc · Pull Request #24251 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[PropertyAccess] Set a NullLogger in ApcuAdapter when Apcu is disabled in CLI #24251

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

Merged
merged 1 commit into from
Sep 26, 2017

Conversation

iamluc
Copy link
Contributor
@iamluc iamluc commented Sep 19, 2017
Q A
Branch? 3.3
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

Same check as in https://github.com/symfony/symfony/pull/23390/files#diff-a5185cd58702e8e073786794a423cb27R112

@iamluc iamluc force-pushed the fix-property-accessor-cache-cli branch from 1a8acf9 to 9f1feb0 Compare September 19, 2017 08:49
@@ -928,7 +929,9 @@ public static function createCache($namespace, $defaultLifetime, $version, Logge
}

$apcu = new ApcuAdapter($namespace, $defaultLifetime / 5, $version);
if (null !== $logger) {
if ('cli' === PHP_SAPI && !ini_get('apc.enable_cli')) {
Copy link
Member

Choose a reason for hidi 8000 ng this comment

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

I suggest using a fully-qualified name for the constant, so that OPCache can exclude this branch at compile time for other SAPIs

@iamluc iamluc force-pushed the fix-property-accessor-cache-cli branch from 9f1feb0 to 4a01cd8 Compare September 26, 2017 10:11
@nicolas-grekas
Copy link
Member

Thank you @iamluc.

@nicolas-grekas nicolas-grekas merged commit 4a01cd8 into symfony:3.3 Sep 26, 2017
nicolas-grekas added a commit that referenced this pull request Sep 26, 2017
… is disabled in CLI (iamluc)

This PR was merged into the 3.3 branch.

Discussion
----------

[PropertyAccess] Set a NullLogger in ApcuAdapter when Apcu is disabled in CLI

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Same check as in https://github.com/symfony/symfony/pull/23390/files#diff-a5185cd58702e8e073786794a423cb27R112

Commits
-------

4a01cd8 Set a NullLogger in ApcuAdapter when Apcu is disabled in CLI
@fabpot fabpot mentioned this pull request Oct 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0