From 2dba981a4e3ac1fc0a36a01cef32a095494f21df Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Sun, 7 Mar 2021 10:51:04 +0100 Subject: [PATCH] [GH-4049] Trigger deprecation message for Statement::closeCursor --- lib/Doctrine/DBAL/Statement.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/Doctrine/DBAL/Statement.php b/lib/Doctrine/DBAL/Statement.php index c11adbd280d..f6f6ca5e726 100644 --- a/lib/Doctrine/DBAL/Statement.php +++ b/lib/Doctrine/DBAL/Statement.php @@ -190,6 +190,12 @@ public function execute($params = null) */ public function closeCursor() { + Deprecation::triggerIfCalledFromOutside( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/4049', + 'Statement::closeCursor() is deprecated, use Result::free() instead.' + ); + return $this->stmt->closeCursor(); }