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

Merge branch '3.0.x'

parents 7811e4ee 61629103
......@@ -127,9 +127,9 @@ before_test:
test_script:
- ps: >-
if ($env:db_version) {
$env:phpunit_config = "tests\appveyor\$($env:db).$($env:db_version).$($env:driver).appveyor.xml"
$env:phpunit_config = "ci\appveyor\$($env:db).$($env:db_version).$($env:driver).appveyor.xml"
} else {
$env:phpunit_config = "tests\appveyor\$($env:db).$($env:driver).appveyor.xml"
$env:phpunit_config = "ci\appveyor\$($env:db).$($env:driver).appveyor.xml"
}
if ($env:coverage -eq "yes") {
......
......@@ -17,7 +17,7 @@ before_script:
- |
if [[ -n "$IMAGE" ]]
then
bash ./tests/travis/docker-run-mysql-or-mariadb.sh
bash ./ci/travis/docker-run-mysql-or-mariadb.sh
fi
install:
......@@ -30,9 +30,9 @@ install:
script:
- |
if [ "x$COVERAGE" == "xyes" ]; then
./vendor/bin/phpunit --configuration tests/travis/$DB.travis.xml --coverage-clover clover.xml
./vendor/bin/phpunit --configuration ci/travis/$DB.travis.xml --coverage-clover clover.xml
else
./vendor/bin/phpunit --configuration tests/travis/$DB.travis.xml
./vendor/bin/phpunit --configuration ci/travis/$DB.travis.xml
fi
after_script:
......@@ -117,36 +117,36 @@ jobs:
addons:
postgresql: "10"
before_script:
- bash ./tests/travis/install-postgres-10.sh
- bash ./ci/travis/install-postgres-10.sh
- stage: Test
php: 7.3
env: DB=pgsql POSTGRESQL_VERSION=11.0 COVERAGE=yes
sudo: required
before_script:
- bash ./tests/travis/install-postgres-11.sh
- bash ./ci/travis/install-postgres-11.sh
- stage: Test
php: 7.3
env: DB=sqlsrv COVERAGE=yes
sudo: required
before_script:
- bash ./tests/travis/install-sqlsrv-dependencies.sh
- bash ./tests/travis/install-mssql-sqlsrv.sh
- bash ./tests/travis/install-mssql.sh
- 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
sudo: required
before_script:
- bash ./tests/travis/install-sqlsrv-dependencies.sh
- bash ./tests/travis/install-mssql-pdo_sqlsrv.sh
- bash ./tests/travis/install-mssql.sh
- 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
sudo: required
before_script:
- bash ./tests/travis/install-db2.sh
- bash ./tests/travis/install-db2-ibm_db2.sh
- bash ./ci/travis/install-db2.sh
- bash ./ci/travis/install-db2-ibm_db2.sh
- stage: Test
php: 7.3
env: DB=sqlite DEPENDENCIES=low
......@@ -169,7 +169,7 @@ jobs:
env: DB=pgsql POSTGRESQL_VERSION=11.0
sudo: required
before_script:
- bash ./tests/travis/install-postgres-11.sh
- bash ./ci/travis/install-postgres-11.sh
- stage: Test
php: 7.4
env: DB=sqlite
......@@ -178,17 +178,17 @@ jobs:
env: DB=sqlsrv
sudo: required
before_script:
- bash ./tests/travis/install-sqlsrv-dependencies.sh
- bash ./tests/travis/install-mssql-sqlsrv.sh
- bash ./tests/travis/install-mssql.sh
- bash ./ci/travis/install-sqlsrv-dependencies.sh
- bash ./ci/travis/install-mssql-sqlsrv.sh
- bash ./ci/travis/install-mssql.sh
- stage: Test
php: 7.4
env: DB=pdo_sqlsrv
sudo: required
before_script:
- bash ./tests/travis/install-sqlsrv-dependencies.sh
- bash ./tests/travis/install-mssql-pdo_sqlsrv.sh
- bash ./tests/travis/install-mssql.sh
- bash ./ci/travis/install-sqlsrv-dependencies.sh
- bash ./ci/travis/install-mssql-pdo_sqlsrv.sh
- bash ./ci/travis/install-mssql.sh
- stage: Test
php: nightly
......@@ -207,7 +207,7 @@ jobs:
env: DB=pgsql POSTGRESQL_VERSION=11.0
sudo: required
before_script:
- bash ./tests/travis/install-postgres-11.sh
- bash ./ci/travis/install-postgres-11.sh
- stage: Test
php: nightly
env: DB=sqlite
......@@ -216,17 +216,17 @@ jobs:
env: DB=sqlsrv
sudo: required
before_script:
- bash ./tests/travis/install-sqlsrv-dependencies.sh
- bash ./tests/travis/install-mssql-sqlsrv.sh
- bash ./tests/travis/install-mssql.sh
- bash ./ci/travis/install-sqlsrv-dependencies.sh
- bash ./ci/travis/install-mssql-sqlsrv.sh
- bash ./ci/travis/install-mssql.sh
- stage: Test
php: nightly
env: DB=pdo_sqlsrv
sudo: required
before_script:
- bash ./tests/travis/install-sqlsrv-dependencies.sh
- bash ./tests/travis/install-mssql-pdo_sqlsrv.sh
- bash ./tests/travis/install-mssql.sh
- bash ./ci/travis/install-sqlsrv-dependencies.sh
- bash ./ci/travis/install-mssql-pdo_sqlsrv.sh
- bash ./ci/travis/install-mssql.sh
- stage: Test
if: type = cron
......
......@@ -27,13 +27,13 @@
<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>../Doctrine/Tests/DBAL</directory>
<directory>../../tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">../../lib/Doctrine</directory>
<directory suffix=".php">../../src</directory>
</whitelist>
</filter>
......
......@@ -27,13 +27,13 @@
<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>../Doctrine/Tests/DBAL</directory>
<directory>../../tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">../../lib/Doctrine</directory>
<directory suffix=".php">../../src</directory>
</whitelist>
</filter>
......
......@@ -27,13 +27,13 @@
<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>../Doctrine/Tests/DBAL</directory>
<directory>../../tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">../../lib/Doctrine</directory>
<directory suffix=".php">../../src</directory>
</whitelist>
</filter>
......
......@@ -27,13 +27,13 @@
<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>../Doctrine/Tests/DBAL</directory>
<directory>../../tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">../../lib/Doctrine</directory>
<directory suffix=".php">../../src</directory>
</whitelist>
</filter>
......
......@@ -29,13 +29,13 @@
<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>../Doctrine/Tests/DBAL</directory>
<directory>../../tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">../../lib/Doctrine</directory>
<directory suffix=".php">../../src</directory>
</whitelist>
</filter>
......
......@@ -27,13 +27,13 @@
<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>../Doctrine/Tests/DBAL</directory>
<directory>../../tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">../../lib/Doctrine</directory>
<directory suffix=".php">../../src</directory>
</whitelist>
</filter>
......
......@@ -27,13 +27,13 @@
<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>../Doctrine/Tests/DBAL</directory>
<directory>../../tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">../../lib/Doctrine</directory>
<directory suffix=".php">../../src</directory>
</whitelist>
</filter>
......
......@@ -26,13 +26,13 @@
<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>../Doctrine/Tests/DBAL</directory>
<directory>../../tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">../../lib/Doctrine</directory>
<directory suffix=".php">../../src</directory>
</whitelist>
</filter>
......
......@@ -26,13 +26,13 @@
<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>../Doctrine/Tests/DBAL</directory>
<directory>../../tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">../../lib/Doctrine</directory>
<directory suffix=".php">../../src</directory>
</whitelist>
</filter>
......
......@@ -26,13 +26,13 @@
<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>../Doctrine/Tests/DBAL</directory>
<directory>../../tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">../../lib/Doctrine</directory>
<directory suffix=".php">../../src</directory>
</whitelist>
</filter>
......
......@@ -26,13 +26,13 @@
<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>../Doctrine/Tests/DBAL</directory>
<directory>../../tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">../../lib/Doctrine</directory>
<directory suffix=".php">../../src</directory>
</whitelist>
</filter>
......
......@@ -26,13 +26,13 @@
<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>../Doctrine/Tests/DBAL</directory>
<directory>../../tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">../../lib/Doctrine</directory>
<directory suffix=".php">../../src</directory>
</whitelist>
</filter>
......
......@@ -26,13 +26,13 @@
<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>../Doctrine/Tests/DBAL</directory>
<directory>../../tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">../../lib/Doctrine</directory>
<directory suffix=".php">../../src</directory>
</whitelist>
</filter>
......
......@@ -13,13 +13,13 @@
<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>../Doctrine/Tests/DBAL</directory>
<directory>../../tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">../../lib/Doctrine</directory>
<directory suffix=".php">../../src</directory>
</whitelist>
</filter>
......
......@@ -26,13 +26,13 @@
<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>../Doctrine/Tests/DBAL</directory>
<directory>../../tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">../../lib/Doctrine</directory>
<directory suffix=".php">../../src</directory>
</whitelist>
</filter>
......
......@@ -56,10 +56,10 @@
"sort-packages": true
},
"autoload": {
"psr-4": { "Doctrine\\DBAL\\": "lib/Doctrine/DBAL" }
"psr-4": { "Doctrine\\DBAL\\": "src" }
},
"autoload-dev": {
"psr-4": { "Doctrine\\Tests\\": "tests/Doctrine/Tests" }
"psr-4": { "Doctrine\\DBAL\\Tests\\": "tests" }
},
"extra": {
"branch-alias": {
......
......@@ -47,4 +47,4 @@ object is closed:
.. warning::
When using the cache layer not all fetch modes are supported. See the code of the `ResultCacheStatement <https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Cache/ResultCacheStatement.php>`_ for details.
When using the cache layer not all fetch modes are supported. See the code of the `ResultCacheStatement <https://github.com/doctrine/dbal/blob/master/src/Cache/ResultCacheStatement.php>`_ for details.
......@@ -15,12 +15,12 @@ For an already supported platform but unsupported driver you only
need to implement the first three interfaces, since the SQL
Generation and Schema Management is already supported by the
respective platform and schema instances. You can also make use of
several Abstract Unittests in the ``\Doctrine\Tests\DBAL`` package
several Abstract Unittests in the ``\Doctrine\DBAL\Tests`` package
to check if your platform behaves like all the others which is
necessary for SchemaTool support, namely:
- ``\Doctrine\Tests\DBAL\Platforms\AbstractPlatformTestCase``
- ``\Doctrine\Tests\DBAL\Functional\Schema\AbstractSchemaManagerTestCase``
- ``\Doctrine\DBAL\Tests\Platforms\AbstractPlatformTestCase``
- ``\Doctrine\DBAL\Tests\Functional\Schema\AbstractSchemaManagerTestCase``
We would be very happy if any support for new databases would be
contributed back to Doctrine to make it an even better product.
......
......@@ -13,7 +13,7 @@
<arg value="nps"/>
<file>bin</file>
<file>lib</file>
<file>src</file>
<file>tests</file>
<rule ref="Doctrine">
......@@ -47,67 +47,67 @@
</rule>
<rule ref="Generic.NamingConventions.UpperCaseConstantName.ClassConstantNotUpperCase">
<exclude-pattern>lib/Doctrine/DBAL/Events.php</exclude-pattern>
<exclude-pattern>src/Events.php</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.Classes.UnusedPrivateElements.UnusedProperty">
<exclude-pattern>tests/Doctrine/Tests/DBAL/Tools/TestAsset/*</exclude-pattern>
<exclude-pattern>tests/Tools/TestAsset/*</exclude-pattern>
</rule>
<!-- https://github.com/slevomat/coding-standard/issues/868 -->
<rule ref="SlevomatCodingStandard.PHP.UselessParentheses.UselessParentheses">
<exclude-pattern>tests/continuousphp/bootstrap.php</exclude-pattern>
<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>lib/Doctrine/DBAL/Platforms/AbstractPlatform.php</exclude-pattern>
<exclude-pattern>lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php</exclude-pattern>
<exclude-pattern>tests/Doctrine/Tests/DBAL/Platforms/AbstractPlatformTestCase.php</exclude-pattern>
<exclude-pattern>src/Platforms/AbstractPlatform.php</exclude-pattern>
<exclude-pattern>src/Schema/AbstractSchemaManager.php</exclude-pattern>
<exclude-pattern>tests/Platforms/AbstractPlatformTestCase.php</exclude-pattern>
</rule>
<!-- see https://github.com/squizlabs/PHP_CodeSniffer/issues/2838 -->
<rule ref="Squiz.Commenting.FunctionComment.SpacingAfter">
<exclude-pattern>lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php</exclude-pattern>
<exclude-pattern>src/Driver/AbstractMySQLDriver.php</exclude-pattern>
</rule>
<rule ref="Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps">
<exclude-pattern>tests/Doctrine/Tests/DBAL/Functional/DataAccess/FetchClass.php</exclude-pattern>
<exclude-pattern>tests/Functional/DataAccess/FetchClass.php</exclude-pattern>
</rule>
<!-- https://github.com/squizlabs/PHP_CodeSniffer/issues/2837 -->
<rule ref="Squiz.NamingConventions.ValidVariableName.NotCamelCaps">
<exclude-pattern>lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php</exclude-pattern>
<exclude-pattern>lib/Doctrine/DBAL/SQLParserUtils.php</exclude-pattern>
<exclude-pattern>lib/Doctrine/DBAL/Tools/Dumper.php</exclude-pattern>
<exclude-pattern>tests/Doctrine/Tests/DBAL/Driver/StatementIteratorTest.php</exclude-pattern>
<exclude-pattern>tests/Doctrine/Tests/DBAL/Tools/DumperTest.php</exclude-pattern>
<exclude-pattern>src/Driver/IBMDB2/DB2Connection.php</exclude-pattern>
<exclude-pattern>src/SQLParserUtils.php</exclude-pattern>
<exclude-pattern>src/Tools/Dumper.php</exclude-pattern>
<exclude-pattern>tests/Driver/StatementIteratorTest.php</exclude-pattern>
<exclude-pattern>tests/Tools/DumperTest.php</exclude-pattern>
</rule>
<!-- some statement classes close cursor using an empty while-loop -->
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedWhile">
<exclude-pattern>lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php</exclude-pattern>
<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>lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php</exclude-pattern>
<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>lib/Doctrine/DBAL/Schema/Comparator.php</exclude-pattern>
<exclude-pattern>src/Schema/Comparator.php</exclude-pattern>
</rule>
<!-- DB2_AUTOCOMMIT_ON/DB2_AUTOCOMMIT_OFF are of int type but db2_autocommit() incorrectly expects bool,
see https://bugs.php.net/bug.php?id=77591 -->
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing">
<exclude-pattern>lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php</exclude-pattern>
<exclude-pattern>src/Driver/IBMDB2/DB2Connection.php</exclude-pattern>
</rule>
<!-- The SQLSRV_* functions are defined in the upper case by the sqlsrv extension and violate the standard
see https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server -->
<rule ref="Squiz.PHP.LowercasePHPFunctions.UseStatementUppercase">
<exclude-pattern>lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php</exclude-pattern>
<exclude-pattern>src/Driver/SQLSrv/SQLSrvStatement.php</exclude-pattern>
</rule>
</ruleset>
parameters:
level: 7
paths:
- %currentWorkingDirectory%/lib
- %currentWorkingDirectory%/src
- %currentWorkingDirectory%/tests
autoload_files:
- %currentWorkingDirectory%/tests/phpstan-polyfill.php
......@@ -26,7 +26,7 @@ parameters:
# https://github.com/doctrine/dbal/pull/3582/files#r290847062
-
message: '~Parameter #3 \$type of method Doctrine\\DBAL\\Driver\\Statement::bindValue\(\) expects int, string given\.~'
path: %currentWorkingDirectory%/tests/Doctrine/Tests/DBAL/Functional/DataAccessTest.php
path: %currentWorkingDirectory%/tests/Functional/DataAccessTest.php
includes:
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-phpunit/rules.neon
......@@ -44,22 +44,22 @@
<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>./tests/Doctrine/Tests/DBAL</directory>
<exclude>./tests/Doctrine/Tests/DBAL/Performance</exclude>
<directory>./tests</directory>
<exclude>./tests/Performance</exclude>
</testsuite>
<testsuite name="Doctrine DBAL Performance Test Suite">
<directory>./tests/Doctrine/Tests/DBAL/Performance</directory>
<directory>./tests/Performance</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">lib/Doctrine</directory>
<directory suffix=".php">src</directory>
</whitelist>
</filter>
<listeners>
<listener class="Doctrine\Tests\DbalPerformanceTestListener"/>
<listener class="Doctrine\DBAL\Tests\PerformanceTestListener"/>
</listeners>
<groups>
......
This diff is collapsed.
This diff is collapsed.
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