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

Manual merge of 2.11.x into 3.0.x #4057

Merged
merged 30 commits into from
Jun 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
e0421d1
Update documentation to use the new fetch API
morozov May 9, 2020
4af4999
ResultCacheStatement::fetchAllNumeric() should return numeric arrays
morozov May 9, 2020
3eb6f0a
Refactored ResultCacheTest for better coverage
morozov May 27, 2020
e74b97c
ResultCacheStatement should always fetch in associative mode
morozov May 27, 2020
c08d3bc
Merge pull request #4034 from morozov/deprecate-fetch-mode
morozov May 28, 2020
028c72e
@link in convertException gives 404
tomasnorre May 25, 2020
5e8192d
Make DB2Statement forward-compatible as well
morozov May 29, 2020
23e569e
Introduce Statement::fetchFirstColumn()
morozov May 29, 2020
76a8cae
Fix deprecation message for Statement::fetchAll()
morozov May 29, 2020
18a053a
Merge pull request #4027 from tomasnorre/patch-2
SenseException May 29, 2020
acf84c3
Merge pull request #4037 from morozov/fetch-first-column
morozov May 30, 2020
ecbe9e4
Integrate with Codecov
greg0ire Jun 2, 2020
dbc623d
Update doctrine/coding-standard to 8.0
morozov Jun 6, 2020
0629f19
Switch from Xdebug to pcov on AppVeyor
greg0ire Jun 6, 2020
02518d9
Update badges in the README
greg0ire Jun 6, 2020
12de01a
Drop Coveralls
greg0ire Jun 6, 2020
08dbcfb
Merge pull request #4050 from morozov/coding-standard-8
morozov Jun 6, 2020
4a04c86
Make caching layer not rely on closeCursor()
morozov Jun 6, 2020
87aad2f
Merge pull request #4047 from greg0ire/coverage-with-codecov
greg0ire Jun 6, 2020
ecff851
Merge pull request #4048 from morozov/cache-no-close-cursor
morozov Jun 6, 2020
6c83f5a
Report coverage unconditionally on Travis
greg0ire Jun 6, 2020
0ad4c16
Merge pull request #4053 from greg0ire/make-coverage-unconditional-on…
greg0ire Jun 6, 2020
11e8ed4
Merge remote-tracking branch 'origin/2.10.x' into 2.11.x
greg0ire Jun 7, 2020
0d9ea40
Rename forward-compatible ResultStatement interfaces to Result
morozov Jun 6, 2020
cc5bbd0
Do not extend ResultStetement by Result
morozov Jun 6, 2020
94d5321
Add rowCount() to the Result interface
morozov Jun 6, 2020
f8ae949
Deprecate ResultStatement::closeCursor() in favor of Result::free()
morozov Jun 6, 2020
e7c7cb1
Deprecate ArrayStatement and ResultCacheStatement
morozov Jun 6, 2020
3cfb57d
Merge pull request #4049 from morozov/result
morozov Jun 7, 2020
3d8c575
Merge branch '2.11.x' into 3.0.x
morozov Jun 8, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 9 additions & 6 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,14 @@ install:
$destination = "c:\tools\php\ext\php_pdo_sqlsrv-$($DLLVersion)-$($env:php)-nts-vc15-x64.zip"
Invoke-WebRequest $source -OutFile $destination
7z x -y php_pdo_sqlsrv-$($DLLVersion)-$($env:php)-nts-vc15-x64.zip > $null
$DLLVersion = (Invoke-WebRequest "https://pecl.php.net/rest/r/xdebug/stable.txt").Content
$source = "https://xdebug.org/files/php_xdebug-$($DLLVersion)-$($env:php)-vc15-nts-x86_64.dll"
$destination = "c:\tools\php\ext\php_xdebug.dll"
Invoke-WebRequest $source -OutFile $destination
$DLLVersion = (Invoke-WebRequest "https://pecl.php.net/rest/r/pcov/stable.txt").Content
Invoke-WebRequest https://windows.php.net/downloads/pecl/releases/pcov/$($DLLVersion)/php_pcov-$($DLLVersion)-7.3-nts-vc15-$($env:platform).zip -OutFile pcov.zip
7z x -y pcov.zip > $null
Remove-Item c:\tools\php\* -include .zip
cd c:\tools\php
Add-Content php.ini "`nextension=php_sqlsrv.dll"
Add-Content php.ini "`nextension=php_pdo_sqlsrv.dll"
Add-Content php.ini "`nzend_extension=php_xdebug.dll"
Add-Content php.ini "`nextension=php_pcov.dll"
Add-Content php.ini "`n"

# download Composer
Expand Down Expand Up @@ -119,8 +118,12 @@ test_script:
$env:phpunit_config = "ci\appveyor\$($env:db).$($env:driver).appveyor.xml"
}

vendor\bin\phpunit -c $($env:phpunit_config)
vendor\bin\phpunit -c $($env:phpunit_config) --coverage-clover clover.xml

if ($LastExitCode -ne 0) {
$host.SetShouldExit($LastExitCode)
}

after_test:
- appveyor DownloadFile https://codecov.io/bash -FileName codecov.sh
- bash codecov.sh -f clover.xml
2 changes: 0 additions & 2 deletions .coveralls.yml

This file was deleted.

63 changes: 25 additions & 38 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@ cache:

before_install:
- phpenv config-rm xdebug.ini || true
- |
if [ "x$COVERAGE" == "xyes" ]; then
pecl install pcov-1.0.6
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.2.0/php-coveralls.phar --output-document="${HOME}/bin/coveralls"
chmod +x ${HOME}/bin/coveralls
fi
- pecl install pcov

before_script:
- |
Expand All @@ -30,110 +25,102 @@ install:
- travis_retry composer -n install --prefer-dist $COMPOSER_FLAGS

script:
- |
if [ "x$COVERAGE" == "xyes" ]; then
./vendor/bin/phpunit --configuration ci/travis/$DB.travis.xml --coverage-clover clover.xml
else
./vendor/bin/phpunit --configuration ci/travis/$DB.travis.xml
fi
- ./vendor/bin/phpunit --configuration ci/travis/$DB.travis.xml --coverage-clover clover.xml

after_script:
- |
if [ "x$COVERAGE" == "xyes" ]; then
travis_retry coveralls -v
fi
after_success:
- bash <(curl -s https://codecov.io/bash)

jobs:
include:

- stage: Smoke Testing
php: 7.4
env: DB=sqlite COVERAGE=yes
env: DB=sqlite

- stage: Test
php: 7.3
env: DB=mysql.docker IMAGE=mysql:5.7 COVERAGE=yes
env: DB=mysql.docker IMAGE=mysql:5.7
- stage: Test
php: 7.3
env: DB=mysql.docker IMAGE=mysql:8.0 COVERAGE=yes
env: DB=mysql.docker IMAGE=mysql:8.0
- stage: Test
php: 7.3
env: DB=mysqli.docker IMAGE=mysql:5.7 COVERAGE=yes
env: DB=mysqli.docker IMAGE=mysql:5.7
- stage: Test
php: 7.3
env: DB=mysqli.docker IMAGE=mysql:8.0 COVERAGE=yes
env: DB=mysqli.docker IMAGE=mysql:8.0
- stage: Test
php: 7.3
env: DB=mariadb.docker IMAGE=mariadb:10.0 COVERAGE=yes
env: DB=mariadb.docker IMAGE=mariadb:10.0
- stage: Test
php: 7.3
env: DB=mariadb.docker IMAGE=mariadb:10.1 COVERAGE=yes
env: DB=mariadb.docker IMAGE=mariadb:10.1
- stage: Test
php: 7.3
env: DB=mariadb.docker IMAGE=mariadb:10.2 COVERAGE=yes
env: DB=mariadb.docker IMAGE=mariadb:10.2
- stage: Test
php: 7.3
env: DB=mariadb.docker IMAGE=mariadb:10.3 COVERAGE=yes
env: DB=mariadb.docker IMAGE=mariadb:10.3
- stage: Test
php: 7.3
env: DB=mariadb.mysqli.docker IMAGE=mariadb:10.0 COVERAGE=yes
env: DB=mariadb.mysqli.docker IMAGE=mariadb:10.0
- stage: Test
php: 7.3
env: DB=mariadb.mysqli.docker IMAGE=mariadb:10.1 COVERAGE=yes
env: DB=mariadb.mysqli.docker IMAGE=mariadb:10.1
- stage: Test
php: 7.3
env: DB=mariadb.mysqli.docker IMAGE=mariadb:10.2 COVERAGE=yes
env: DB=mariadb.mysqli.docker IMAGE=mariadb:10.2
- stage: Test
php: 7.3
env: DB=mariadb.mysqli.docker IMAGE=mariadb:10.3 COVERAGE=yes
env: DB=mariadb.mysqli.docker IMAGE=mariadb:10.3
- stage: Test
php: 7.3
env: DB=pgsql POSTGRESQL_VERSION=9.4 COVERAGE=yes
env: DB=pgsql POSTGRESQL_VERSION=9.4
addons:
postgresql: "9.4"
- stage: Test
php: 7.3
env: DB=pgsql POSTGRESQL_VERSION=9.5 COVERAGE=yes
env: DB=pgsql POSTGRESQL_VERSION=9.5
addons:
postgresql: "9.5"
- stage: Test
php: 7.3
env: DB=pgsql POSTGRESQL_VERSION=9.6 COVERAGE=yes
env: DB=pgsql POSTGRESQL_VERSION=9.6
addons:
postgresql: "9.6"
- stage: Test
php: 7.3
env: DB=pgsql POSTGRESQL_VERSION=10.0 COVERAGE=yes
env: DB=pgsql POSTGRESQL_VERSION=10.0
sudo: required
addons:
postgresql: "10"
before_script:
- bash ./ci/travis/install-postgres-10.sh
- stage: Test
php: 7.3
env: DB=pgsql POSTGRESQL_VERSION=11.0 COVERAGE=yes
env: DB=pgsql POSTGRESQL_VERSION=11.0
sudo: required
before_script:
- bash ./ci/travis/install-postgres-11.sh
- stage: Test
php: 7.3
env: DB=sqlsrv COVERAGE=yes
env: DB=sqlsrv
sudo: required
before_script:
- bash ./ci/travis/install-sqlsrv-dependencies.sh
- bash ./ci/travis/install-mssql-sqlsrv.sh
- bash ./ci/travis/install-mssql.sh
- stage: Test
php: 7.3
env: DB=pdo_sqlsrv COVERAGE=yes
env: DB=pdo_sqlsrv
sudo: required
before_script:
- bash ./ci/travis/install-sqlsrv-dependencies.sh
- bash ./ci/travis/install-mssql-pdo_sqlsrv.sh
- bash ./ci/travis/install-mssql.sh
- stage: Test
php: 7.3
env: DB=ibm_db2 COVERAGE=yes
env: DB=ibm_db2
sudo: required
before_script:
- bash ./ci/travis/install-db2.sh
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
|:----------------:|:----------:|
| [![Build status][Master image]][Master] | [![Build status][2.10 image]][2.10] |
| [![Build Status][ContinuousPHP image]][ContinuousPHP] | [![Build Status][ContinuousPHP 2.10 image]][ContinuousPHP] |
| [![Code Coverage][Coverage image]][Coveralls Master] | [![Code Coverage][Coverage 2.10 image]][Coveralls 2.10] |
| [![Code Coverage][Coverage image]][CodeCov Master] | [![Code Coverage][Coverage 2.10 image]][CodeCov 2.10] |
| [![AppVeyor][AppVeyor master image]][AppVeyor master] | [![AppVeyor][AppVeyor 2.10 image]][AppVeyor 2.10] |

Powerful database abstraction layer with many features for database schema introspection, schema management and PDO abstraction.
Expand All @@ -16,18 +16,18 @@ Powerful database abstraction layer with many features for database schema intro
* [Issue Tracker](https://github.com/doctrine/dbal/issues)

[Master image]: https://img.shields.io/travis/doctrine/dbal/master.svg?style=flat-square
[Coverage image]: https://coveralls.io/repos/github/doctrine/dbal/badge.svg?branch=master
[Coverage image]: https://codecov.io/gh/doctrine/dbal/branch/master/graph/badge.svg
[ContinuousPHP image]: https://img.shields.io/continuousphp/git-hub/doctrine/dbal/master.svg?style=flat-square
[Master]: https://travis-ci.org/doctrine/dbal
[Coveralls Master]: https://coveralls.io/github/doctrine/dbal?branch=master
[CodeCov Master]: https://codecov.io/gh/doctrine/dbal/branch/master
[AppVeyor master]: https://ci.appveyor.com/project/doctrine/dbal/branch/master
[AppVeyor master image]: https://ci.appveyor.com/api/projects/status/i88kitq8qpbm0vie/branch/master?svg=true
[ContinuousPHP]: https://continuousphp.com/git-hub/doctrine/dbal

[2.10 image]: https://img.shields.io/travis/doctrine/dbal/2.10.x.svg?style=flat-square
[Coverage 2.10 image]: https://coveralls.io/repos/github/doctrine/dbal/badge.svg?branch=2.10.x
[Coverage 2.10 image]: https://codecov.io/gh/doctrine/dbal/branch/2.10.x/graph/badge.svg
[ContinuousPHP 2.10 image]: https://img.shields.io/continuousphp/git-hub/doctrine/dbal/2.10.x.svg?style=flat-square
[2.10]: https://github.com/doctrine/dbal/tree/2.10.x
[Coveralls 2.10]: https://coveralls.io/github/doctrine/dbal?branch=2.10.x
[CodeCov 2.10]: https://codecov.io/gh/doctrine/dbal/branch/2.10.x
[AppVeyor 2.10]: https://ci.appveyor.com/project/doctrine/dbal/branch/2.10.x
[AppVeyor 2.10 image]: https://ci.appveyor.com/api/projects/status/i88kitq8qpbm0vie/branch/2.10.x?svg=true
17 changes: 13 additions & 4 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,23 @@ Please use other database client applications for import, e.g.:

# Upgrade to 2.11

## Deprecated `ArrayStatement` and `ResultCacheStatement` classes.

The `ArrayStatement` and `ResultCacheStatement` classes are deprecated. In a future major release they will be renamed and marked internal as implementation details of the caching layer.

## Deprecated `ResultStatement` interface

1. The `ResultStatement` interface is deprecated. Use the `Driver\Result` and `Abstraction\Result` interfaces instead.
2. `ResultStatement::closeCursor()` is deprecated in favor of `Result::free()`.

## Deprecated `FetchMode` and the corresponding methods

1. The `FetchMode` class and the `setFetchMode()` method of the `Connection` and `Statement` interfaces are deprecated.
2. The `Statement::fetch()` method is deprecated in favor of `fetchNumeric()`, `fetchAssociative()` and `fetchOne()`.
3. The `Statement::fetchAll()` method is deprecated in favor of `fetchAllNumeric()` and `fetchAllAssociative()`. There is no currently replacement for `Statement::fetchAll(FETCH_MODE::COLUMN)`. In a future major version, `fetchColumn()` will be used as a replacement.
4. The `Statement::fetchColumn()` method is deprecated in favor of `fetchOne()`.
2. The `Statement::fetch()` method is deprecated in favor of `Result::fetchNumeric()`, `::fetchAssociative()` and `::fetchOne()`.
3. The `Statement::fetchAll()` method is deprecated in favor of `Result::fetchAllNumeric()`, `::fetchAllAssociative()` and `::fetchFirstColumn()`.
4. The `Statement::fetchColumn()` method is deprecated in favor of `Result::fetchOne()`.
5. The `Connection::fetchArray()` and `fetchAssoc()` method are deprecated in favor of `fetchNumeric()` and `fetchAssociative()` respectively.
6. The `StatementIterator` class and the usage of a `Statement` object as `Traversable` is deprecated in favor of `iterateNumeric()`, `iterateAssociative()` and `iterateColumn()`.
6. The `StatementIterator` class and the usage of a `Statement` object as `Traversable` is deprecated in favor of `Result::iterateNumeric()`, `::iterateAssociative()` and `::iterateColumn()`.
7. Fetching data in mixed mode (`FetchMode::MIXED`) is deprecated.

## Deprecated `Connection::project()`
Expand Down
2 changes: 1 addition & 1 deletion ci/continuousphp/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Doctrine\DBAL\DriverManager;

(static function () : void {
(static function (): void {
// workaround for https://bugs.php.net/bug.php?id=77120
DriverManager::getConnection([
'driver' => 'oci8',
Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,13 @@
"ocramius/package-versions": "^1.4"
},
"require-dev": {
"doctrine/coding-standard": "^7.0",
"doctrine/coding-standard": "^8.0",
"jetbrains/phpstorm-stubs": "^2019.1",
"nikic/php-parser": "^4.4",
"phpstan/phpstan": "^0.12.18",
"phpstan/phpstan-strict-rules": "^0.12.2",
"phpunit/phpunit": "^9.1.1",
"psalm/plugin-phpunit": "^0.10.0",
"slevomat/coding-standard": "^6.3.6",
"symfony/console": "^2.0.5|^3.0|^4.0|^5.0",
"vimeo/psalm": "^3.11.4"
},
Expand Down
45 changes: 20 additions & 25 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading