1
0
mirror of https://github.com/dg/dibi.git synced 2025-03-13 19:00:05 +01:00

DateTime::modifyClone() is deprecated (BC break)

This commit is contained in:
David Grudl 2018-03-23 12:24:40 +01:00
parent 2dec5618a6
commit 5ad6cc1171

View File

@ -32,8 +32,10 @@ class DateTime extends \DateTimeImmutable
}
/** @deprecated use modify() */
public function modifyClone(string $modify = ''): self
{
trigger_error(__METHOD__ . '() is deprecated, use modify()', E_USER_DEPRECATED);
$dolly = clone $this;
return $modify ? $dolly->modify($modify) : $dolly;
}