mirror of
https://github.com/dg/dibi.git
synced 2025-08-16 19:14:17 +02:00
Strict: extension methods are deprecated
This commit is contained in:
@@ -148,12 +148,3 @@ Assert::exception(function () {
|
||||
}, LogicException::class, 'Attempt to unset undeclared property TestClass::$undeclared.');
|
||||
|
||||
Assert::false(isset($obj->undeclared));
|
||||
|
||||
|
||||
// extension method
|
||||
TestClass::extensionMethod('join', $func = function (TestClass $that, $separator) {
|
||||
return $that->foo . $separator . $that->bar;
|
||||
});
|
||||
|
||||
$obj = new TestClass;
|
||||
Assert::same('456*123', $obj->join('*'));
|
||||
|
Reference in New Issue
Block a user