TwigBridge icon indicating copy to clipboard operation
TwigBridge copied to clipboard

Error on twig:lint command on 5.1

Open Anahkiasen opened this issue 9 years ago • 2 comments

This isn't as much related to 5.1 as it is to Symfony 2.7:

PHP Fatal error:  Call to undefined method Symfony\Component\Console\Style\SymfonyStyle::isVerbose() in /home/ubuntu/Ignition/vendor/rcrowe/twigbridge/src/Command/Lint.php on line 215
PHP Stack trace:
PHP   1. {main}() /home/ubuntu/Ignition/artisan:0
PHP   2. Illuminate\Foundation\Console\Kernel->handle() /home/ubuntu/Ignition/artisan:36
PHP   3. Symfony\Component\Console\Application->run() /home/ubuntu/Ignition/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:94
PHP   4. Symfony\Component\Console\Application->doRun() /home/ubuntu/Ignition/vendor/symfony/console/Application.php:126
PHP   5. Symfony\Component\Console\Application->doRunCommand() /home/ubuntu/Ignition/vendor/symfony/console/Application.php:195
PHP   6. Illuminate\Console\Command->run() /home/ubuntu/Ignition/vendor/symfony/console/Application.php:878
PHP   7. Symfony\Component\Console\Command\Command->run() /home/ubuntu/Ignition/vendor/laravel/framework/src/Illuminate/Console/Command.php:136
PHP   8. Illuminate\Console\Command->execute() /home/ubuntu/Ignition/vendor/symfony/console/Command/Command.php:259
PHP   9. Illuminate\Container\Container->call() /home/ubuntu/Ignition/vendor/laravel/framework/src/Illuminate/Console/Command.php:150
PHP  10. call_user_func_array:{/home/ubuntu/Ignition/vendor/laravel/framework/src/Illuminate/Container/Container.php:502}() /home/ubuntu/Ignition/vendor/laravel/framework/src/Illuminate/Container/Container.php:502
PHP  11. TwigBridge\Command\Lint->fire() /home/ubuntu/Ignition/vendor/laravel/framework/src/Illuminate/Container/Container.php:502
PHP  12. TwigBridge\Command\Lint->display() /home/ubuntu/Ignition/vendor/rcrowe/twigbridge/src/Command/Lint.php:112

Anahkiasen avatar Jun 19 '15 08:06 Anahkiasen

Yeah, that's because the SymfonyStyle doesn't have the same methods as the regular output. Not sure if this is intentional on the Symfony side though.

It's fixed in 3.0 so I guess they didn't want to do that in 2.7. Not sure why. I'm thinking that we might want to fix that in Laravel? (Extend SymfonyStyle with LaravelStyle and just add those helper methods)

barryvdh avatar Jun 20 '15 20:06 barryvdh

See https://github.com/laravel/framework/pull/9348

barryvdh avatar Jun 20 '15 21:06 barryvdh