@@ -78,9 +78,7 @@ protected function commandBody(InputInterface $input, OutputInterface $output):
7878 $ stubCommand ->run (new ArrayInput ([]), $ output ->reveal ());
7979 }
8080
81- /**
82- * @dataProvider signalProvider
83- */
81+ #[\PHPUnit \Framework \Attributes \DataProvider('signalProvider ' )]
8482 public function testReceiveSignalDuringCommandBody (int $ signal ): void
8583 {
8684 $ stubCommand = new class ($ signal ) extends AbstractTerminableCommand {
@@ -112,17 +110,15 @@ protected function commandBody(InputInterface $input, OutputInterface $output):
112110 $ this ->assertSame (143 , $ exitCode );
113111 }
114112
115- /**
116- * @dataProvider signalProvider
117- */
113+ #[\PHPUnit \Framework \Attributes \DataProvider('signalProvider ' )]
118114 public function testReceiveSignalBeforeCommandBody (int $ signal ): void
119115 {
120116 $ stubCommand = $ this ->createStubTerminableCommand ();
121117
122118 $ output = $ this ->prophesize (OutputInterface::class);
123119 $ output ->writeln (Argument::containingString ('Starting ' ), OutputInterface::VERBOSITY_VERBOSE )
124120 ->shouldBeCalledTimes (1 )
125- ->will (function () use ($ stubCommand , $ signal ) {
121+ ->will (function () use ($ stubCommand , $ signal ): void {
126122 $ stubCommand ->handleSignal ($ signal );
127123 });
128124 $ output ->writeln ('Signal received, skipping execution ' , OutputInterface::VERBOSITY_NORMAL )
@@ -133,9 +129,7 @@ public function testReceiveSignalBeforeCommandBody(int $signal): void
133129 $ this ->assertSame (143 , $ exitCode );
134130 }
135131
136- /**
137- * @dataProvider signalProvider
138- */
132+ #[\PHPUnit \Framework \Attributes \DataProvider('signalProvider ' )]
139133 public function testGetSubscribedSignals (int $ signal ): void
140134 {
141135 $ stubCommand = $ this ->createStubTerminableCommand ();
@@ -146,7 +140,7 @@ public function testGetSubscribedSignals(int $signal): void
146140 /**
147141 * @return array{0: int}[]
148142 */
149- public function signalProvider (): array
143+ public static function signalProvider (): array
150144 {
151145 return [
152146 [SIGINT ],
0 commit comments