Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Runtime] fix tests#60376

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:6.4fromxabbuh:pr-60360
May 8, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix tests
Since#60076 using a closure as the command code that does not return aninteger is deprecated. This means that our tests can trigger deprecationson older branches when the high deps job is run. This usually is not anissue as we silence them with the `SYMFONY_DEPRECATIONS_HELPER` env var.However, phpt tests are run in a child process where the deprecation errorhandler of the PHPUnit bridge doesn't step in. Thus, for them deprecationsare not silenced leading to failures.
  • Loading branch information
@xabbuh
xabbuh committedMay 7, 2025
commit0b3d980d553552fe9c010e0db5d1a1237af0c8f9
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -18,8 +18,10 @@

return function (array $context) {
$command = new Command('go');
$command->setCode(function (InputInterface $input, OutputInterface $output) use ($context) {
$command->setCode(function (InputInterface $input, OutputInterface $output) use ($context): int {
$output->write('OK Application '.$context['SOME_VAR']);

return 0;
});

$app = new Application();
Expand Down
4 changes: 3 additions & 1 deletionsrc/Symfony/Component/Runtime/Tests/phpt/command.php
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,7 +19,9 @@
return function (Command $command, InputInterface $input, OutputInterface $output, array $context) {
$command->addOption('hello', 'e', InputOption::VALUE_REQUIRED, 'How should I greet?', 'OK');

return $command->setCode(function () use ($input, $output, $context) {
return $command->setCode(function () use ($input, $output, $context): int {
$output->write($input->getOption('hello').' Command '.$context['SOME_VAR']);

return 0;
});
};
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,6 +20,8 @@

require __DIR__.'/autoload.php';

return static fn (Command $command, OutputInterface $output, array $context): Command => $command->setCode(static function () use ($output, $context):void {
return static fn (Command $command, OutputInterface $output, array $context): Command => $command->setCode(static function () use ($output, $context):int {
$output->writeln($context['DEBUG_ENABLED']);

return 0;
});
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,6 +20,8 @@

require __DIR__.'/autoload.php';

return static fn (Command $command, OutputInterface $output, array $context): Command => $command->setCode(static function () use ($output, $context):void {
return static fn (Command $command, OutputInterface $output, array $context): Command => $command->setCode(static function () use ($output, $context):int {
$output->writeln($context['DEBUG_MODE']);

return 0;
});
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,6 +20,8 @@

require __DIR__.'/autoload.php';

return static fn (Command $command, OutputInterface $output, array $context): Command => $command->setCode(static function () use ($output, $context):void {
return static fn (Command $command, OutputInterface $output, array $context): Command => $command->setCode(static function () use ($output, $context):int {
$output->writeln($context['ENV_MODE']);

return 0;
});
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,6 +19,8 @@

require __DIR__.'/autoload.php';

return static fn (Command $command, OutputInterface $output, array $context): Command => $command->setCode(static function () use ($output, $context):void {
return static fn (Command $command, OutputInterface $output, array $context): Command => $command->setCode(static function () use ($output, $context):int {
$output->writeln($context['DEBUG_ENABLED']);

return 0;
});
Loading

[8]ページ先頭

©2009-2025 Movatter.jp