Unverified Commit df651b2d authored by Sergei Morozov's avatar Sergei Morozov

Merge branch '2.10.x' into 2.11.x

parents d08a41e9 f08343d9
...@@ -12,7 +12,6 @@ cache: ...@@ -12,7 +12,6 @@ cache:
- C:\tools\php -> .appveyor.yml - C:\tools\php -> .appveyor.yml
- C:\tools\cacert -> .appveyor.yml - C:\tools\cacert -> .appveyor.yml
- C:\tools\composer -> .appveyor.yml - C:\tools\composer -> .appveyor.yml
- C:\tools\ocular -> .appveyor.yml
- '%LOCALAPPDATA%\Composer\files -> composer.json' - '%LOCALAPPDATA%\Composer\files -> composer.json'
## Build matrix for lowest and highest possible targets ## Build matrix for lowest and highest possible targets
...@@ -21,26 +20,22 @@ environment: ...@@ -21,26 +20,22 @@ environment:
- db: mssql - db: mssql
driver: sqlsrv driver: sqlsrv
db_version: sql2008r2sp2 db_version: sql2008r2sp2
coverage: yes
php: 7.3 php: 7.3
- db: mssql - db: mssql
driver: sqlsrv driver: sqlsrv
db_version: sql2012sp1 db_version: sql2012sp1
php: 7.3 php: 7.3
coverage: yes
- db: mssql - db: mssql
driver: sqlsrv driver: sqlsrv
db_version: sql2017 db_version: sql2017
coverage: no
php: 7.3 php: 7.3
- db: mssql - db: mssql
driver: pdo_sqlsrv driver: pdo_sqlsrv
db_version: sql2017 db_version: sql2017
php: 7.3 php: 7.3
coverage: yes
init: 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 COMPOSER_NO_INTERACTION=1
- SET ANSICON=121x90 (121x90) - SET ANSICON=121x90 (121x90)
...@@ -99,15 +94,6 @@ install: ...@@ -99,15 +94,6 @@ install:
Set-Content -path 'C:\tools\composer\composer.bat' -Value ('@php C:\tools\composer\composer.phar %*') 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 # download CA bundle
if (!(Test-Path C:\tools\cacert)) { if (!(Test-Path C:\tools\cacert)) {
New-Item -path c:\tools\ -name cacert -itemtype directory New-Item -path c:\tools\ -name cacert -itemtype directory
...@@ -137,18 +123,8 @@ test_script: ...@@ -137,18 +123,8 @@ test_script:
$env:phpunit_config = "tests\appveyor\$($env:db).$($env:driver).appveyor.xml" $env:phpunit_config = "tests\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) { if ($LastExitCode -ne 0) {
$host.SetShouldExit($LastExitCode) $host.SetShouldExit($LastExitCode)
} }
after_test:
- ps: >-
if ($env:coverage -eq "yes") {
appveyor-retry ocular code-coverage:upload --format=php-clover clover.xml
}
coverage_clover: clover.xml
json_path: /tmp/coveralls-upload.json
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
/phpstan.neon.dist export-ignore /phpstan.neon.dist export-ignore
/phpunit.xml.dist export-ignore /phpunit.xml.dist export-ignore
/run-all.sh export-ignore /run-all.sh export-ignore
/.scrutinizer.yml export-ignore
/SECURITY.md export-ignore /SECURITY.md export-ignore
/tests export-ignore /tests export-ignore
/.travis.yml export-ignore /.travis.yml export-ignore
......
build:
nodes:
analysis:
environment:
php:
version: 7.2
cache:
disabled: false
directories:
- ~/.composer/cache
project_setup:
override: true
tests:
override:
- php-scrutinizer-run
before_commands:
- "composer install --no-dev --prefer-source -a"
tools:
external_code_coverage:
timeout: 3600
runs: 27 # 23x Travis (jobs with COVERAGE=yes) + 3x AppVeyor (jobs with coverage=yes) + 1x ContinuousPHP
filter:
excluded_paths:
- docs
build_failure_conditions:
- 'elements.rating(<= C).new.exists' # No new classes/methods with a rating of C or worse allowed
- 'issues.severity(>= MAJOR).new.exists' # New issues of major or higher severity
- 'project.metric_change("scrutinizer.test_coverage", < 0)' # Code Coverage decreased from previous inspection
- 'patches.label("Unused Use Statements").new.exists' # No new unused imports patches allowed
...@@ -11,6 +11,8 @@ before_install: ...@@ -11,6 +11,8 @@ before_install:
- | - |
if [ "x$COVERAGE" == "xyes" ]; then if [ "x$COVERAGE" == "xyes" ]; then
pecl install pcov-1.0.0 pecl install pcov-1.0.0
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 fi
before_script: before_script:
...@@ -34,8 +36,7 @@ script: ...@@ -34,8 +36,7 @@ script:
after_script: after_script:
- | - |
if [ "x$COVERAGE" == "xyes" ]; then if [ "x$COVERAGE" == "xyes" ]; then
travis_retry wget https://github.com/scrutinizer-ci/ocular/releases/download/1.5.2/ocular.phar travis_retry coveralls -v
travis_retry php ocular.phar code-coverage:upload --format=php-clover clover.xml
fi fi
jobs: jobs:
......
...@@ -4,8 +4,7 @@ ...@@ -4,8 +4,7 @@
|:----------------:|:----------:| |:----------------:|:----------:|
| [![Build status][Master image]][Master] | [![Build status][2.10 image]][2.10] | | [![Build status][Master image]][Master] | [![Build status][2.10 image]][2.10] |
| [![Build Status][ContinuousPHP image]][ContinuousPHP] | [![Build Status][ContinuousPHP 2.10 image]][ContinuousPHP] | | [![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 Coverage][Coverage image]][Coveralls Master] | [![Code Coverage][Coverage 2.10 image]][Coveralls 2.10] |
| [![Code Quality][Quality image]][Scrutinizer Master] | [![Code Quality][Quality 2.10 image]][Scrutinizer 2.10] |
| [![AppVeyor][AppVeyor master image]][AppVeyor master] | [![AppVeyor][AppVeyor 2.10 image]][AppVeyor 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. Powerful database abstraction layer with many features for database schema introspection, schema management and PDO abstraction.
...@@ -17,20 +16,18 @@ Powerful database abstraction layer with many features for database schema intro ...@@ -17,20 +16,18 @@ Powerful database abstraction layer with many features for database schema intro
* [Issue Tracker](https://github.com/doctrine/dbal/issues) * [Issue Tracker](https://github.com/doctrine/dbal/issues)
[Master image]: https://img.shields.io/travis/doctrine/dbal/master.svg?style=flat-square [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 [Coverage image]: https://coveralls.io/repos/github/doctrine/dbal/badge.svg?branch=master
[Quality image]: https://img.shields.io/scrutinizer/g/doctrine/dbal/master.svg?style=flat-square
[ContinuousPHP image]: https://img.shields.io/continuousphp/git-hub/doctrine/dbal/master.svg?style=flat-square [ContinuousPHP image]: https://img.shields.io/continuousphp/git-hub/doctrine/dbal/master.svg?style=flat-square
[Master]: https://travis-ci.org/doctrine/dbal [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]: https://ci.appveyor.com/project/doctrine/dbal/branch/master
[AppVeyor master image]: https://ci.appveyor.com/api/projects/status/i88kitq8qpbm0vie/branch/master?svg=true [AppVeyor master image]: https://ci.appveyor.com/api/projects/status/i88kitq8qpbm0vie/branch/master?svg=true
[ContinuousPHP]: https://continuousphp.com/git-hub/doctrine/dbal [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 [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 [Coverage 2.10 image]: https://coveralls.io/repos/github/doctrine/dbal/badge.svg?branch=2.10.x
[Quality 2.10 image]: https://img.shields.io/scrutinizer/g/doctrine/dbal/2.10.x.svg?style=flat-square
[ContinuousPHP 2.10 image]: https://img.shields.io/continuousphp/git-hub/doctrine/dbal/2.10.x.svg?style=flat-square [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 [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]: 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 [AppVeyor 2.10 image]: https://ci.appveyor.com/api/projects/status/i88kitq8qpbm0vie/branch/2.10.x?svg=true
...@@ -64,12 +64,12 @@ For example, to connect to a "foo" MySQL DB using the ``pdo_mysql`` ...@@ -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 driver on localhost port 4486 with the charset set to UTF-8, you
would use the following URL:: 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 This is identical to the following connection string using the
full driver name:: full driver name::
pdo-mysql://localhost:4486/foo?charset=UTF-8 pdo-mysql://localhost:4486/foo?charset=UTF8
If you wanted to use the ``drizzle_pdo__mysql`` driver instead:: If you wanted to use the ``drizzle_pdo__mysql`` driver instead::
......
...@@ -2,9 +2,13 @@ ...@@ -2,9 +2,13 @@
namespace Doctrine\DBAL\Exception; namespace Doctrine\DBAL\Exception;
use Throwable;
/** /**
* Marker interface for all exceptions where retrying the transaction makes sense. * Marker interface for all exceptions where retrying the transaction makes sense.
*
* @psalm-immutable
*/ */
interface RetryableException interface RetryableException extends Throwable
{ {
} }
...@@ -37,10 +37,6 @@ ...@@ -37,10 +37,6 @@
</properties> </properties>
</rule> </rule>
<rule ref="Squiz.NamingConventions.ValidVariableName.PublicHasUnderscore">
<exclude-pattern>*/lib/*</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint"> <rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint">
<exclude-pattern>*/lib/*</exclude-pattern> <exclude-pattern>*/lib/*</exclude-pattern>
</rule> </rule>
...@@ -65,11 +61,6 @@ ...@@ -65,11 +61,6 @@
<exclude-pattern>tests/Doctrine/Tests/DBAL/Tools/TestAsset/*</exclude-pattern> <exclude-pattern>tests/Doctrine/Tests/DBAL/Tools/TestAsset/*</exclude-pattern>
</rule> </rule>
<!-- https://github.com/slevomat/coding-standard/issues/868 -->
<rule ref="SlevomatCodingStandard.PHP.UselessParentheses.UselessParentheses">
<exclude-pattern>tests/continuousphp/bootstrap.php</exclude-pattern>
</rule>
<!-- see https://github.com/squizlabs/PHP_CodeSniffer/issues/2099 --> <!-- see https://github.com/squizlabs/PHP_CodeSniffer/issues/2099 -->
<rule ref="Squiz.Commenting.FunctionComment.InvalidNoReturn"> <rule ref="Squiz.Commenting.FunctionComment.InvalidNoReturn">
<exclude-pattern>lib/Doctrine/DBAL/Platforms/AbstractPlatform.php</exclude-pattern> <exclude-pattern>lib/Doctrine/DBAL/Platforms/AbstractPlatform.php</exclude-pattern>
...@@ -107,11 +98,6 @@ ...@@ -107,11 +98,6 @@
<exclude-pattern>lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php</exclude-pattern> <exclude-pattern>lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php</exclude-pattern>
</rule> </rule>
<!-- sqlsrv functions are documented in upper case but reflected in lower case -->
<rule ref="Squiz.PHP.LowercasePHPFunctions.CallUppercase">
<exclude-pattern>lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php</exclude-pattern>
</rule>
<!-- see https://github.com/doctrine/dbal/issues/3377 --> <!-- see https://github.com/doctrine/dbal/issues/3377 -->
<rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators.DisallowedNotEqualOperator"> <rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators.DisallowedNotEqualOperator">
<exclude-pattern>lib/Doctrine/DBAL/Schema/Comparator.php</exclude-pattern> <exclude-pattern>lib/Doctrine/DBAL/Schema/Comparator.php</exclude-pattern>
......
...@@ -13,19 +13,4 @@ use Doctrine\DBAL\DriverManager; ...@@ -13,19 +13,4 @@ use Doctrine\DBAL\DriverManager;
'password' => 'ORACLE', 'password' => 'ORACLE',
'dbname' => 'XE', 'dbname' => 'XE',
])->query('ALTER USER ORACLE IDENTIFIED BY ORACLE'); ])->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);
});
})(); })();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment