Skip to content

Commit

Permalink
Merge pull request #3316 from morozov/deprecate-filter-expressions
Browse files Browse the repository at this point in the history
Deprecated regex-based asset filters
  • Loading branch information
morozov authored Oct 6, 2018
2 parents 18a8040 + 111e42d commit 82fd5d6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 4 additions & 0 deletions lib/Doctrine/DBAL/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -87,6 +89,8 @@ public function setFilterSchemaAssetsExpression($filterExpression)
/**
* Returns filter schema assets expression.
*
* @deprecated Use Configuration::getSchemaAssetsFilter() instead
*
* @return string|null
*/
public function getFilterSchemaAssetsExpression()
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ protected function filterAssetNames($assetNames)
}

/**
* @deprecated Use Configuration::getSchemaAssetsFilter() instead
*
* @return string|null
*/
protected function getFilterSchemaAssetsExpression()
Expand Down

0 comments on commit 82fd5d6

Please sign in to comment.