Skip to content

Conversation

@theofidry
Copy link
Member

Without this, when there is a diff, it does not show which rule is applied:

--  11) .php-cs-fixer.dist.php
++  11) .php-cs-fixer.dist.php (single_line_comment_spacing)
      ---------- begin diff ----------
--- /Users/tfidry/Project/Humbug/php-scoper/.php-cs-fixer.dist.php
+++ /Users/tfidry/Project/Humbug/php-scoper/.php-cs-fixer.dist.php
@@ -47,7 +47,7 @@
     ],
     'mb_str_functions' => false,
     'no_unneeded_control_parentheses' => false,
-    //'yoda_style' => false,
+    // 'yoda_style' => false,
 ];

(see the first line).

@theofidry
Copy link
Member Author

@Wirone is there any reason why this is shown in verbose mode? I struggle to see a case where you would not want that.

@theofidry theofidry merged commit c7c88ae into humbug:main Jan 10, 2026
185 checks passed
@theofidry theofidry deleted the build/php-cs-fixer-verbose branch January 10, 2026 12:07
@Wirone
Copy link
Contributor

Wirone commented Jan 10, 2026

@theofidry it was like that before I joined, so maybe @keradus can share more info. From my understanding when you want --diff, you do not necessarily want to know the reason for the diff, but only the final result, hence the --verbose as an additional flag for even more details. But yeah, in the past I also had some doubts about it 😊.

@theofidry
Copy link
Member Author

Honestly even the --diff during --dry-run is dubious to me.

It seems much more common and the expected behaviour when first using the too to:

  • know what is causing the change
  • what the change is

Caring only about whether there is a change without the cause or what the change is, is a much more narrow use case IMO for which a --quiet flag would do just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants