VincentLanglet / Twig-CS-Fixer

A tool to automatically fix Twig Coding Standards issues
MIT License
223 stars 22 forks source link

No output #190

Closed Daviid-P closed 7 months ago

Daviid-P commented 7 months ago

When I run

./vendor/bin/twig-cs-fixer lint --verbose /templates/components/datatable.twig

I got the message of "using cache", and nothing else, like it hangs, I deleted the cache file just in case and now I get no output.

Is there any way to force any output to see if I'm suppressing any errors?

VincentLanglet commented 7 months ago

Hi,

When I run the command I get an output

image

Which version do you use ? Do you have a .twig-cs-fixer.dist.php config ?

Daviid-P commented 7 months ago

If that file must be created by me then I'd say no, I just installed it without adding anything.

Should definitely mention I have installed "vincentlanglet/twig-cs-fixer": "^0.6.1" I think I remember some kind of error message about needing php 8 for latest and this one is the version that composer chose.

PHP 7.4.33 (cli) (built: Nov  2 2022 16:00:55) ( ZTS Visual C++ 2017 x64 )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Xdebug v3.1.6, Copyright (c) 2002-2022, by Derick Rethans

Also, just running /vendor/bin/twig-cs-fixer with no arguments also seems to "hang"

Daviid-P commented 7 months ago

I installed php8 just to install latest twig-cs-fixer and it works fine, not sure what problems I could come across using php8 just for linting, I assume this is just concerned with twig style and guidelines and I don't use PHP code inside my templates.

VincentLanglet commented 7 months ago

I installed php8 just to install latest twig-cs-fixer and it works fine, not sure what problems I could come across using php8 just for linting, I assume this is just concerned with twig style and guidelines and I don't use PHP code inside my templates.

Great if works with latest versions