Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate Driver::getDatabase() #4068

Merged
merged 1 commit into from
Jun 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Upgrade to 2.11

## Deprecated `Doctrine\DBAL\Driver::getDatabase()`

- The usage of `Doctrine\DBAL\Driver::getDatabase()` is deprecated. Please use `Doctrine\DBAL\Connection::getDatabase()` instead.
- The behavior of the SQLite connection returning the database file path as the database is deprecated and shouldn't be relied upon.

## Deprecated `Portability\Connection::PORTABILITY_{PLATFORM}` constants`

The platform-specific portability mode flags are meant to be used only by the portability layer internally to optimize
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public function getName();
/**
* Gets the name of the database connected to for this driver.
*
* @deprecated Use Connection::getDatabase() instead.
*
* @return string The name of the database.
*/
public function getDatabase(Connection $conn);
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Driver/AbstractDB2Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ abstract class AbstractDB2Driver implements Driver
{
/**
* {@inheritdoc}
*
* @deprecated Use Connection::getDatabase() instead.
*/
public function getDatabase(Connection $conn)
{
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ private function getMariaDbMysqlVersionNumber(string $versionString): string

/**
* {@inheritdoc}
*
* @deprecated Use Connection::getDatabase() instead.
*/
public function getDatabase(Connection $conn)
{
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Driver/AbstractOracleDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ public function convertException($message, DriverException $exception)

/**
* {@inheritdoc}
*
* @deprecated Use Connection::getDatabase() instead.
*/
public function getDatabase(Connection $conn)
{
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ public function createDatabasePlatformForVersion($version)

/**
* {@inheritdoc}
*
* @deprecated Use Connection::getDatabase() instead.
*/
public function getDatabase(Connection $conn)
{
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Driver/AbstractSQLAnywhereDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ public function createDatabasePlatformForVersion($version)

/**
* {@inheritdoc}
*
* @deprecated Use Connection::getDatabase() instead.
*/
public function getDatabase(Connection $conn)
{
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Driver/AbstractSQLServerDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ public function createDatabasePlatformForVersion($version)

/**
* {@inheritdoc}
*
* @deprecated Use Connection::getDatabase() instead.
*/
public function getDatabase(Connection $conn)
{
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Driver/AbstractSQLiteDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ public function convertException($message, DriverException $exception)

/**
* {@inheritdoc}
*
* @deprecated Use Connection::getDatabase() instead.
*/
public function getDatabase(Connection $conn)
{
Expand Down