Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP CS Fixer deprecated rules #193

Closed
llaville opened this issue Oct 6, 2023 · 1 comment
Closed

PHP CS Fixer deprecated rules #193

llaville opened this issue Oct 6, 2023 · 1 comment
Assignees

Comments

@llaville
Copy link
Collaborator

llaville commented Oct 6, 2023

Fix all deprecated rules with latest PHP-CS-Fixer version 3.34.x

@llaville llaville self-assigned this Oct 6, 2023
@llaville
Copy link
Collaborator Author

llaville commented Oct 6, 2023

composer check-style command actually prints following result with main branch (07eba9a)

PHP CS Fixer 3.34.1 BerSzcz Saturnalia by Fabien Potencier and Dariusz Ruminski.
PHP runtime: 8.1.24
Loaded config default from ".php-cs-fixer.dist.php".
..........................F..............
Warning: declare(encoding=...) ignored because Zend multibyte feature is turned off by settings in  on line 12
.....                                                                                    46 / 46 (100%)
Legend: .-no changes, F-fixed, S-skipped (cached or empty file), I-invalid file syntax (file ignored), E-error
   1) src/Extension/OutputFormat.php (binary_operator_spaces)
      ---------- begin diff ----------
--- /shared/backups/github/phplint/src/Extension/OutputFormat.php
+++ /shared/backups/github/phplint/src/Extension/OutputFormat.php
@@ -50,7 +50,7 @@

     public function initFormat(ConsoleCommandEvent $event): void
     {
-        $command= $event->getCommand();
+        $command = $event->getCommand();
         if (!$command instanceof LintCommand) {
             // this extension must be only available for lint command
             return;

      ----------- end diff -----------


Found 1 of 46 files that can be fixed in 0.824 seconds, 16.000 MB memory used

Detected deprecations in use:
- Rule "braces" is deprecated. Use "single_space_around_construct", "control_structure_braces", "control_structure_continuation_position", "declare_parentheses", "no_multiple_statements_per_line", "curly_braces_position", "statement_indentation" and "no_extra_blank_lines" instead.
- Rule "compact_nullable_typehint" is deprecated. Use "compact_nullable_type_declaration" instead.
- Rule "function_typehint_space" is deprecated. Use "type_declaration_spaces" instead.
- Rule "new_with_braces" is deprecated. Use "new_with_parentheses" instead.
Script vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php --using-cache=no --verbose --ansi --diff --dry-run handling the check-style event returned with error code 8

llaville added a commit that referenced this issue Oct 6, 2023
@llaville llaville closed this as completed Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant