PHP-CS-Fixer: Error while using binary_operator_spaces
Each time I want set align_double_arrow or align_equals to true in my .php_cs, I got an error:
Loaded config default from "/var/www/project/.php_cs".
E
Legend: ?-unknown, I-invalid file syntax, file ignored, S-Skipped, .-no changes, F-fixed, E-error
Fixed all files in 0.013 seconds, 6.000 MB memory used
Files that were not fixed due to errors reported during fixing:
1) /var/www/project/CSTestController.php
With this file https://gist.github.com/AntoineLemaire/d8153d17fca3b1e67ef2dc98810180b3
And this .php_cs
<?php
return PhpCsFixer\Config::create()
->setUsingCache(false)
->setRules(array(
'@Symfony' => true,
'array_syntax' => array('syntax' => 'short'),
'unalign_equals' => false,
'phpdoc_order' => true,
'phpdoc_to_comment' => false,
'binary_operator_spaces' => array(
'align_double_arrow' => true,
'align_equals' => true,
),
))
;
I’m using php 7.0.13
PHP 7.0.13-0ubuntu0.16.04.1 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.13-0ubuntu0.16.04.1, Copyright (c) 1999-2016, by Zend Technologies
and php-cs-fixer 2.0.0
php-cs-fixer -vvv fix /var/www/project/CSTestController.php
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (9 by maintainers)
Thanks for reporting back! I took a look at the change log between 7.0.13 and .15-1 and nothing popped out to me what might have fixed the issue. Therefor I’m not sure how to proceed here, bug hunt for 7.0.13 or let it go in fav. of people updating to .15-1 (or up). One thing that we could do anyway is improving the error/exception reporting of the tool, which has been requested a few times, really hope to find some time for that.
Sorry,I finded that it’s working with vim editor,but not working in the vscode editor. then, I changed vscode editor.fontFamily,it’s ok!
He did, see the link to the gist 😉