diff --git a/UPGRADE.md b/UPGRADE.md index 31d3fd94955..bf079383657 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,5 +1,9 @@ # Upgrade to 2.9 +## Deprecated `Configuration::getFilterSchemaAssetsExpression()`, `::setFilterSchemaAssetsExpression()` and `AbstractSchemaManager::getFilterSchemaAssetsExpression()`. + +Regular expression-based filters are hard to extend by combining together. Instead, you may use callback-based filers via `::getSchemaAssetsFilter()` and `::getSchemaAssetsFilter()`. Callbacks can use regular expressions internally. + ## Deprecated `Doctrine\DBAL\Types\Type::getDefaultLength()` This method was never used by DBAL internally. It is now deprecated and will be removed in DBAL 3.0. diff --git a/lib/Doctrine/DBAL/Configuration.php b/lib/Doctrine/DBAL/Configuration.php index 0e34e87dcea..9b7b21fb21e 100644 --- a/lib/Doctrine/DBAL/Configuration.php +++ b/lib/Doctrine/DBAL/Configuration.php @@ -70,6 +70,8 @@ public function setResultCacheImpl(Cache $cacheImpl) * schema instances generated for the active connection when calling * {AbstractSchemaManager#createSchema()}. * + * @deprecated Use Configuration::setSchemaAssetsFilter() instead + * * @param string $filterExpression * * @return void @@ -87,6 +89,8 @@ public function setFilterSchemaAssetsExpression($filterExpression) /** * Returns filter schema assets expression. * + * @deprecated Use Configuration::getSchemaAssetsFilter() instead + * * @return string|null */ public function getFilterSchemaAssetsExpression() diff --git a/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php b/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php index 0858e6771f1..06ee2c2b2aa 100644 --- a/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php @@ -228,6 +228,8 @@ protected function filterAssetNames($assetNames) } /** + * @deprecated Use Configuration::getSchemaAssetsFilter() instead + * * @return string|null */ protected function getFilterSchemaAssetsExpression()