From e7cc1bdada49730b7b57bd607020462ec21c76c9 Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Mon, 26 Nov 2018 18:18:32 -0800 Subject: [PATCH] Removed DataAccessTest::testFetchColumnNonExistingIndex() since it covers a bug in PDO --- UPGRADE.md | 4 ++++ .../Tests/DBAL/Functional/DataAccessTest.php | 16 ---------------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/UPGRADE.md b/UPGRADE.md index bf07938365..53bf9420dd 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,5 +1,9 @@ # Upgrade to 2.9 +## Deprecated `Statement::fetchColumn()` with an invalid index + +Calls to `Statement::fetchColumn()` with an invalid column index currently return `NULL`. In the future, such calls will result in a exception. + ## 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. diff --git a/tests/Doctrine/Tests/DBAL/Functional/DataAccessTest.php b/tests/Doctrine/Tests/DBAL/Functional/DataAccessTest.php index 581a053887..016ef6aa08 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/DataAccessTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/DataAccessTest.php @@ -888,22 +888,6 @@ public function testFetchColumnNullValue() ); } - /** - * @group DBAL-1028 - */ - public function testFetchColumnNonExistingIndex() - { - if ($this->connection->getDriver()->getName() === 'pdo_sqlsrv') { - $this->markTestSkipped( - 'Test does not work for pdo_sqlsrv driver as it throws a fatal error for a non-existing column index.' - ); - } - - self::assertNull( - $this->connection->fetchColumn('SELECT test_int FROM fetch_table WHERE test_int = ?', [1], 1) - ); - } - /** * @group DBAL-1028 */