Skip to content

Commit 23dc2ea

Browse files
committed
[TASK] Add symfony/console 7.4.1 compatibility to CliCommandTest
With Symfony 7.4.1 a change was made on how interactive input was evaluated, and no longer failing on the CliCommandTest of TYPO3. This change adapts the test to not expect a failure, but instead accept a "success" exit code, by removing the interaction argument and using a "dry-run". The modification also revealed that passing args was missing a command substitution placeholder, which is now added the calls of: - referenceindex:update (--check) - cleanup:localprocessedfiles (-v) Resolves: #108423 Releases: main Change-Id: Ia302486782a2e151b4127af1c0fed075fa6aaf15 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/92038 Tested-by: Sven Liebert <[email protected]> Tested-by: Lina Wolf <[email protected]> Tested-by: Simon Schaufelberger <[email protected]> Reviewed-by: Lina Wolf <[email protected]> Reviewed-by: Simon Schaufelberger <[email protected]> Reviewed-by: Sven Liebert <[email protected]> Reviewed-by: Oliver Klee <[email protected]> Tested-by: Garvin Hicking <[email protected]> Tested-by: Christian Kuhn <[email protected]> Reviewed-by: Garvin Hicking <[email protected]> Tested-by: core-ci <[email protected]> Reviewed-by: Christian Kuhn <[email protected]>
1 parent 532aae2 commit 23dc2ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

typo3/sysext/core/Tests/Functional/Command/CliCommandTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public static function commandTestDataProvider(): array
6363
return [
6464
['command' => 'styleguide:generate tca', 'args' => [], 'expectedExitCode' => 0],
6565
['command' => 'styleguide:generate frontend', 'args' => [], 'expectedExitCode' => 0],
66-
['command' => 'cleanup:localprocessedfiles', 'args' => ['-v'], 'expectedExitCode' => 0],
66+
['command' => 'cleanup:localprocessedfiles %s', 'args' => ['-v'], 'expectedExitCode' => 0],
6767
['command' => 'cache:flush', 'args' => [], 'expectedExitCode' => 0],
6868
['command' => 'cache:warmup', 'args' => [], 'expectedExitCode' => 0],
6969
['command' => 'cleanup:flexforms', 'args' => [], 'expectedExitCode' => 0],
@@ -79,19 +79,19 @@ public static function commandTestDataProvider(): array
7979
['command' => 'mailer:spool:send', 'args' => [], 'expectedExitCode' => 1],
8080
['command' => 'redirects:checkintegrity', 'args' => [], 'expectedExitCode' => 0],
8181
['command' => 'redirects:cleanup', 'args' => [], 'expectedExitCode' => 0],
82-
['command' => 'referenceindex:update', 'args' => ['--check'], 'expectedExitCode' => 0],
82+
['command' => 'referenceindex:update %s', 'args' => ['--check'], 'expectedExitCode' => 0],
8383
['command' => 'scheduler:run', 'args' => [], 'expectedExitCode' => 0],
8484
['command' => 'site:list', 'args' => [], 'expectedExitCode' => 0],
8585
['command' => 'site:show show-me', 'args' => [], 'expectedExitCode' => 0],
8686
['command' => 'syslog:list', 'args' => [], 'expectedExitCode' => 0],
8787
['command' => 'upgrade:list', 'args' => [], 'expectedExitCode' => 0],
88+
['command' => 'install:password:set %s %s', 'args' => ['--no-interaction', '--dry-run'], 'expectedExitCode' => 0],
8889
// supported shells
8990
['command' => 'completion bash', 'args' => [], 'expectedExitCode' => 0],
9091
['command' => 'completion fish', 'args' => [], 'expectedExitCode' => 0],
9192
['command' => 'completion zsh', 'args' => [], 'expectedExitCode' => 0],
9293
// unsupported shell (not detected)
9394
['command' => 'completion', 'args' => [], 'expectedExitCode' => 2],
94-
['command' => 'install:password:set', 'args' => [], 'expectedExitCode' => 1],
9595
];
9696
}
9797

0 commit comments

Comments
 (0)