Skip to content

Commit 1ed1d80

Browse files
Sweetchuckgreg-1-anderson
authored andcommitted
Issue #1135 - PHP 8.2 - Fix Use of "self" in callables is deprecated (#1136)
1 parent 5a0072e commit 1ed1d80

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

src/Common/CommandArguments.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function args($args)
4040
if (!is_array($args)) {
4141
$args = $func_args;
4242
}
43-
$this->arguments .= ' ' . implode(' ', array_map(static::class . '::escape', $args));
43+
$this->arguments .= ' ' . implode(' ', array_map([static::class, 'escape'], $args));
4444
return $this;
4545
}
4646

tests/phpunit/Task/ExecTest.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
namespace phpunit\Task;
4+
5+
use PHPUnit\Framework\TestCase;
6+
7+
class ExecTest extends TestCase
8+
{
9+
10+
// tests
11+
public function testBasicCommand()
12+
{
13+
$this->assertSame(
14+
'ls',
15+
(new \Robo\Task\Base\Exec('ls'))
16+
->getCommand()
17+
);
18+
}
19+
}

0 commit comments

Comments
 (0)