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 the usage of the legacy platforms and drivers #3905

Merged
merged 1 commit into from
Mar 18, 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
18 changes: 18 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Upgrade to 2.11

## Deprecated database platforms:

1. PostgreSQL 9.3 and older
2. MariaDB 10.0 and older
3. SQL Server 2008 and older
4. SQL Anywhere 12 and older
5. Drizzle
6. Azure SQL Database

## Deprecated database drivers:

1. PDO-based IBM DB2 driver
2. Drizzle MySQL driver

## Deprecated `Doctrine\DBAL\Sharding` package

The sharding functionality in DBAL has been effectively unmaintained for a long time.

## Deprecated `Doctrine\DBAL\Version` class

The usage of the `Doctrine\DBAL\Version` class is deprecated as internal implementation detail. Please refrain from checking the DBAL version at runtime.
Expand Down
21 changes: 10 additions & 11 deletions docs/en/reference/platforms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,25 +50,25 @@ Oracle
Microsoft SQL Server
^^^^^^^^^^^^^^^^^^^^

- ``SQLServerPlatform`` for version 2000 and above.
- ``SQLServer2005Platform`` for version 2005 and above.
- ``SQLServer2008Platform`` for version 2008 and above.
- ``SQLServerPlatform`` for version 2000 and above (deprecated).
- ``SQLServer2005Platform`` for version 2005 and above (deprecated).
- ``SQLServer2008Platform`` for version 2008 and above (deprecated).
- ``SQLServer2012Platform`` for version 2012 and above.

PostgreSQL
^^^^^^^^^^

- ``PostgreSqlPlatform`` for all versions.
- ``PostgreSQL91Platform`` for version 9.1 and above.
- ``PostgreSQL92Platform`` for version 9.2 and above.
- ``PostgreSqlPlatform`` for version 9.0 and below (deprecated).
- ``PostgreSQL91Platform`` for version 9.1 and above (deprecated).
- ``PostgreSQL92Platform`` for version 9.2 and above (deprecated).
- ``PostgreSQL94Platform`` for version 9.4 and above.

SAP Sybase SQL Anywhere
^^^^^^^^^^^^^^^^^^^^^^^

- ``SQLAnywherePlatform`` for version 10 and above.
- ``SQLAnywhere11Platform`` for version 11 and above.
- ``SQLAnywhere12Platform`` for version 12 and above.
- ``SQLAnywherePlatform`` for version 10 and above (deprecated).
- ``SQLAnywhere11Platform`` for version 11 and above (deprecated).
- ``SQLAnywhere12Platform`` for version 12 and above (deprecated).
- ``SQLAnywhere16Platform`` for version 16 and above.

SQLite
Expand All @@ -79,7 +79,7 @@ SQLite
Drizzle
^^^^^^

- ``DrizzlePlatform`` for all versions.
- ``DrizzlePlatform`` for all versions (deprecated).

It is highly encouraged to use the platform class that matches your
database vendor and version best. Otherwise it is not guaranteed
Expand Down Expand Up @@ -113,4 +113,3 @@ all the different database vendors, for example MySQL BIGINT and
Oracle NUMBER should be handled as integer. Doctrine 2 offers a
powerful way to abstract the database to php and back conversion,
which is described in the next section.

3 changes: 3 additions & 0 deletions lib/Doctrine/DBAL/Driver/DrizzlePDOMySql/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
use Doctrine\DBAL\Driver\PDOConnection;
use Doctrine\DBAL\ParameterType;

/**
* @deprecated
*/
class Connection extends PDOConnection
{
/**
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Driver/DrizzlePDOMySql/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

/**
* Drizzle driver using PDO MySql.
*
* @deprecated
*/
class Driver extends \Doctrine\DBAL\Driver\PDOMySql\Driver
{
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Driver/PDOIbm/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

/**
* Driver for the PDO IBM extension.
*
* @deprecated Use the driver based on the ibm_db2 extension instead.
*/
class Driver extends AbstractDB2Driver
{
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

/**
* Drizzle platform
*
* @deprecated
*/
class DrizzlePlatform extends AbstractPlatform
{
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Platforms/PostgreSQL91Platform.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

/**
* Provides the behavior, features and SQL dialect of the PostgreSQL 9.1 database platform.
*
* @deprecated Use PostgreSQL 9.4 or newer
*/
class PostgreSQL91Platform extends PostgreSqlPlatform
{
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Platforms/PostgreSQL92Platform.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

/**
* Provides the behavior, features and SQL dialect of the PostgreSQL 9.2 database platform.
*
* @deprecated Use PostgreSQL 9.4 or newer
*/
class PostgreSQL92Platform extends PostgreSQL91Platform
{
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
/**
* PostgreSqlPlatform.
*
* @deprecated Use PostgreSQL 9.4 or newer
*
* @todo Rename: PostgreSQLPlatform
*/
class PostgreSqlPlatform extends AbstractPlatform
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Platforms/SQLAnywhere11Platform.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
/**
* The SQLAnywhere11Platform provides the behavior, features and SQL dialect of the
* SAP Sybase SQL Anywhere 11 database platform.
*
* @deprecated Use SQLAnywhere 16 or newer
*/
class SQLAnywhere11Platform extends SQLAnywherePlatform
{
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Platforms/SQLAnywhere12Platform.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
/**
* The SQLAnywhere12Platform provides the behavior, features and SQL dialect of the
* SAP Sybase SQL Anywhere 12 database platform.
*
* @deprecated Use SQLAnywhere 16 or newer
*/
class SQLAnywhere12Platform extends SQLAnywhere11Platform
{
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
/**
* The SQLAnywherePlatform provides the behavior, features and SQL dialect of the
* SAP Sybase SQL Anywhere 10 database platform.
*
* @deprecated Use SQLAnywhere 16 or newer
*/
class SQLAnywherePlatform extends AbstractPlatform
{
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Platforms/SQLAzurePlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
* On top of SQL Server 2008 the following functionality is added:
*
* - Create tables with the FEDERATED ON syntax.
*
* @deprecated
*/
class SQLAzurePlatform extends SQLServer2008Platform
{
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Platforms/SQLServer2005Platform.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
* NVARCHAR(max) replace the old TEXT, NTEXT and IMAGE types. See
* {@link http://www.sql-server-helper.com/faq/sql-server-2005-varchar-max-p01.aspx}
* for more information.
*
* @deprecated Use SQL Server 2012 or newer
*/
class SQLServer2005Platform extends SQLServerPlatform
{
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Platforms/SQLServer2008Platform.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
*
* Differences to SQL Server 2005 and before are that a new DATETIME2 type was
* introduced that has a higher precision.
*
* @deprecated Use SQL Server 2012 or newer
*/
class SQLServer2008Platform extends SQLServer2005Platform
{
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
/**
* The SQLServerPlatform provides the behavior, features and SQL dialect of the
* Microsoft SQL Server database platform.
*
* @deprecated Use SQL Server 2012 or newer
*/
class SQLServerPlatform extends AbstractPlatform
{
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Sharding/PoolingShardConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
*
* Instantiation through the DriverManager looks like:
*
* @deprecated
*
* @example
*
* $conn = DriverManager::getConnection(array(
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Sharding/PoolingShardManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

/**
* Shard Manager for the Connection Pooling Shard Strategy
*
* @deprecated
*/
class PoolingShardManager implements ShardManager
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
* by partitioning the passed schema into subschemas for the federation and the
* global database and then applying the operations step by step using the
* {@see \Doctrine\DBAL\Schema\Synchronizer\SingleDatabaseSynchronizer}.
*
* @deprecated
*/
class SQLAzureFederationsSynchronizer extends AbstractSchemaSynchronizer
{
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Sharding/SQLAzure/SQLAzureShardManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

/**
* Sharding using the SQL Azure Federations support.
*
* @deprecated
*/
class SQLAzureShardManager implements ShardManager
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
* (otherwise they will affect the same-id rows from other tenants as well).
* SQLAzure throws errors when you try to create IDENTIY columns on federated
* tables.
*
* @deprecated
*/
class MultiTenantVisitor implements Visitor
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
/**
* The MultiTenant Shard choser assumes that the distribution value directly
* maps to the shard id.
*
* @deprecated
*/
class MultiTenantShardChoser implements ShardChoser
{
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Sharding/ShardChoser/ShardChoser.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
/**
* Given a distribution value this shard-choser strategy will pick the shard to
* connect to for retrieving rows with the distribution value.
*
* @deprecated
*/
interface ShardChoser
{
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Sharding/ShardManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
* executed against the last shard that was selected. If a query is created for
* a shard Y but then a shard X is selected when its actually executed you
* will hit the wrong shard.
*
* @deprecated
*/
interface ShardManager
{
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Sharding/ShardingException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

/**
* Sharding related Exceptions
*
* @deprecated
*/
class ShardingException extends DBALException
{
Expand Down