From 746ca3e789868c194a601a5e1409f359f740e444 Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Sun, 7 Mar 2021 00:59:51 +0100 Subject: [PATCH] [GH-3316] Deprecate Configuration::get/setFilterSchemaAssetsExpression(). --- lib/Doctrine/DBAL/Configuration.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/Doctrine/DBAL/Configuration.php b/lib/Doctrine/DBAL/Configuration.php index f3131695729..ba288f339fe 100644 --- a/lib/Doctrine/DBAL/Configuration.php +++ b/lib/Doctrine/DBAL/Configuration.php @@ -5,6 +5,7 @@ use Doctrine\Common\Cache\Cache; use Doctrine\DBAL\Logging\SQLLogger; use Doctrine\DBAL\Schema\AbstractAsset; +use Doctrine\Deprecations\Deprecation; use function preg_match; @@ -79,6 +80,12 @@ public function setResultCacheImpl(Cache $cacheImpl) */ public function setFilterSchemaAssetsExpression($filterExpression) { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/3316', + 'Configuration::setFilterSchemaAssetsExpression() is deprecated, use setSchemaAssetsFilter() instead.' + ); + $this->_attributes['filterSchemaAssetsExpression'] = $filterExpression; if ($filterExpression) { $this->_attributes['filterSchemaAssetsExpressionCallable'] @@ -97,6 +104,12 @@ public function setFilterSchemaAssetsExpression($filterExpression) */ public function getFilterSchemaAssetsExpression() { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/3316', + 'Configuration::getFilterSchemaAssetsExpression() is deprecated, use getSchemaAssetsFilter() instead.' + ); + return $this->_attributes['filterSchemaAssetsExpression'] ?? null; }