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

Missing type hints in $query, $params, $types sets #3034

Closed
wants to merge 44 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
ac3c76a
Decouple unique index from unique constraint
guilhermeblanco Sep 22, 2016
bdf7f70
Added flag support to unique constraint
guilhermeblanco Sep 22, 2016
fed2569
Fixed tests
guilhermeblanco Sep 24, 2016
76c0989
Removed identifier generator type from schema table definition
guilhermeblanco Sep 24, 2016
7816fb3
Fixing rebase with master
guilhermeblanco Jun 21, 2017
fc45f88
Fixed undefined result of rebase
guilhermeblanco Jun 22, 2017
e00ed87
Moved getSequencePrefix() from ClassMetadata (ORM) to AbstractPlatfor…
guilhermeblanco Jul 11, 2017
9e985ef
Remove copyright headers
Majkl578 Sep 11, 2017
4505b3a
Require PHP 7.2, drop <7.2 in Composer & on CI
Majkl578 Jan 5, 2018
94ba564
Bump version to 3.0.x-dev
Majkl578 Jan 5, 2018
fb6ed7c
[BC] Removed support for PDO::PARAM_INPUT_OUTPUT in Statement::bindPa…
morozov Dec 27, 2017
9299942
[BC] Replaced extension of \PDOStatement with a composition to avoid …
morozov Jan 2, 2018
291cd1f
[BC] Replaced PDO constants with values
morozov Jan 1, 2018
fa9a448
Updated UPGRADE.md for 3.x
morozov Dec 25, 2017
17cd070
Updated build matrix for Travis-CI according to the changes in compos…
morozov Jan 25, 2018
e133242
Drop Doctrine\DBAL\Version in favor of Ocramius\PackageVersions
Majkl578 Jan 5, 2018
c80e70a
Drop Drizzle support
BenMorel Mar 7, 2018
6a2a9af
Add note to UPGRADE.md
BenMorel Mar 7, 2018
476742f
Introduce a null SQL logger
BenMorel Mar 8, 2018
91cac34
Make NullLogger final
BenMorel Mar 8, 2018
8bcc1f5
One-liner for Configuration::getSQLLogger()
BenMorel Mar 8, 2018
d33b13f
Change the SQLLogger interface signature
BenMorel Mar 8, 2018
037b704
Remove redundant return docblock as per CS
BenMorel Mar 8, 2018
6f4d5bd
Add UPGRADE note
BenMorel Mar 8, 2018
3f3dd74
Ignore NullLogger in code coverage
BenMorel Mar 8, 2018
e629b86
Make SQLLogger implementations final
BenMorel Mar 8, 2018
f60eccc
Update UPGRADE.md
BenMorel Mar 8, 2018
239e80b
Do not accept null in Configuration::setSQLLogger()
BenMorel Mar 8, 2018
5e54952
Add note about setSQLLogger()
BenMorel Mar 8, 2018
fc8038a
Fix CS
BenMorel Mar 9, 2018
7498ebd
Don't catch Exception anymore
BenMorel Mar 9, 2018
7978557
When rendering SQL, only render the alias if it's different from the …
morozov Mar 13, 2018
82c8ca4
Drop support for PostgreSQL <9.3
Majkl578 Mar 16, 2018
20a54ab
Drop support for SQL Server <2008
Majkl578 Mar 16, 2018
94afd95
Drop support for SQL Anywhere <16
Majkl578 Mar 16, 2018
3e001de
Drop PDO DB2 driver
Majkl578 Mar 17, 2018
43387b0
Remove MsSQLKeywords
Majkl578 Mar 17, 2018
b6fa0b7
Reorder keywords and type mappings alphabetically
Majkl578 Mar 17, 2018
525baa4
Fixed build failure on SQL Server (sqlsrv)
morozov Mar 20, 2018
fe91b22
Fixed build failure on SQL Server (pdo_sqlsrv)
morozov Mar 20, 2018
a62acbd
[DBAL-3079] Reworked the usage of PDO inPDOConnection from inheritanc…
morozov Apr 2, 2018
4fd0e86
[DBAL-3079] Added type hints to query-related method parameters and r…
morozov Apr 11, 2018
1c91686
[DBAL-3079] Updated upgrade documentation
morozov Apr 12, 2018
175455f
Missing type hints in $query, $params, $types sets
simPod Feb 28, 2018
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
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ build:
analysis:
environment:
php:
version: 7.1
version: 7.2
cache:
disabled: false
directories:
Expand Down
118 changes: 4 additions & 114 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ cache:
- $HOME/.composer/cache

php:
- 7.1
- 7.2
- nightly

Expand All @@ -35,12 +34,6 @@ jobs:
- stage: Coding standard

include:
- stage: Test
php: 7.1
env: DB=mysql MYSQL_VERSION=5.7
sudo: required
before_script:
- bash ./tests/travis/install-mysql-5.7.sh
- stage: Test
php: 7.2
env: DB=mysql MYSQL_VERSION=5.7
Expand All @@ -54,12 +47,6 @@ jobs:
before_script:
- bash ./tests/travis/install-mysql-5.7.sh

- stage: Test
php: 7.1
env: DB=mysqli MYSQL_VERSION=5.7
sudo: required
before_script:
- bash ./tests/travis/install-mysql-5.7.sh
- stage: Test
php: 7.2
env: DB=mysqli MYSQL_VERSION=5.7
Expand All @@ -73,11 +60,6 @@ jobs:
before_script:
- bash ./tests/travis/install-mysql-5.7.sh

- stage: Test
php: 7.1
env: DB=mariadb MARIADB_VERSION=10.0
addons:
mariadb: 10.0
- stage: Test
php: 7.2
env: DB=mariadb MARIADB_VERSION=10.0
Expand All @@ -89,11 +71,6 @@ jobs:
addons:
mariadb: 10.0

- stage: Test
php: 7.1
env: DB=mariadb MARIADB_VERSION=10.1
addons:
mariadb: 10.1
- stage: Test
php: 7.2
env: DB=mariadb MARIADB_VERSION=10.1
Expand All @@ -105,11 +82,6 @@ jobs:
addons:
mariadb: 10.1

- stage: Test
php: 7.1
env: DB=mariadb MARIADB_VERSION=10.2
addons:
mariadb: 10.2
- stage: Test
php: 7.2
env: DB=mariadb MARIADB_VERSION=10.2
Expand All @@ -121,11 +93,6 @@ jobs:
addons:
mariadb: 10.2

- stage: Test
php: 7.1
env: DB=mariadb.mysqli MARIADB_VERSION=10.2
addons:
mariadb: 10.2
- stage: Test
php: 7.2
env: DB=mariadb.mysqli MARIADB_VERSION=10.2
Expand All @@ -137,35 +104,6 @@ jobs:
addons:
mariadb: 10.2

- stage: Test
php: 7.1
env: DB=pgsql POSTGRESQL_VERSION=9.2
services:
- postgresql
addons:
postgresql: "9.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.1
env: DB=pgsql POSTGRESQL_VERSION=9.3
services:
- postgresql
addons:
postgresql: "9.3"
- stage: Test
php: 7.2
env: DB=pgsql POSTGRESQL_VERSION=9.3
Expand All @@ -181,13 +119,6 @@ jobs:
addons:
postgresql: "9.3"

- stage: Test
php: 7.1
env: DB=pgsql POSTGRESQL_VERSION=9.4
services:
- postgresql
addons:
postgresql: "9.4"
- stage: Test
php: 7.2
env: DB=pgsql POSTGRESQL_VERSION=9.4
Expand All @@ -203,13 +134,6 @@ jobs:
addons:
postgresql: "9.4"

- stage: Test
php: 7.1
env: DB=pgsql POSTGRESQL_VERSION=9.5
services:
- postgresql
addons:
postgresql: "9.5"
- stage: Test
php: 7.2
env: DB=pgsql POSTGRESQL_VERSION=9.5
Expand All @@ -225,13 +149,6 @@ jobs:
addons:
postgresql: "9.5"

- stage: Test
php: 7.1
env: DB=pgsql POSTGRESQL_VERSION=9.6
services:
- postgresql
addons:
postgresql: "9.6"
- stage: Test
php: 7.2
env: DB=pgsql POSTGRESQL_VERSION=9.6
Expand All @@ -247,16 +164,6 @@ jobs:
addons:
postgresql: "9.6"

- stage: Test
php: 7.1
env: DB=pgsql POSTGRESQL_VERSION=10.0
sudo: required
services:
- postgresql
addons:
postgresql: "9.6"
before_script:
- bash ./tests/travis/install-postgres-10.sh
- stage: Test
php: 7.2
env: DB=pgsql POSTGRESQL_VERSION=10.0
Expand All @@ -278,14 +185,6 @@ jobs:
before_script:
- bash ./tests/travis/install-postgres-10.sh

- stage: Test
env: DB=sqlsrv
sudo: required
services:
- docker
before_script:
- bash ./tests/travis/install-mssql-$DB.sh
- bash ./tests/travis/install-mssql.sh
- stage: Test
php: 7.2
env: DB=sqlsrv
Expand All @@ -296,15 +195,6 @@ jobs:
- bash ./tests/travis/install-mssql-$DB.sh
- bash ./tests/travis/install-mssql.sh

- stage: Test
php: 7.1
env: DB=pdo_sqlsrv
sudo: required
services:
- docker
before_script:
- bash ./tests/travis/install-mssql-$DB.sh
- bash ./tests/travis/install-mssql.sh
- stage: Test
php: 7.2
env: DB=pdo_sqlsrv
Expand All @@ -316,7 +206,7 @@ jobs:
- bash ./tests/travis/install-mssql.sh

- stage: Test
php: 7.1
php: 7.2
env: DB=sqlite DEPENDENCIES=low
install:
- travis_retry composer update --prefer-dist --prefer-lowest
Expand All @@ -330,7 +220,7 @@ jobs:
- travis_retry composer update --prefer-dist

- stage: Coverage
php: 7.1
php: 7.2
env: DB=sqlite
before_script:
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{.disabled,}
Expand All @@ -343,7 +233,7 @@ jobs:

- stage: Pull request coding standard
if: type = pull_request
php: 7.1
php: 7.2
install: travis_retry composer install --prefer-dist
script:
- |
Expand All @@ -357,7 +247,7 @@ jobs:

- stage: Coding standard
if: NOT type = pull_request
php: 7.1
php: 7.2
install: travis_retry composer install --prefer-dist
script:
- ./vendor/bin/phpcs
104 changes: 104 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,107 @@
# 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.

## BC BREAK: the PDO symbols are no longer part of the DBAL API

1. The support of `PDO::PARAM_*`, `PDO::FETCH_*`, `PDO::CASE_*` and `PDO::PARAM_INPUT_OUTPUT` constants in the DBAL API is removed.
2. `\Doctrine\DBAL\Driver\PDOConnection` does not extend `\PDO` anymore. Please use `\Doctrine\DBAL\Driver\PDOConnection::getWrappedConnection()` to access the underlying `PDO` object.
3. `\Doctrine\DBAL\Driver\PDOStatement` does not extend `\PDOStatement` anymore.

Before:

use Doctrine\DBAL\Portability\Connection;

$params = array(
'wrapperClass' => Connection::class,
'fetch_case' => PDO::CASE_LOWER,
);

$stmt->bindValue(1, 1, PDO::PARAM_INT);
$stmt->fetchAll(PDO::FETCH_COLUMN);

After:

use Doctrine\DBAL\ColumnCase;
use Doctrine\DBAL\FetchMode;
use Doctrine\DBAL\ParameterType;
use Doctrine\DBAL\Portability\Connection;

$params = array(
'wrapperClass' => Connection::class,
'fetch_case' => ColumnCase::LOWER,
);

$stmt->bindValue(1, 1, ParameterType::INTEGER);
$stmt->fetchAll(FetchMode::COLUMN);

## BC BREAK: Removed Drizzle support

The Drizzle project is abandoned and is therefore not supported by Doctrine DBAL anymore.

## BC BREAK: SQLLogger changes

- The `SQLLogger` interface has changed; the methods are the same but use scalar type hints, return types, and non-nullable arrays.
- `SQLLogger` implementations: `DebugStack`, `EchoSQLLogger`, `LoggerChain` are now final.
- `Configuration::getSQLLogger()` does not return `null` anymore, but a `NullLogger` implementation.
- `Configuration::setSQLLogger()` does not allow `null` anymore.

# Upgrade to 2.7

## Doctrine\DBAL\Platforms\AbstractPlatform::DATE_INTERVAL_UNIT_* constants deprecated
Expand Down
3 changes: 0 additions & 3 deletions build.properties
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
# Version class and file
project.version_class = Doctrine\\DBAL\\Version
project.version_file = lib/Doctrine/DBAL/Version.php
23 changes: 0 additions & 23 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,29 +38,6 @@
</exec>
</target>

<target name="make-release" depends="check-git-checkout-clean,prepare,php">
<replace file="${project.version_file}" token="-DEV" value="" failOnNoReplacements="true" />
<exec executable="${php_executable}" outputproperty="doctrine.current_version" failonerror="true">
<arg value="-r" />
<arg value="require_once '${project.version_file}';echo ${project.version_class}::VERSION;" />
</exec>
<exec executable="${php_executable}" outputproperty="doctrine.next_version" failonerror="true">
<arg value="-r" />
<arg value="$parts = explode('.', str_ireplace(array('-DEV', '-ALPHA', '-BETA'), '', '${doctrine.current_version}'));
if (count($parts) != 3) {
throw new \InvalidArgumentException('Version is assumed in format x.y.z, ${doctrine.current_version} given');
}
$parts[2]++;
echo implode('.', $parts);
" />
</exec>

<git-commit file="${project.version_file}" message="Release ${doctrine.current_version}" />
<git-tag version="${doctrine.current_version}" />
<replace file="${project.version_file}" token="${doctrine.current_version}" value="${doctrine.next_version}-DEV" />
<git-commit file="${project.version_file}" message="Bump version to ${doctrine.next_version}" />
</target>

<target name="check-git-checkout-clean">
<exec executable="git" failonerror="true">
<arg value="diff-index" />
Expand Down
Loading