Skip to content

Commit

Permalink
Make test suite pass with PHP 8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Dec 8, 2021
1 parent 512dcd1 commit e0d3d7a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions test/test.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<?php namespace xp;

class Failed extends \Exception {
use AllowDynamicProperties, Exception;

}

class Error extends \Exception {
class Failed extends Exception { }

}
class Error extends Exception { }

class Test {

Expand Down Expand Up @@ -85,6 +83,7 @@ public function run($tests) {
}
}

#[AllowDynamicProperties]
class Run {
private $definition, $closure;

Expand All @@ -96,7 +95,7 @@ public function __construct($definition, $closure) {
public function process($key, $args= []) {
$key= '@'.$key;
if (isset($this->definition[$key])) {
return call_user_func_array($this->definition[$key]->bindTo($this), $args);
return $this->definition[$key]->bindTo($this)(...$args);
}
}

Expand Down

0 comments on commit e0d3d7a

Please sign in to comment.