minor #21463 [HttpKernel] DebugHandlersListener micro optimize (SpacePossum)
This PR was merged into the 3.2 branch.
Discussion
----------
[HttpKernel] DebugHandlersListener micro optimize
| Q | A
| ------------- | ---
| Branch? | 3.2 (lowest version introduced)
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
For ref.: [php_sapi_name()](http://php.net/manual/en/function.php-sapi-name.php) returns the const `PHP_SAPI`.
This a PR out of courtesy to see if the CS/Fixer/Rule that found this case should be added to the SF set by default.
Commits
-------
f9f862f
Update DebugHandlersListener.php
This commit is contained in:
commit
8f913a7812
@ -137,7 +137,7 @@ class DebugHandlersListener implements EventSubscriberInterface
|
||||
{
|
||||
$events = array(KernelEvents::REQUEST => array('configure', 2048));
|
||||
|
||||
if ('cli' === php_sapi_name() && defined('Symfony\Component\Console\ConsoleEvents::COMMAND')) {
|
||||
if ('cli' === PHP_SAPI && defined('Symfony\Component\Console\ConsoleEvents::COMMAND')) {
|
||||
$events[ConsoleEvents::COMMAND] = array('configure', 2048);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user