From a6c9b666ab3d53d5ec4cae654071c320afe7e740 Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Sun, 7 Mar 2021 00:10:35 +0100 Subject: [PATCH] [GH-3844] Add deprecation message for CompositeExpression::add/addMultiple --- lib/Doctrine/DBAL/Query/Expression/CompositeExpression.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/Doctrine/DBAL/Query/Expression/CompositeExpression.php b/lib/Doctrine/DBAL/Query/Expression/CompositeExpression.php index 596e9fb3afc..70721b15576 100644 --- a/lib/Doctrine/DBAL/Query/Expression/CompositeExpression.php +++ b/lib/Doctrine/DBAL/Query/Expression/CompositeExpression.php @@ -3,6 +3,7 @@ namespace Doctrine\DBAL\Query\Expression; use Countable; +use Doctrine\Deprecations\Deprecation; use function array_merge; use function count; @@ -97,6 +98,12 @@ public function addMultiple(array $parts = []) */ public function add($part) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/issues/3844', + 'CompositeExpression::add()/addMultiple() are deprecated, use CompositeExpression::with() instead.' + ); + if (empty($part)) { return $this; }