Skip to content

Commit

Permalink
Issue #1135 - PHP 8.2 - Fix Use of "self" in callables is deprecated (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Sweetchuck authored and greg-1-anderson committed Apr 30, 2023
1 parent 5a0072e commit 1ed1d80
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Common/CommandArguments.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function args($args)
if (!is_array($args)) {
$args = $func_args;
}
$this->arguments .= ' ' . implode(' ', array_map(static::class . '::escape', $args));
$this->arguments .= ' ' . implode(' ', array_map([static::class, 'escape'], $args));
return $this;
}

Expand Down
19 changes: 19 additions & 0 deletions tests/phpunit/Task/ExecTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

namespace phpunit\Task;

use PHPUnit\Framework\TestCase;

class ExecTest extends TestCase
{

// tests
public function testBasicCommand()
{
$this->assertSame(
'ls',
(new \Robo\Task\Base\Exec('ls'))
->getCommand()
);
}
}

0 comments on commit 1ed1d80

Please sign in to comment.