From bb09b55d2f5a698830846b8d8947ebaaa251d691 Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Fri, 5 Jun 2020 17:54:05 -0700 Subject: [PATCH] Deprecate ArrayStatement and ResultCacheStatement --- UPGRADE.md | 4 ++++ lib/Doctrine/DBAL/Cache/ArrayStatement.php | 3 +++ lib/Doctrine/DBAL/Cache/ResultCacheStatement.php | 2 ++ 3 files changed, 9 insertions(+) diff --git a/UPGRADE.md b/UPGRADE.md index 5485f61d2bc..2d1f52303a6 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -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. diff --git a/lib/Doctrine/DBAL/Cache/ArrayStatement.php b/lib/Doctrine/DBAL/Cache/ArrayStatement.php index 98d545727f5..58d0a59e361 100644 --- a/lib/Doctrine/DBAL/Cache/ArrayStatement.php +++ b/lib/Doctrine/DBAL/Cache/ArrayStatement.php @@ -16,6 +16,9 @@ use function count; use function reset; +/** + * @deprecated + */ class ArrayStatement implements IteratorAggregate, ResultStatement, Result { /** @var mixed[] */ diff --git a/lib/Doctrine/DBAL/Cache/ResultCacheStatement.php b/lib/Doctrine/DBAL/Cache/ResultCacheStatement.php index 79151279aad..d990b15fefd 100644 --- a/lib/Doctrine/DBAL/Cache/ResultCacheStatement.php +++ b/lib/Doctrine/DBAL/Cache/ResultCacheStatement.php @@ -32,6 +32,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 {