Skip to content

Commit

Permalink
[doctrineGH-3316] Deprecate Configuration::get/setFilterSchemaAssetsE…
Browse files Browse the repository at this point in the history
…xpression().
  • Loading branch information
beberlei committed Mar 22, 2021
1 parent 1f0e193 commit 746ca3e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/Doctrine/DBAL/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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']
Expand All @@ -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;
}

Expand Down

0 comments on commit 746ca3e

Please sign in to comment.