Skip to content

Commit

Permalink
Deprecate ArrayStatement and ResultCacheStatement
Browse files Browse the repository at this point in the history
  • Loading branch information
morozov committed Jun 6, 2020
1 parent af83b31 commit dd55d05
Show file tree
Hide file tree
Showing 3 changed files with 9 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.11

## Deprecated `ArrayStatement` and `ResultCacheStatement` classes.

The `ArrayStatement` and `ResultCacheStatement` classes are deprecated. In a future major release they will be renamed and marked internal as implementation details of the caching layer.

## Deprecated `ResultStatement` interface

1. The `ResultStatement` interface is deprecated. Use the `Driver\Result` and `Abstraction\Result` interfaces instead.
Expand Down
3 changes: 3 additions & 0 deletions lib/Doctrine/DBAL/Cache/ArrayStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
use function count;
use function reset;

/**
* @deprecated
*/
class ArrayStatement implements IteratorAggregate, ResultStatement, Result
{
/** @var mixed[] */
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Cache/ResultCacheStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
*
* Also you have to realize that the cache will load the whole result into memory at once to ensure 2.
* This means that the memory usage for cached results might increase by using this feature.
*
* @deprecated
*/
class ResultCacheStatement implements IteratorAggregate, ResultStatement, Result
{
Expand Down

0 comments on commit dd55d05

Please sign in to comment.