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

Drop support for legacy platforms #3055

Merged
merged 6 commits into from
Mar 18, 2018
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
15 changes: 0 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,21 +103,6 @@ jobs:
addons:
mariadb: 10.2

- stage: Test
php: 7.2
env: DB=pgsql POSTGRESQL_VERSION=9.2
services:
- postgresql
addons:
postgresql: "9.2"
- stage: Test
php: nightly
env: DB=pgsql POSTGRESQL_VERSION=9.2
services:
- postgresql
addons:
postgresql: "9.2"

- stage: Test
php: 7.2
env: DB=pgsql POSTGRESQL_VERSION=9.3
Expand Down
54 changes: 54 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,59 @@
# Upgrade to 3.0 (DEVELOP)

## BC BREAK: Removed MsSQLKeywords class

The `Doctrine\DBAL\Platforms\MsSQLKeywords` has been removed.
Please use `Doctrine\DBAL\Platforms\SQLServerPlatform `instead.

## BC BREAK: Removed PDO DB2 driver

This PDO-based IBM DB2 driver (built on top of pdo_ibm extension) has already been unsupported as of 2.5, it has now been now removed.

The following class has been removed:

* `Doctrine\DBAL\Driver\PDOIbm\Driver`

## BC BREAK: Removed support for SQL Anywhere 12 and older

DBAL now requires SQL Anywhere 16 or newer, support for unmaintained versions has been dropped.
If you are using any of the legacy versions, you have to upgrade to newer SQL Anywhere version (16+).
`Doctrine\DBAL\Platforms\SQLAnywherePlatform` and `Doctrine\DBAL\Platforms\Keywords\SQLAnywhereKeywords` now represent the SQL Anywhere 16.

The following classes have been removed:

* `Doctrine\DBAL\Platforms\SQLAnywhere11Platform`
* `Doctrine\DBAL\Platforms\SQLAnywhere12Platform`
* `Doctrine\DBAL\Platforms\SQLAnywhere16Platform`
* `Doctrine\DBAL\Platforms\Keywords\SQLAnywhere11Keywords`
* `Doctrine\DBAL\Platforms\Keywords\SQLAnywhere12Keywords`
* `Doctrine\DBAL\Platforms\Keywords\SQLAnywhere16Keywords`

## BC BREAK: Removed support for SQL Server 2005 and older

DBAL now requires SQL Server 2008 or newer, support for unmaintained versions has been dropped.
If you are using any of the legacy versions, you have to upgrade to newer SQL Server version (2012+ is recommended).
`Doctrine\DBAL\Platforms\SQLServerPlatform` and `Doctrine\DBAL\Platforms\Keywords\SQLServerKeywords` now represent the SQL Server 2008.

The following classes have been removed:

* `Doctrine\DBAL\Platforms\SQLServer2005Platform`
* `Doctrine\DBAL\Platforms\SQLServer2008Platform`
* `Doctrine\DBAL\Platforms\Keywords\SQLServer2005Keywords`
* `Doctrine\DBAL\Platforms\Keywords\SQLServer2008Keywords`

## BC BREAK: Removed support for PostgreSQL 9.2 and older

DBAL now requires PostgeSQL 9.3 or newer, support for unmaintained versions has been dropped.
If you are using any of the legacy versions, you have to upgrade to newer PostgreSQL version (9.6+ is recommended).
`Doctrine\DBAL\Platforms\PostgreSqlPlatform` and `Doctrine\DBAL\Platforms\Keywords\PostgreSQLKeywords` now represent the PostgreSQL 9.3.

The following classes have been removed:

* `Doctrine\DBAL\Platforms\PostgreSQL91Platform`
* `Doctrine\DBAL\Platforms\PostgreSQL92Platform`
* `Doctrine\DBAL\Platforms\Keywords\PostgreSQL91Keywords`
* `Doctrine\DBAL\Platforms\Keywords\PostgreSQL92Keywords`

## BC BREAK: Removed Doctrine\DBAL\Version

The Doctrine\DBAL\Version class is no longer available: please refrain from checking the DBAL version at runtime.
Expand Down
21 changes: 8 additions & 13 deletions docs/en/reference/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -230,20 +230,20 @@ pdo\_pgsql
- ``sslmode`` (string): Determines whether or with what priority
a SSL TCP/IP connection will be negotiated with the server.
See the list of available modes:
`http://www.postgresql.org/docs/9.1/static/libpq-connect.html#LIBPQ-CONNECT-SSLMODE`
`https://www.postgresql.org/docs/9.3/static/libpq-connect.html#LIBPQ-CONNECT-SSLMODE`
- ``sslrootcert`` (string): specifies the name of a file containing
SSL certificate authority (CA) certificate(s). If the file exists,
the server's certificate will be verified to be signed by one of these
authorities.
See http://www.postgresql.org/docs/9.0/static/libpq-connect.html#LIBPQ-CONNECT-SSLROOTCERT
See https://www.postgresql.org/docs/9.3/static/libpq-connect.html#LIBPQ-CONNECT-SSLROOTCERT
- ``sslcert`` (string): specifies the file name of the client SSL certificate.
See `https://www.postgresql.org/docs/9.1/static/libpq-connect.html#LIBPQ-CONNECT-SSLCERT`
See `https://www.postgresql.org/docs/9.3/static/libpq-connect.html#LIBPQ-CONNECT-SSLCERT`
- ``sslkey`` (string): specifies the location for the secret key used for the
client certificate.
See `https://www.postgresql.org/docs/9.1/static/libpq-connect.html#LIBPQ-CONNECT-SSLKEY`
See `https://www.postgresql.org/docs/9.3/static/libpq-connect.html#LIBPQ-CONNECT-SSLKEY`
- ``sslcrl`` (string): specifies the file name of the SSL certificate
revocation list (CRL).
See `https://www.postgresql.org/docs/9.1/static/libpq-connect.html#LIBPQ-CONNECT-SSLCRL`
See `https://www.postgresql.org/docs/9.3/static/libpq-connect.html#LIBPQ-CONNECT-SSLCRL`
- ``application_name`` (string): Name of the application that is
connecting to database. Optional. It will be displayed at ``pg_stat_activity``.

Expand Down Expand Up @@ -311,14 +311,9 @@ sqlanywhere
Depending on the used underlying platform version, you can specify
any other connection parameter that is supported by the particular
platform version via the ``driverOptions`` option.
You can find a list of supported connection parameters for each
platform version here:

- `SQL Anywhere 10.0.1 <http://dcx.sybase.com/index.html#1001/en/dbdaen10/da-conmean.html>`_
- `SQL Anywhere 11.0.0 <http://dcx.sybase.com/index.html#1100/en/dbadmin_en11/conmean.html>`_
- `SQL Anywhere 11.0.1 <http://dcx.sybase.com/index.html#1101/en/dbadmin_en11/conmean.html>`_
- `SQL Anywhere 12.0.0 <http://dcx.sybase.com/index.html#1200/en/dbadmin/da-conparm.html>`_
- `SQL Anywhere 12.0.1 <http://dcx.sybase.com/index.html#1201/en/dbadmin/da-conparm.html>`_
You can find a list of supported connection parameters for the
currently supported platform here:

- `SAP Sybase SQL Anywhere 16.0 <http://dcx.sybase.com/index.html#sa160/en/dbadmin/da-conparm.html>`_

Automatic platform version detection
Expand Down
7 changes: 2 additions & 5 deletions docs/en/reference/platforms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,15 @@ 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 2008 and above.
- ``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.
- ``PostgreSQL94Platform`` for version 9.4 and above.
- ``PostgreSQL100Platform`` for version 10.0 and above.

SAP Sybase SQL Anywhere
^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
20 changes: 5 additions & 15 deletions docs/en/reference/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -671,9 +671,7 @@ Please also notice the mapping specific footnotes for additional information.
| | +--------------------------+ | |
| | | **SQLite** | | |
| | +--------------------------+---------+ |
| | | **SQL Server** | >= 2008 | |
| | | +---------+----------------------------------------------------------+
| | | | < 2008 | ``DATETIME`` [15]_ |
| | | **SQL Server** | "all" | |
+-------------------+---------------+--------------------------+---------+----------------------------------------------------------+
| **datetime** | ``\DateTime`` | **MySQL** | *all* | ``DATETIME`` [13]_ |
| | +--------------------------+---------+----------------------------------------------------------+
Expand All @@ -691,17 +689,13 @@ Please also notice the mapping specific footnotes for additional information.
| | +--------------------------+ | |
| | | **SQLite** | | |
| | +--------------------------+---------+ |
| | | **SQL Server** | < 2008 | |
| | | +---------+----------------------------------------------------------+
| | | | >= 2008 | ``DATETIMEOFFSET(6)`` |
| | | **SQL Server** | "all" | |
| | +--------------------------+---------+----------------------------------------------------------+
| | | **PostgreSQL** | *all* | ``TIMESTAMP(0) WITH TIME ZONE`` |
| | +--------------------------+ | |
| | | **Oracle** | | |
| | +--------------------------+---------+----------------------------------------------------------+
| | | **SQL Anywhere** | < 12 | ``DATETIME`` [14]_ [15]_ |
| | | +---------+----------------------------------------------------------+
| | | | >= 12 | ``TIMESTAMP WITH TIME ZONE`` |
| | | **SQL Anywhere** | "all" | ``TIMESTAMP WITH TIME ZONE`` |
+-------------------+---------------+--------------------------+---------+----------------------------------------------------------+
| **time** | ``\DateTime`` | **MySQL** | *all* | ``TIME`` |
| | +--------------------------+ | |
Expand All @@ -713,9 +707,7 @@ Please also notice the mapping specific footnotes for additional information.
| | +--------------------------+---------+----------------------------------------------------------+
| | | **Oracle** | *all* | ``DATE`` [15]_ |
| | +--------------------------+---------+----------------------------------------------------------+
| | | **SQL Server** | < 2008 | ``DATETIME`` [15]_ |
| | | +---------+----------------------------------------------------------+
| | | | >= 2008 | ``TIME(0)`` |
| | | **SQL Server** | "all" | ``TIME(0)`` |
+-------------------+---------------+--------------------------+---------+----------------------------------------------------------+
| **array** [1]_ | ``array`` | **MySQL** | *all* | ``TINYTEXT`` [16]_ |
+-------------------+ | | +----------------------------------------------------------+
Expand Down Expand Up @@ -743,9 +735,7 @@ Please also notice the mapping specific footnotes for additional information.
| | | | +----------------------------------------------------------+
| | | | | ``LONGTEXT`` [19]_ |
| | +--------------------------+---------+----------------------------------------------------------+
| | | **PostgreSQL** | < 9.2 | ``TEXT`` [1]_ |
| | | +---------+----------------------------------------------------------+
| | | | < 9.4 | ``JSON`` |
| | | **PostgreSQL** | < 9.4 | ``JSON`` |
| | | +---------+----------------------------------------------------------+
| | | | >= 9.4 | ``JSON`` [20]_ |
| | | | +----------------------------------------------------------+
Expand Down
6 changes: 0 additions & 6 deletions lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
use Doctrine\DBAL\Driver;
use Doctrine\DBAL\Exception;
use Doctrine\DBAL\Platforms\PostgreSQL100Platform;
use Doctrine\DBAL\Platforms\PostgreSQL91Platform;
use Doctrine\DBAL\Platforms\PostgreSQL92Platform;
use Doctrine\DBAL\Platforms\PostgreSQL94Platform;
use Doctrine\DBAL\Platforms\PostgreSqlPlatform;
use Doctrine\DBAL\Schema\PostgreSqlSchemaManager;
Expand Down Expand Up @@ -101,10 +99,6 @@ public function createDatabasePlatformForVersion($version)
return new PostgreSQL100Platform();
case version_compare($version, '9.4', '>='):
return new PostgreSQL94Platform();
case version_compare($version, '9.2', '>='):
return new PostgreSQL92Platform();
case version_compare($version, '9.1', '>='):
return new PostgreSQL91Platform();
default:
return new PostgreSqlPlatform();
}
Expand Down
11 changes: 1 addition & 10 deletions lib/Doctrine/DBAL/Driver/AbstractSQLAnywhereDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\Driver;
use Doctrine\DBAL\Exception;
use Doctrine\DBAL\Platforms\SQLAnywhere11Platform;
use Doctrine\DBAL\Platforms\SQLAnywhere12Platform;
use Doctrine\DBAL\Platforms\SQLAnywhere16Platform;
use Doctrine\DBAL\Platforms\SQLAnywherePlatform;
use Doctrine\DBAL\Schema\SQLAnywhereSchemaManager;
use Doctrine\DBAL\VersionAwarePlatformDriver;
Expand Down Expand Up @@ -89,12 +86,6 @@ public function createDatabasePlatformForVersion($version)
$version = $majorVersion . '.' . $minorVersion . '.' . $patchVersion . '.' . $buildVersion;

switch(true) {
case version_compare($version, '16', '>='):
return new SQLAnywhere16Platform();
case version_compare($version, '12', '>='):
return new SQLAnywhere12Platform();
case version_compare($version, '11', '>='):
return new SQLAnywhere11Platform();
default:
return new SQLAnywherePlatform();
}
Expand All @@ -115,7 +106,7 @@ public function getDatabase(\Doctrine\DBAL\Connection $conn)
*/
public function getDatabasePlatform()
{
return new SQLAnywhere12Platform();
return new SQLAnywherePlatform();
}

/**
Expand Down
8 changes: 1 addition & 7 deletions lib/Doctrine/DBAL/Driver/AbstractSQLServerDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\Driver;
use Doctrine\DBAL\Platforms\SQLServer2005Platform;
use Doctrine\DBAL\Platforms\SQLServer2008Platform;
use Doctrine\DBAL\Platforms\SQLServer2012Platform;
use Doctrine\DBAL\Platforms\SQLServerPlatform;
use Doctrine\DBAL\Schema\SQLServerSchemaManager;
Expand Down Expand Up @@ -45,10 +43,6 @@ public function createDatabasePlatformForVersion($version)
switch(true) {
case version_compare($version, '11.00.2100', '>='):
return new SQLServer2012Platform();
case version_compare($version, '10.00.1600', '>='):
return new SQLServer2008Platform();
case version_compare($version, '9.00.1399', '>='):
return new SQLServer2005Platform();
default:
return new SQLServerPlatform();
}
Expand All @@ -69,7 +63,7 @@ public function getDatabase(\Doctrine\DBAL\Connection $conn)
*/
public function getDatabasePlatform()
{
return new SQLServer2008Platform();
return new SQLServerPlatform();
}

/**
Expand Down
66 changes: 0 additions & 66 deletions lib/Doctrine/DBAL/Driver/PDOIbm/Driver.php

This file was deleted.

30 changes: 15 additions & 15 deletions lib/Doctrine/DBAL/Platforms/DB2Platform.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,21 @@ public function getBlobTypeDeclarationSQL(array $field)
public function initializeDoctrineTypeMappings()
{
$this->doctrineTypeMapping = [
'smallint' => 'smallint',
'bigint' => 'bigint',
'integer' => 'integer',
'time' => 'time',
'date' => 'date',
'varchar' => 'string',
'character' => 'string',
'varbinary' => 'binary',
'binary' => 'binary',
'clob' => 'text',
'blob' => 'blob',
'decimal' => 'decimal',
'double' => 'float',
'real' => 'float',
'timestamp' => 'datetime',
'bigint' => 'bigint',
'binary' => 'binary',
'blob' => 'blob',
'character' => 'string',
'clob' => 'text',
'date' => 'date',
'decimal' => 'decimal',
'double' => 'float',
'integer' => 'integer',
'real' => 'float',
'smallint' => 'smallint',
'time' => 'time',
'timestamp' => 'datetime',
'varbinary' => 'binary',
'varchar' => 'string',
];
}

Expand Down
Loading