mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-2509: Add CLI detection for the APC check on Console cache commands #3152
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Jun 17, 2013).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user jcm:
There is some instanceof checks on the \Doctrine\ORM\Tools\Console\Command\ClearCache* commands to detect if APC is being used, they were introduced here:
8efae0b232I would like to know if it's possible to add a CLI check too, something like:
if ($cacheDriver instanceof Cache\ApcCache && PHP_SAPI === 'cli' )Yeah, I know that those are CLI commands, and so the check looks like unecessary, however, in the particular case that I found it's necessary, I'm running the commands under an WebUI:
Before the modification:
!http://i.imgur.com/8a2iVl7.jpg!
After:
!http://i.imgur.com/LTN1aDa.jpg!
@doctrinebot commented on GitHub (Jun 17, 2013):
Comment created by @ocramius:
CLI commands are not meant to be used in WEB environment (at least not the Symfony CLI ones). You should probably replicate that logic instead.
@doctrinebot commented on GitHub (Oct 30, 2015):
Issue was closed with resolution "Won't Fix"