squizlabs / PHP_CodeSniffer

PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.
BSD 3-Clause "New" or "Revised" License
10.67k stars 1.48k forks source link

Only shows the issue but do not edit the file automatically. #3580

Closed IvankvKharkiv closed 1 year ago

IvankvKharkiv commented 2 years ago

Installation type - composer. Environment: PHP8, symfony 6. When running from command line:

$./vendor/bin/phpcbf /var/www/developstoday_test.com/src/ 

Returns error description but does not fix it:

PHPCBF RESULT SUMMARY
----------------------------------------------------------------------
FILE                                                  FIXED  REMAINING
----------------------------------------------------------------------
src/Entity/NewsPosts.php                              1      0
----------------------------------------------------------------------
A TOTAL OF 1 ERROR WERE FIXED IN 1 FILE
----------------------------------------------------------------------

Time: 153ms; Memory: 8MB

But in reality file stays the same. The extra lines does not fixed in the file. Frankly speaking it just does not work. The most strange thing is that when i run command second time it does not show the files with issue even though the issue is still present. So it does not work at all. How to force it to fix autromatically and to work properly to show the mistakes if they are still in the file?

jrfnl commented 2 years ago

Please use the Bug Report template for opening bug report issues. The above is missing nearly all information needed to determine what is going on.

Either open a new issue using the Bug Report template or add the following information to your issue to allow someone to understand what you are reporting:

Without that information, there is nothing anybody can do.

jrfnl commented 1 year ago

Closing for lack of response. If this is still an issue, please provide the additional information requested and if the issue can then be reproduced, the ticket can be reopened.