From 012384c6375fe8bebdcb586864cf054a7a64c6be Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 20 Nov 2025 17:41:31 +0000 Subject: [PATCH 1/2] Update actions/checkout action to v6 --- .github/workflows/test-php.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-php.yml b/.github/workflows/test-php.yml index cc137d2..f115372 100644 --- a/.github/workflows/test-php.yml +++ b/.github/workflows/test-php.yml @@ -19,7 +19,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Cache Composer dependencies uses: actions/cache@v4 From 6111901bfbf73201e73980739bbc8d8f92d007f9 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Tue, 25 Nov 2025 16:55:12 +1100 Subject: [PATCH 2/2] Added DrevOps coding standards and fixed violations. --- composer.json | 7 ++++--- phpcs.xml | 1 + .../Printer/PrinterProgressFail.php | 9 +++++---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 53a973d..e1b90f0 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,8 @@ "rector/rector": "^2", "squizlabs/php_codesniffer": "^3", "symfony/process": "^6 || ^7.0", - "drupal/coder": "^8.3" + "drupal/coder": "^8.3", + "drevops/phpcs-standard": "^0.6" }, "autoload": { "psr-0": { @@ -46,10 +47,10 @@ "lint": [ "phpcs", "phpstan", - "rector --clear-cache --dry-run" + "rector --dry-run" ], "lint-fix": [ - "rector --clear-cache", + "rector", "phpcbf" ], "reset": "rm -Rf vendor vendor-bin composer.lock", diff --git a/phpcs.xml b/phpcs.xml index df8192d..ad7215e 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -6,6 +6,7 @@ + diff --git a/src/DrevOps/BehatFormatProgressFail/Printer/PrinterProgressFail.php b/src/DrevOps/BehatFormatProgressFail/Printer/PrinterProgressFail.php index 5bf88d7..c60a06e 100644 --- a/src/DrevOps/BehatFormatProgressFail/Printer/PrinterProgressFail.php +++ b/src/DrevOps/BehatFormatProgressFail/Printer/PrinterProgressFail.php @@ -4,6 +4,7 @@ namespace DrevOps\BehatFormatProgressFail\Printer; +use Behat\Gherkin\Node\ArgumentInterface; use Behat\Behat\Definition\Call\DefinitionCall; use Behat\Behat\Output\Node\Printer\Helper\ResultToStringConverter; use Behat\Behat\Output\Node\Printer\StepPrinter; @@ -83,17 +84,17 @@ protected function printFailure(StepResult $result, StepNode $step): string { $feature = $call->getFeature(); $file_name = $this->relativizePaths($feature->getFile() ?? ''); } - $fileLine = $step->getLine(); + $file_line = $step->getLine(); $output .= PHP_EOL; $output .= sprintf('{+%s}--- FAIL ---{-%s}', $style, $style); $output .= PHP_EOL; - $output .= sprintf(sprintf(' {+%s}%%s %%s{-%s} {+comment}# (%%s):%%s{-comment}', $style, $style), $step->getKeyword(), $step->getText(), $file_name, $fileLine); + $output .= sprintf(sprintf(' {+%s}%%s %%s{-%s} {+comment}# (%%s):%%s{-comment}', $style, $style), $step->getKeyword(), $step->getText(), $file_name, $file_line); $output .= PHP_EOL; $step_arguments = $step->getArguments(); - $step_arguments = array_map(static function ($item) { + $step_arguments = array_map(static function (ArgumentInterface $item) { if (method_exists($item, '__toString')) { return $item->__toString(); } @@ -138,7 +139,7 @@ protected function printStdOut(OutputPrinter $printer, StepResult $result): void } $printer->writeln("\n" . $step_definition->getPath() . ':'); - $pad = function ($line): string { + $pad = function (string $line): string { return sprintf(' | {+stdout}%s{-stdout}', $line); };