Skip to content

Commit

Permalink
[doctrineGH-3844] Add deprecation message for CompositeExpression::ad…
Browse files Browse the repository at this point in the history
…d/addMultiple
  • Loading branch information
beberlei committed Mar 7, 2021
1 parent b80d236 commit a6c9b66
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/Doctrine/DBAL/Query/Expression/CompositeExpression.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Doctrine\DBAL\Query\Expression;

use Countable;
use Doctrine\Deprecations\Deprecation;

use function array_merge;
use function count;
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit a6c9b66

Please sign in to comment.