Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/2.11.x' into 3.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
greg0ire committed May 24, 2020
2 parents 1510b7c + df651b2 commit 54a6f7b
Show file tree
Hide file tree
Showing 34 changed files with 286 additions and 131 deletions.
27 changes: 2 additions & 25 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ cache:
- C:\tools\php -> .appveyor.yml
- C:\tools\cacert -> .appveyor.yml
- C:\tools\composer -> .appveyor.yml
- C:\tools\ocular -> .appveyor.yml
- '%LOCALAPPDATA%\Composer\files -> composer.json'

## Build matrix for lowest and highest possible targets
Expand All @@ -22,20 +21,17 @@ environment:
driver: sqlsrv
db_version: sql2012sp1
php: 7.3
coverage: yes
- db: mssql
driver: sqlsrv
db_version: sql2017
coverage: no
php: 7.3
- db: mssql
driver: pdo_sqlsrv
db_version: sql2017
php: 7.3
coverage: yes

init:
- SET PATH=C:\Program Files\OpenSSL;c:\tools\php;C:\tools\composer;C:\tools\ocular;%PATH%
- SET PATH=C:\Program Files\OpenSSL;c:\tools\php;C:\tools\composer;%PATH%
- SET COMPOSER_NO_INTERACTION=1
- SET ANSICON=121x90 (121x90)

Expand Down Expand Up @@ -94,15 +90,6 @@ install:
Set-Content -path 'C:\tools\composer\composer.bat' -Value ('@php C:\tools\composer\composer.phar %*')
}
# download Scrutinizer's Ocular
if (!(Test-Path C:\tools\ocular)) {
New-Item -path c:\tools -name ocular -itemtype directory
}
if (!(Test-Path c:\tools\ocular\ocular.phar)) {
appveyor-retry appveyor DownloadFile https://github.com/scrutinizer-ci/ocular/releases/download/1.5.2/ocular.phar -Filename C:\tools\ocular\ocular.phar
Set-Content -path 'C:\tools\ocular\ocular.bat' -Value ('@php C:\tools\ocular\ocular.phar %*')
}
# download CA bundle
if (!(Test-Path C:\tools\cacert)) {
New-Item -path c:\tools\ -name cacert -itemtype directory
Expand Down Expand Up @@ -132,18 +119,8 @@ test_script:
$env:phpunit_config = "ci\appveyor\$($env:db).$($env:driver).appveyor.xml"
}
if ($env:coverage -eq "yes") {
vendor\bin\phpunit -c $($env:phpunit_config) --coverage-clover clover.xml
} else {
vendor\bin\phpunit -c $($env:phpunit_config)
}
vendor\bin\phpunit -c $($env:phpunit_config)
if ($LastExitCode -ne 0) {
$host.SetShouldExit($LastExitCode)
}
after_test:
- ps: >-
if ($env:coverage -eq "yes") {
appveyor-retry ocular code-coverage:upload --format=php-clover clover.xml
}
2 changes: 2 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
coverage_clover: clover.xml
json_path: /tmp/coveralls-upload.json
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/phpstan.neon.dist export-ignore
/phpunit.xml.dist export-ignore
/run-all.sh export-ignore
/.scrutinizer.yml export-ignore
/SECURITY.md export-ignore
/tests export-ignore
/.travis.yml export-ignore
Expand Down
34 changes: 0 additions & 34 deletions .scrutinizer.yml

This file was deleted.

5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ before_install:
- |
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
before_script:
Expand Down Expand Up @@ -38,8 +40,7 @@ script:
after_script:
- |
if [ "x$COVERAGE" == "xyes" ]; then
travis_retry wget https://github.com/scrutinizer-ci/ocular/releases/download/1.5.2/ocular.phar
travis_retry php ocular.phar code-coverage:upload --format=php-clover clover.xml
travis_retry coveralls -v
fi
jobs:
Expand Down
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +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]][Scrutinizer Master] | [![Code Coverage][Coverage 2.10 image]][Scrutinizer 2.10] |
| [![Code Quality][Quality image]][Scrutinizer Master] | [![Code Quality][Quality 2.10 image]][Scrutinizer 2.10] |
| [![Code Coverage][Coverage image]][Coveralls Master] | [![Code Coverage][Coverage 2.10 image]][Coveralls 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 @@ -17,20 +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://img.shields.io/scrutinizer/coverage/g/doctrine/dbal/master.svg?style=flat-square
[Quality image]: https://img.shields.io/scrutinizer/g/doctrine/dbal/master.svg?style=flat-square
[Coverage image]: https://coveralls.io/repos/github/doctrine/dbal/badge.svg?branch=master
[ContinuousPHP image]: https://img.shields.io/continuousphp/git-hub/doctrine/dbal/master.svg?style=flat-square
[Master]: https://travis-ci.org/doctrine/dbal
[Scrutinizer Master]: https://scrutinizer-ci.com/g/doctrine/dbal/
[Coveralls Master]: https://coveralls.io/github/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://img.shields.io/scrutinizer/coverage/g/doctrine/dbal/2.10.x.svg?style=flat-square
[Quality 2.10 image]: https://img.shields.io/scrutinizer/g/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
[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
[Scrutinizer 2.10]: https://scrutinizer-ci.com/g/doctrine/dbal/?branch=2.10.x
[Coveralls 2.10]: https://coveralls.io/github/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
10 changes: 9 additions & 1 deletion UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,17 @@ Please use other database client applications for import, e.g.:

# Upgrade to 2.11

## Deprecated `Connection::project()`

The `Connection::project()` method is deprecated. Implement data transformation outside of DBAL.

## Deprecated `Statement::errorCode()` and `errorInfo()`

The `Statement::errorCode()` and `errorInfo()` methods are deprecated. The error information is available via exceptions.

## Deprecated `EchoSQLLogger`

The `EchoSQLLogger` is has been deprecated. Implement your logger with the desired logic.
The `EchoSQLLogger` class is deprecated. Implement your logger with the desired logic.

## Deprecated database platforms:

Expand Down
15 changes: 8 additions & 7 deletions bin/doctrine-dbal.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

use Doctrine\DBAL\Tools\Console\ConnectionProvider;
use Doctrine\DBAL\Tools\Console\ConsoleRunner;
use Symfony\Component\Console\Helper\HelperSet;

Expand Down Expand Up @@ -41,17 +42,17 @@
exit(1);
}

$commands = [];
$helperSet = require $configFile;
$commands = [];
$helperSetOrConnectionProvider = require $configFile;

if (! $helperSet instanceof HelperSet) {
foreach ($GLOBALS as $helperSetCandidate) {
if ($helperSetCandidate instanceof HelperSet) {
$helperSet = $helperSetCandidate;
if (! $helperSetOrConnectionProvider instanceof HelperSet && ! $helperSetOrConnectionProvider instanceof ConnectionProvider) {
foreach ($GLOBALS as $candidate) {
if ($candidate instanceof HelperSet) {
$helperSetOrConnectionProvider = $candidate;

break;
}
}
}

ConsoleRunner::run($helperSet, $commands);
ConsoleRunner::run($helperSetOrConnectionProvider, $commands);
15 changes: 0 additions & 15 deletions ci/continuousphp/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,4 @@
'password' => 'ORACLE',
'dbname' => 'XE',
])->query('ALTER USER ORACLE IDENTIFIED BY ORACLE');

$pos = array_search('--coverage-clover', $_SERVER['argv'], true);

if ($pos === false) {
return;
}

$file = $_SERVER['argv'][$pos + 1];

register_shutdown_function(static function () use ($file) : void {
$cmd = 'wget https://github.com/scrutinizer-ci/ocular/releases/download/1.5.2/ocular.phar'
. ' && php ocular.phar code-coverage:upload --format=php-clover ' . escapeshellarg($file);

passthru($cmd);
});
})();
4 changes: 2 additions & 2 deletions docs/en/reference/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ For example, to connect to a "foo" MySQL DB using the ``pdo_mysql``
driver on localhost port 4486 with the charset set to UTF-8, you
would use the following URL::

mysql://localhost:4486/foo?charset=UTF-8
mysql://localhost:4486/foo?charset=UTF8

This is identical to the following connection string using the
full driver name::

pdo-mysql://localhost:4486/foo?charset=UTF-8
pdo-mysql://localhost:4486/foo?charset=UTF8

In the example above, mind the dashes instead of the
underscores in the URL scheme.
Expand Down
14 changes: 0 additions & 14 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@
</properties>
</rule>

<rule ref="Squiz.NamingConventions.ValidVariableName.PublicHasUnderscore">
<exclude-pattern>*/src/*</exclude-pattern>
</rule>

<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint">
<exclude-pattern>*/src/*</exclude-pattern>
</rule>
Expand All @@ -65,11 +61,6 @@
<exclude-pattern>tests/Tools/TestAsset/*</exclude-pattern>
</rule>

<!-- https://github.com/slevomat/coding-standard/issues/868 -->
<rule ref="SlevomatCodingStandard.PHP.UselessParentheses.UselessParentheses">
<exclude-pattern>ci/continuousphp/bootstrap.php</exclude-pattern>
</rule>

<!-- see https://github.com/squizlabs/PHP_CodeSniffer/issues/2099 -->
<rule ref="Squiz.Commenting.FunctionComment.InvalidNoReturn">
<exclude-pattern>src/Platforms/AbstractPlatform.php</exclude-pattern>
Expand Down Expand Up @@ -107,11 +98,6 @@
<exclude-pattern>src/Driver/SQLSrv/SQLSrvStatement.php</exclude-pattern>
</rule>

<!-- sqlsrv functions are documented in upper case but reflected in lower case -->
<rule ref="Squiz.PHP.LowercasePHPFunctions.CallUppercase">
<exclude-pattern>src/Driver/SQLSrv/SQLSrvStatement.php</exclude-pattern>
</rule>

<!-- see https://github.com/doctrine/dbal/issues/3377 -->
<rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators.DisallowedNotEqualOperator">
<exclude-pattern>src/Schema/Comparator.php</exclude-pattern>
Expand Down
6 changes: 6 additions & 0 deletions src/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,8 @@ public function executeCacheQuery($query, $params, $types, QueryCacheProfile $qc
* Executes an, optionally parametrized, SQL query and returns the result,
* applying a given projection/transformation function on each row of the result.
*
* @deprecated
*
* @param string $query The SQL query to execute.
* @param mixed[] $params The parameters, if any.
* @param Closure $function The transformation function that is applied on each row.
Expand Down Expand Up @@ -1092,6 +1094,8 @@ public function getTransactionNestingLevel()
/**
* Fetches the SQLSTATE associated with the last database operation.
*
* @deprecated The error information is available via exceptions.
*
* @return string|null The last error code.
*/
public function errorCode()
Expand All @@ -1101,6 +1105,8 @@ public function errorCode()

/**
* {@inheritDoc}
*
* @deprecated The error information is available via exceptions.
*/
public function errorInfo()
{
Expand Down
4 changes: 4 additions & 0 deletions src/Driver/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,17 @@ public function rollBack();
/**
* Returns the error code associated with the last operation on the database handle.
*
* @deprecated The error information is available via exceptions.
*
* @return string|null The error code, or null if no operation has been run on the database handle.
*/
public function errorCode();

/**
* Returns extended error information associated with the last operation on the database handle.
*
* @deprecated The error information is available via exceptions.
*
* @return mixed[]
*/
public function errorInfo();
Expand Down
4 changes: 4 additions & 0 deletions src/Driver/IBMDB2/DB2Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ public function rollBack()

/**
* {@inheritdoc}
*
* @deprecated The error information is available via exceptions.
*/
public function errorCode()
{
Expand All @@ -177,6 +179,8 @@ public function errorCode()

/**
* {@inheritdoc}
*
* @deprecated The error information is available via exceptions.
*/
public function errorInfo()
{
Expand Down
4 changes: 4 additions & 0 deletions src/Driver/IBMDB2/DB2Statement.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ public function columnCount()

/**
* {@inheritdoc}
*
* @deprecated The error information is available via exceptions.
*/
public function errorCode()
{
Expand All @@ -164,6 +166,8 @@ public function errorCode()

/**
* {@inheritdoc}
*
* @deprecated The error information is available via exceptions.
*/
public function errorInfo()
{
Expand Down
4 changes: 4 additions & 0 deletions src/Driver/Mysqli/MysqliConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ public function rollBack()

/**
* {@inheritdoc}
*
* @deprecated The error information is available via exceptions.
*/
public function errorCode()
{
Expand All @@ -203,6 +205,8 @@ public function errorCode()

/**
* {@inheritdoc}
*
* @deprecated The error information is available via exceptions.
*/
public function errorInfo()
{
Expand Down
Loading

0 comments on commit 54a6f7b

Please sign in to comment.