Skip to content

Commit 6981a74

Browse files
committed
Deprecate customiseFunction instead of renaming it straight away
1 parent 37be684 commit 6981a74

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunction.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,22 @@ abstract class BaseFunction extends FunctionNode
3131
*/
3232
protected array $nodes = [];
3333

34-
abstract protected function customizeFunction(): void;
34+
/**
35+
* TODO Make abstract when {@see customiseFunction()} is no more
36+
*/
37+
protected function customizeFunction(): void
38+
{
39+
// Void
40+
}
41+
42+
/**
43+
* @deprecated
44+
*/
45+
protected function customiseFunction(): void
46+
{
47+
trigger_error('Method '.__METHOD__.' was renamed to '.__CLASS__.'::customizeFunction().', E_USER_DEPRECATED);
48+
$this->customizeFunction();
49+
}
3550

3651
protected function setFunctionPrototype(string $functionPrototype): void
3752
{

0 commit comments

Comments
 (0)