8000 Enable "native_constant_invocation" CS rule · symfony/symfony@4351a70 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4351a70

Browse files
Enable "native_constant_invocation" CS rule
1 parent c653f2c commit 4351a70

File tree

429 files changed

+1354
-1353
lines changed
  • Simple
  • Tests
  • Traits
  • ClassLoader
  • Config
  • Console
  • Debug
  • DependencyInjection
  • DomCrawler
  • EventDispatcher
  • ExpressionLanguage
  • Filesystem
  • Finder
  • Form
  • HttpFoundation
  • HttpKernel
  • Some content is hidden

    Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

    429 files changed

    +1354
    -1353
    lines changed

    .php_cs.dist

    Lines changed: 1 addition & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -13,6 +13,7 @@ return PhpCsFixer\Config::create()
    1313
    'array_syntax' => ['syntax' => 'short'],
    1414
    'fopen_flags' => false,
    1515
    'protected_to_private' => false,
    16+
    'native_constant_invocation' => true,
    1617
    ])
    1718
    ->setRiskyAllowed(true)
    1819
    ->setFinder(

    src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php

    Lines changed: 3 additions & 3 deletions
    Original file line numberDiff line numberDiff line change
    @@ -256,11 +256,11 @@ protected function detectMetadataDriver($dir, ContainerBuilder $container)
    256256
    $configPath = $this->getMappingResourceConfigDirectory();
    257257
    $extension = $this->getMappingResourceExtension();
    258258

    259-
    if (glob($dir.'/'.$configPath.'/*.'.$extension.'.xml', GLOB_NOSORT)) {
    259+
    if (glob($dir.'/'.$configPath.'/*.'.$extension.'.xml', \GLOB_NOSORT)) {
    260260
    $driver = 'xml';
    261-
    } elseif (glob($dir.'/'.$configPath.'/*.'.$extension.'.yml', GLOB_NOSORT)) {
    261+
    } elseif (glob($dir.'/'.$configPath.'/*.'.$extension.'.yml', \GLOB_NOSORT)) {
    262262
    $driver = 'yml';
    263-
    } elseif (glob($dir.'/'.$configPath.'/*.'.$extension.'.php', GLOB_NOSORT)) {
    263+
    } elseif (glob($dir.'/'.$configPath.'/*.'.$extension.'.php', \GLOB_NOSORT)) {
    264264
    $driver = 'php';
    265265
    } else {
    266266
    // add the closest existing directory as a resource

    src/Symfony/Bridge/Doctrine/ExpressionLanguage/DoctrineParserCache.php

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -11,7 +11,7 @@
    1111

    1212
    namespace Symfony\Bridge\Doctrine\ExpressionLanguage;
    1313

    14-
    @trigger_error('The '.__NAMESPACE__.'\DoctrineParserCache class is deprecated since Symfony 3.2 and will be removed in 4.0. Use the Symfony\Component\Cache\Adapter\DoctrineAdapter class instead.', E_USER_DEPRECATED);
    14+
    @trigger_error('The '.__NAMESPACE__.'\DoctrineParserCache class is deprecated since Symfony 3.2 and will be removed in 4.0. Use the Symfony\Component\Cache\Adapter\DoctrineAdapter class instead.', \E_USER_DEPRECATED);
    1515

    1616
    use Doctrine\Common\Cache\Cache;
    1717
    use Symfony\Component\ExpressionLanguage\ParsedExpression;

    src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -52,7 +52,7 @@ public function __construct($manager, $class, $idReader = null, $objectLoader =
    5252
    {
    5353
    // BC to be removed and replace with type hints in 4.0
    5454
    if ($manager instanceof ChoiceListFactoryInterface) {
    55-
    @trigger_error(sprintf('Passing a ChoiceListFactoryInterface to %s is deprecated since Symfony 3.1 and will no longer be supported in 4.0. You should either call "%s::loadChoiceList" or override it to return a ChoiceListInterface.', __CLASS__, __CLASS__), E_USER_DEPRECATED);
    55+
    @trigger_error(sprintf('Passing a ChoiceListFactoryInterface to %s is deprecated since Symfony 3.1 and will no longer be supported in 4.0. You should either call "%s::loadChoiceList" or override it to return a ChoiceListInterface.', __CLASS__, __CLASS__), \E_USER_DEPRECATED);
    5656

    5757
    // Provide a BC layer since $factory has changed
    5858
    // form first to last argument as of 3.1

    src/Symfony/Bridge/Doctrine/Form/EventListener/MergeDoctrineCollectionListener.php

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -47,7 +47,7 @@ public function onSubmit(FormEvent $event)
    4747
    {
    4848
    if ($this->bc) {
    4949
    // onBind() has been overridden from a child class
    50-
    @trigger_error('The onBind() method is deprecated since Symfony 3.1 and will be removed in 4.0. Use the onSubmit() method instead.', E_USER_DEPRECATED);
    50+
    @trigger_error('The onBind() method is deprecated since Symfony 3.1 and will be removed in 4.0. Use the onSubmit() method instead.', \E_USER_DEPRECATED);
    5151

    5252
    if (!$this->bcLayer) {
    5353
    // If parent::onBind() has not been called, then logic has been executed

    src/Symfony/Bridge/Doctrine/HttpFoundation/DbalSessionHandler.php

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -11,7 +11,7 @@
    1111

    1212
    namespace Symfony\Bridge\Doctrine\HttpFoundation;
    1313

    14-
    @trigger_error(sprintf('The class %s is deprecated since Symfony 3.4 and will be removed in 4.0. Use Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler instead.', DbalSessionHandler::class), E_USER_DEPRECATED);
    14+
    @trigger_error(sprintf('The class %s is deprecated since Symfony 3.4 and will be removed in 4.0. Use Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler instead.', DbalSessionHandler::class), \E_USER_DEPRECATED);
    1515

    1616
    use Doctrine\DBAL\Connection;
    1717
    use Doctrine\DBAL\Driver\DriverException;

    src/Symfony/Bridge/Doctrine/HttpFoundation/DbalSessionHandlerSchema.php

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -11,7 +11,7 @@
    1111

    1212
    namespace Symfony\Bridge\Doctrine\HttpFoundation;
    1313

    14-
    @trigger_error(sprintf('The class %s is deprecated since Symfony 3.4 and will be removed in 4.0. Use Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler::createTable instead.', DbalSessionHandlerSchema::class), E_USER_DEPRECATED);
    14+
    @trigger_error(sprintf('The class %s is deprecated since Symfony 3.4 and will be removed in 4.0. Use Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler::createTable instead.', DbalSessionHandlerSchema::class), \E_USER_DEPRECATED);
    1515

    1616
    use Doctrine\DBAL\Schema\Schema;
    1717

    src/Symfony/Bridge/Doctrine/ManagerRegistry.php

    Lines changed: 2 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -50,7 +50,7 @@ trait ManagerRegistryTrait
    5050
    */
    5151
    public function setContainer(SymfonyContainerInterface $container = null)
    5252
    {
    53-
    @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.4 and will be removed in 4.0. Inject a PSR-11 container using the constructor instead.', __METHOD__), E_USER_DEPRECATED);
    53+
    @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.4 and will be removed in 4.0. Inject a PSR-11 container using the constructor instead.', __METHOD__), \E_USER_DEPRECATED);
    5454

    5555
    $this->container = $container;
    5656
    }
    @@ -74,7 +74,7 @@ protected function resetService($name)
    7474
    $manager = $this->container->get($name);
    7575

    7676
    if (!$manager instanceof LazyLoadingInterface) {
    77-
    @trigger_error(sprintf('Resetting a non-lazy manager service is deprecated since Symfony 3.2 and will throw an exception in version 4.0. Set the "%s" service as lazy and require "symfony/proxy-manager-bridge" in your composer.json file instead.', $name), E_USER_DEPRECATED);
    77+
    @trigger_error(sprintf('Resetting a non-lazy manager service is deprecated since Symfony 3.2 and will throw an exception in version 4.0. Set the "%s" service as lazy and require "symfony/proxy-manager-bridge" in your composer.json file instead.', $name), \E_USER_DEPRECATED);
    7878

    7979
    $this->container->set($name, null);
    8080

    src/Symfony/Bridge/Monolog/Formatter/ConsoleFormatter.php

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -57,7 +57,7 @@ public function __construct($options = [])
    5757
    {
    5858
    // BC Layer
    5959
    if (!\is_array($options)) {
    60-
    @trigger_error(sprintf('The constructor arguments $format, $dateFormat, $allowInlineLineBreaks, $ignoreEmptyContextAndExtra of "%s" are deprecated since Symfony 3.3 and will be removed in 4.0. Use $options instead.', self::class), E_USER_DEPRECATED);
    60+
    @trigger_error(sprintf('The constructor arguments $format, $dateFormat, $allowInlineLineBreaks, $ignoreEmptyContextAndExtra of "%s" are deprecated since Symfony 3.3 and will be removed in 4.0. Use $options instead.', self::class), \E_USER_DEPRECATED);
    6161
    $args = \func_get_args();
    6262
    $options = [];
    6363
    if (isset($args[0])) {

    src/Symfony/Bridge/Monolog/Handler/DebugHandler.php

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -11,7 +11,7 @@
    1111

    1212
    namespace Symfony\Bridge\Monolog\Handler;
    1313

    14-
    @trigger_error('The '.__NAMESPACE__.'\DebugHandler class is deprecated since Symfony 3.2 and will be removed in 4.0. Use Symfony\Bridge\Monolog\Processor\DebugProcessor instead.', E_USER_DEPRECATED);
    14+
    @trigger_error('The '.__NAMESPACE__.'\DebugHandler class is deprecated since Symfony 3.2 and will be removed in 4.0. Use Symfony\Bridge\Monolog\Processor\DebugProcessor instead.', \E_USER_DEPRECATED);
    1515

    1616
    use Monolog\Handler\TestHandler;
    1717
    use Monolog\Logger;

    src/Symfony/Bridge/Monolog/Handler/ServerLogHandler.php

    Lines changed: 2 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -61,7 +61,7 @@ public function handle(array $record)
    6161

    6262
    try {
    6363
    if (-1 === stream_socket_sendto($this->socket, $recordFormatted)) {
    64-
    stream_socket_shutdown($this->socket, STREAM_SHUT_RDWR);
    64+
    stream_socket_shutdown($this->socket, \STREAM_SHUT_RDWR);
    6565

    6666
    // Let's retry: the persistent connection might just be stale
    6767
    if ($this->socket = $this->createSocket()) {
    @@ -89,7 +89,7 @@ private static function nullErrorHandler()
    8989

    9090
    private function createSocket()
    9191
    {
    92-
    $socket = stream_socket_client($this->host, $errno, $errstr, 0, STREAM_CLIENT_CONNECT | STREAM_CLIENT_ASYNC_CONNECT | STREAM_CLIENT_PERSISTENT, $this->context);
    92+
    $socket = stream_socket_client(< F438 span class="pl-s1">$this->host, $errno, $errstr, 0, \STREAM_CLIENT_CONNECT | \STREAM_CLIENT_ASYNC_CONNECT | \STREAM_CLIENT_PERSISTENT, $this->context);
    9393

    9494
    if ($socket) {
    9595
    stream_set_blocking($socket, false);

    src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php

    Lines changed: 7 additions & 7 deletions
    Original file line numberDiff line numberDiff line change
    @@ -109,7 +109,7 @@ public static function register($mode = 0)
    109109
    'remaining vendor' => array(),
    110110
    );
    111111
    $deprecationHandler = function ($type, $msg, $file, $line, $context = array()) use (&$deprecations, $getMode, $UtilPrefix, $inVendors) {
    112-
    if ((E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type && (E_WARNING !== $type || false === strpos($msg, '" targeting switch is equivalent to "break'))) || DeprecationErrorHandler::MODE_DISABLED === $mode = $getMode()) {
    112+
    if ((\E_USER_DEPRECATED !== $type && \E_DEPRECATED !== $type && (\E_WARNING !== $type || false === strpos($msg, '" targeting switch is equivalent to "break'))) || DeprecationErrorHandler::MODE_DISABLED === $mode = $getMode()) {
    113113
    return \call_user_func(DeprecationErrorHandler::getPhpUnitErrorHandler(), $type, $msg, $file, $line, $context);
    114114
    }
    115115

    @@ -285,7 +285,7 @@ public static function collectDeprecations($outputFile)
    285285
    {
    286286
    $deprecations = array();
    287287
    $previousErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = array()) use (&$deprecations, &$previousErrorHandler) {
    288-
    if (E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type && (E_WARNING !== $type || false === strpos($msg, '" targeting switch is equivalent to "break'))) {
    288+
    if (\E_USER_DEPRECATED !== $type && \E_DEPRECATED !== $type && (\E_WARNING !== $type || false === strpos($msg, '" targeting switch is equivalent to "break'))) {
    289289
    if ($previousErrorHandler) {
    290290
    return $previousErrorHandler($type, $msg, $file, $line, $context);
    291291
    }
    @@ -314,7 +314,7 @@ public static function getPhpUnitErrorHandler()
    314314
    return (class_exists('PHPUnit_Util_ErrorHandler', false) ? 'PHPUnit_Util_' : 'PHPUnit\Util\\').'ErrorHandler::handleError';
    315315
    }
    316316

    317-
    foreach (debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT | DEBUG_BACKTRACE_IGNORE_ARGS) as $frame) {
    317+
    foreach (debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT | \DEBUG_BACKTRACE_IGNORE_ARGS) as $frame) {
    318318
    if (isset($frame['object']) && $frame['object'] instanceof TestResult) {
    319319
    return new ErrorHandler(
    320320
    $frame['object']->getConvertDeprecationsToExceptions(),
    @@ -348,21 +348,21 @@ private static function hasColorSupport()
    348348

    349349
    if (\DIRECTORY_SEPARATOR === '\\') {
    350350
    return (\function_exists('sapi_windows_vt100_support')
    351-
    && sapi_windows_vt100_support(STDOUT))
    351+
    && sapi_windows_vt100_support(\STDOUT))
    352352
    || false !== getenv('ANSICON')
    353353
    || 'ON' === getenv('ConEmuANSI')
    354354
    || 'xterm' === getenv('TERM');
    355355
    }
    356356

    357357
    if (\function_exists('stream_isatty')) {
    358-
    return stream_isatty(STDOUT);
    358+
    return stream_isatty(\STDOUT);
    359359
    }
    360360

    361361
    if (\function_exists('posix_isatty')) {
    362-
    return posix_isatty(STDOUT);
    362+
    return posix_isatty(\STDOUT);
    363363
    }
    364364

    365-
    $stat = fstat(STDOUT);
    365+
    $stat = fstat(\STDOUT);
    366366
    // Check if formatted mode is S_IFCHR
    367367
    return $stat ? 0020000 === ($stat['mode'] & 0170000) : false;
    368368
    }

    src/Symfony/Bridge/PhpUnit/Tests/DnsMockTest.php

    Lines changed: 3 additions & 3 deletions
    Original file line numberDiff line numberDiff line change
    @@ -141,8 +141,8 @@ public function testDnsGetRecord()
    141141

    142142
    $this->assertFalse(DnsMock::dns_get_record('foobar.com'));
    143143
    $this->assertSame($records, DnsMock::dns_get_record('example.com'));
    144-
    $this->assertSame($records, DnsMock::dns_get_record('example.com', DNS_ALL));
    145-
    $this->assertSame($records, DnsMock::dns_get_record('example.com', DNS_A | DNS_PTR));
    146-
    $this->assertSame(array($ptr), DnsMock::dns_get_record('example.com', DNS_PTR));
    144+
    $this->assertSame($records, DnsMock::dns_get_record('example.com', \DNS_ALL));
    145+
    $this->assertSame($records, DnsMock::dns_get_record('example.com', \DNS_A | \DNS_PTR));
    146+
    $this->assertSame(array($ptr), DnsMock::dns_get_record('example.com', \DNS_PTR));
    147147
    }
    148148
    }

    src/Symfony/Bridge/PhpUnit/Tests/ExpectedDeprecationAnnotationTest.php

    Lines changed: 3 additions & 3 deletions
    Original file line numberDiff line numberDiff line change
    @@ -24,7 +24,7 @@ final class ExpectedDeprecationAnnotationTest extends TestCase
    2424
    */
    2525
    public function testOne()
    2626
    {
    27-
    @trigger_error('foo', E_USER_DEPRECATED);
    27+
    @trigger_error('foo', \E_USER_DEPRECATED);
    2828
    }
    2929

    3030
    /**
    @@ -37,7 +37,7 @@ public function testOne()
    3737
    */
    3838
    public function testMany()
    3939
    {
    40-
    @trigger_error('foo', E_USER_DEPRECATED);
    41-
    @trigger_error('bar', E_USER_DEPRECATED);
    40+
    @trigger_error('foo', \E_USER_DEPRECATED);
    41+
    @trigger_error('bar', \E_USER_DEPRECATED);
    4242
    }
    4343
    }

    src/Symfony/Bridge/PhpUnit/Tests/ProcessIsolationTest.php

    Lines changed: 2 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -18,7 +18,7 @@ class ProcessIsolationTest extends TestCase
    1818
    */
    1919
    public function testIsolation()
    2020
    {
    21-
    @trigger_error('Test abc', E_USER_DEPRECATED);
    21+
    @trigger_error('Test abc', \E_USER_DEPRECATED);
    2222
    $this->addToAssertionCount(1);
    2323
    }
    2424

    @@ -28,6 +28,6 @@ public function testCallingOtherErrorHandler()
    2828
    $this->expectException($class);
    2929
    $this->expectExceptionMessage('Test that PHPUnit\'s error handler fires.');
    3030

    31-
    trigger_error('Test that PHPUnit\'s error handler fires.', E_USER_WARNING);
    31+
    trigger_error('Test that PHPUnit\'s error handler fires.', \E_USER_WARNING);
    3232
    }
    3333
    }

    src/Symfony/Bridge/PhpUnit/bootstrap.php

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -25,7 +25,7 @@
    2525
    }
    2626

    2727
    // Enforce a consistent locale
    28-
    setlocale(LC_ALL, 'C');
    28+
    setlocale(\LC_ALL, 'C');
    2929

    3030
    if (!class_exists('Doctrine\Common\Annotations\AnnotationRegistry', false) && class_exists('Doctrine\Common\Annotations\AnnotationRegistry')) {
    3131
    if (method_exists('Doctrine\Common\Annotations\AnnotationRegistry', 'registerUniqueLoader')) {

    src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php

    Lines changed: 2 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -62,10 +62,10 @@ public function getProxyFactoryCode(Definition $definition, $id, $factoryCode =
    6262
    }
    6363

    6464
    if (null === $factoryCode) {
    65-
    @trigger_error(sprintf('The "%s()" method expects a third argument defining the code to execute to construct your service since Symfony 3.4, providing it will be required in 4.0.', __METHOD__), E_USER_DEPRECATED);
    65+
    @trigger_error(sprintf('The "%s()" method expects a third argument defining the code to execute to construct your service since Symfony 3.4, providing it will be required in 4.0.', __METHOD__), \E_USER_DEPRECATED);
    6666
    $factoryCode = '$this->get'.Container::camelize($id).'Service(false)';
    6767
    } elseif (false === strpos($factoryCode, '(')) {
    68-
    @trigger_error(sprintf('The "%s()" method expects its third argument to define the code to execute to construct your service since Symfony 3.4, providing it will be required in 4.0.', __METHOD__), E_USER_DEPRECATED);
    68+
    @trigger_error(sprintf('The "%s()" method expects its third argument to define the code to execute to construct your service since Symfony 3.4, providing it will be required in 4.0.', __METHOD__), \E_USER_DEPRECATED);
    6969
    $factoryCode = "\$this->$factoryCode(false)";
    7070
    }
    7171
    $proxyClass = $this->getProxyClassName($definition);

    src/Symfony/Bridge/Twig/Command/DebugCommand.php

    Lines changed: 5 additions & 5 deletions
    Original file line numberDiff line numberDiff line change
    @@ -40,7 +40,7 @@ class DebugCommand extends Command
    4040
    public function __construct($twig = null, $projectDir = null)
    4141
    {
    4242
    if (!$twig instanceof Environment) {
    43-
    @trigger_error(sprintf('Passing a command name as the first argument of "%s()" is deprecated since Symfony 3.4 and support for it will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
    43+
    @trigger_error(sprintf('Passing a command name as the first argument of "%s()" is deprecated since Symfony 3.4 and support for it will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), \E_USER_DEPRECATED);
    4444

    4545
    parent::__construct($twig);
    4646

    @@ -55,7 +55,7 @@ public function __construct($twig = null, $projectDir = null)
    5555

    5656
    public function setTwigEnvironment(Environment $twig)
    5757
    {
    58-
    @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
    58+
    @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.4 and will be removed in 4.0.', __METHOD__), \E_USER_DEPRECATED);
    5959

    6060
    $this->twig = $twig;
    6161
    }
    @@ -65,7 +65,7 @@ public function setTwigEnvironment(Environment $twig)
    6565
    */
    6666
    protected function getTwigEnvironment()
    6767
    {
    68-
    @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
    68+
    @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.4 and will be removed in 4.0.', __METHOD__), \E_USER_DEPRECATED);
    6969

    7070
    return $this->twig;
    7171
    }
    @@ -107,7 +107,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
    107107
    if (__CLASS__ !== static::class) {
    108108
    $r = new \ReflectionMethod($this, 'getTwigEnvironment');
    109109
    if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
    110-
    @trigger_error(sprintf('Usage of method "%s" is deprecated since Symfony 3.4 and will no longer be supported in 4.0. Construct the command with its required arguments instead.', static::class.'::getTwigEnvironment'), E_USER_DEPRECATED);
    110+
    @trigger_error(sprintf('Usage of method "%s" is deprecated since Symfony 3.4 and will no longer be supported in 4.0. Construct the command with its required arguments instead.', static::class.'::getTwigEnvironment'), \E_USER_DEPRECATED);
    111111

    112112
    $this->twig = $this->getTwigEnvironment();
    113113
    }
    @@ -134,7 +134,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
    134134
    }
    135135

    136136
    $data['loader_paths'] = $this->getLoaderPaths();
    137-
    $data = json_encode($data, JSON_PRETTY_PRINT);
    137+
    $data = json_encode($data, \JSON_PRETTY_PRINT);
    138138
    $io->writeln($decorated ? OutputFormatter::escape($data) : $data);
    139139

    140140
    return 0;

    0 commit comments

    Comments
     (0)
    0