Skip to content

Commit 988eda8

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

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

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

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

34-
abstract protected function customizeFunction(): void;
34+
/**
35+
* This method is meant for internal use only, and it is not suggested that the forks of the library depend on it.
36+
* It will be made abstract from version 3.0.
37+
*
38+
* @internal
39+
*
40+
* @see customiseFunction()
41+
*/
42+
/* abstract */
43+
protected function customizeFunction(): void
44+
{
45+
// Void
46+
}
47+
48+
/**
49+
* @deprecated
50+
*/
51+
protected function customiseFunction(): void
52+
{
53+
\trigger_error('The internal-use method of `customiseFunction()` is deprecated and is now renamed to `customizeFunction()`. `customiseFunction()` will be removed from version 3.0 onwards.', E_USER_DEPRECATED);
54+
$this->customizeFunction();
55+
}
3556

3657
protected function setFunctionPrototype(string $functionPrototype): void
3758
{

0 commit comments

Comments
 (0)