Skip to content

Commit

Permalink
Drop support for SQL Anywhere <16
Browse files Browse the repository at this point in the history
  • Loading branch information
Majkl578 committed Mar 16, 2018
1 parent f7849d2 commit dbdac39
Show file tree
Hide file tree
Showing 18 changed files with 296 additions and 650 deletions.
15 changes: 15 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Upgrade to 3.0 (DEVELOP)

## 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.
Expand Down
11 changes: 3 additions & 8 deletions docs/en/reference/configuration.rst
Original file line number Diff line number Diff line change
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
4 changes: 1 addition & 3 deletions docs/en/reference/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -695,9 +695,7 @@ Please also notice the mapping specific footnotes for additional information.
| | +--------------------------+ | |
| | | **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 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
38 changes: 0 additions & 38 deletions lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere11Keywords.php

This file was deleted.

47 changes: 0 additions & 47 deletions lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere12Keywords.php

This file was deleted.

39 changes: 0 additions & 39 deletions lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere16Keywords.php

This file was deleted.

19 changes: 13 additions & 6 deletions lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhereKeywords.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ protected function getKeywords()
'ALTER',
'AND',
'ANY',
'ARRAY',
'AS',
'ASC',
'ATTACH',
Expand Down Expand Up @@ -70,6 +71,7 @@ protected function getKeywords()
'CURRENT_USER',
'CURSOR',
'DATE',
'DATETIMEOFFSET',
'DBSPACE',
'DEALLOCATE',
'DEC',
Expand Down Expand Up @@ -116,7 +118,6 @@ protected function getKeywords()
'IF',
'IN',
'INDEX',
'INDEX_LPAREN',
'INNER',
'INOUT',
'INSENSITIVE',
Expand All @@ -129,20 +130,22 @@ protected function getKeywords()
'INTEGRATED',
'INTERSECT',
'INTO',
'IQ',
'IS',
'ISOLATION',
'JOIN',
'JSON',
'KERBEROS',
'KEY',
'LATERAL',
'LEFT',
'LIKE',
'LIMIT',
'LOCK',
'LOGIN',
'LONG',
'MATCH',
'MEMBERSHIP',
'MERGE',
'MESSAGE',
'MODE',
'MODIFY',
Expand All @@ -160,6 +163,8 @@ protected function getKeywords()
'OFF',
'ON',
'OPEN',
'OPENSTRING',
'OPENXML',
'OPTION',
'OPTIONS',
'OR',
Expand Down Expand Up @@ -196,6 +201,8 @@ protected function getKeywords()
'RIGHT',
'ROLLBACK',
'ROLLUP',
'ROW',
'ROWTYPE',
'SAVE',
'SAVEPOINT',
'SCROLL',
Expand All @@ -207,14 +214,14 @@ protected function getKeywords()
'SHARE',
'SMALLINT',
'SOME',
'SPATIAL',
'SQLCODE',
'SQLSTATE',
'START',
'STOP',
'SUBTRANS',
'SUBTRANSACTION',
'SYNCHRONIZE',
'SYNTAX_ERROR',
'TABLE',
'TEMPORARY',
'THEN',
Expand All @@ -224,6 +231,7 @@ protected function getKeywords()
'TO',
'TOP',
'TRAN',
'TREAT',
'TRIGGER',
'TRUNCATE',
'TSEQUAL',
Expand All @@ -232,6 +240,7 @@ protected function getKeywords()
'UNIQUE',
'UNIQUEIDENTIFIER',
'UNKNOWN',
'UNNEST',
'UNSIGNED',
'UPDATE',
'UPDATING',
Expand All @@ -243,6 +252,7 @@ protected function getKeywords()
'VARBIT',
'VARCHAR',
'VARIABLE',
'VARRAY',
'VARYING',
'VIEW',
'WAIT',
Expand All @@ -252,9 +262,6 @@ protected function getKeywords()
'WHILE',
'WINDOW',
'WITH',
'WITH_CUBE',
'WITH_LPAREN',
'WITH_ROLLUP',
'WITHIN',
'WORK',
'WRITETEXT',
Expand Down
30 changes: 0 additions & 30 deletions lib/Doctrine/DBAL/Platforms/SQLAnywhere11Platform.php

This file was deleted.

Loading

0 comments on commit dbdac39

Please sign in to comment.