Skip to content

Commit

Permalink
Housekeeping fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
beberlei committed Sep 14, 2020
1 parent 9385110 commit 8510571
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function convertException($message, DeprecatedDriverException $exception)
return new TableExistsException($message, $exception);

case '08006':
return new Exception\ConnectionException($message, $exception);
return new ConnectionException($message, $exception);

case '7':
// Prior to fixing https://bugs.php.net/bug.php?id=64705 (PHP 7.3.22 and PHP 7.4.10),
Expand Down
6 changes: 3 additions & 3 deletions tests/Doctrine/Tests/DBAL/Functional/WriteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Doctrine\Tests\DBAL\Functional;

use DateTime;
use Doctrine\DBAL\Driver\LowLevelDriverException;
use Doctrine\DBAL\Driver\DriverException;
use Doctrine\DBAL\ParameterType;
use Doctrine\DBAL\Schema\Sequence;
use Doctrine\DBAL\Schema\Table;
Expand Down Expand Up @@ -369,13 +369,13 @@ public function testDeleteWhereIsNull(): void
*
* @return string|false
*
* @throws LowLevelDriverException
* @throws DriverException
*/
private function lastInsertId(?string $name = null)
{
try {
return $this->connection->lastInsertId($name);
} catch (LowLevelDriverException $e) {
} catch (DriverException $e) {
if ($e->getCode() === 'IM001') {
$this->markTestSkipped($e->getMessage());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public function testGeneratesForeignKeySqlOnlyWhenSupportingForeignKeys(): void
if ($this->platform->supportsForeignKeyConstraints()) {
self::assertIsString($this->platform->getCreateForeignKeySQL($fk, 'test'));
} else {
$this->expectException(Exception::class);
$this->expectException(DBALException::class);
$this->platform->getCreateForeignKeySQL($fk, 'test');
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Doctrine\Tests\DBAL\Platforms;

use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Platforms\SQLServer2012Platform;
use Doctrine\DBAL\Schema\Sequence;
Expand Down

0 comments on commit 8510571

Please sign in to comment.