From 988eda801432acc7a2d2a19b1134effb848f95dc Mon Sep 17 00:00:00 2001 From: Jan Klan Date: Thu, 20 Mar 2025 09:58:47 +1030 Subject: [PATCH] Deprecate customiseFunction instead of renaming it straight away --- .../ORM/Query/AST/Functions/BaseFunction.php | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunction.php b/src/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunction.php index f5ed3783..ca045e36 100644 --- a/src/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunction.php +++ b/src/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunction.php @@ -31,7 +31,28 @@ abstract class BaseFunction extends FunctionNode */ protected array $nodes = []; - abstract protected function customizeFunction(): void; + /** + * This method is meant for internal use only, and it is not suggested that the forks of the library depend on it. + * It will be made abstract from version 3.0. + * + * @internal + * + * @see customiseFunction() + */ + /* abstract */ + protected function customizeFunction(): void + { + // Void + } + + /** + * @deprecated + */ + protected function customiseFunction(): void + { + \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); + $this->customizeFunction(); + } protected function setFunctionPrototype(string $functionPrototype): void {