Unverified Commit 79c34f77 authored by Sergei Morozov's avatar Sergei Morozov

Merge branch '2.11.x' into 3.0.x

parents f9706971 53b101bb
...@@ -132,6 +132,9 @@ jobs: ...@@ -132,6 +132,9 @@ jobs:
- stage: Test - stage: Test
php: 7.4 php: 7.4
env: DB=mysqli.docker IMAGE=mysql:8.0 env: DB=mysqli.docker IMAGE=mysql:8.0
- stage: Test
php: 7.4
env: DB=mysqli-tls.docker IMAGE=mysql:8.0 TLS=yes
- stage: Test - stage: Test
php: 7.4 php: 7.4
env: DB=mariadb.docker IMAGE=mariadb:10.3 env: DB=mariadb.docker IMAGE=mariadb:10.3
......
...@@ -343,6 +343,10 @@ Please use other database client applications for import, e.g.: ...@@ -343,6 +343,10 @@ Please use other database client applications for import, e.g.:
# Upgrade to 2.11 # Upgrade to 2.11
## Deprecated `Synchronizer` package
The `Doctrine\DBAL\Schema\Synchronizer\SchemaSynchronizer` interface and all its implementations are deprecated.
## Deprecated usage of wrapper-level components as implementations of driver-level interfaces ## Deprecated usage of wrapper-level components as implementations of driver-level interfaces
The usage of the wrapper `Connection` and `Statement` classes as implementations of the `Driver\Connection` and `Driver\Statement` interfaces is deprecated. The usage of the wrapper `Connection` and `Statement` classes as implementations of the `Driver\Connection` and `Driver\Statement` interfaces is deprecated.
......
...@@ -28,11 +28,4 @@ ...@@ -28,11 +28,4 @@
<directory suffix=".php">../../src</directory> <directory suffix=".php">../../src</directory>
</include> </include>
</coverage> </coverage>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit> </phpunit>
...@@ -28,11 +28,4 @@ ...@@ -28,11 +28,4 @@
<directory suffix=".php">../../src</directory> <directory suffix=".php">../../src</directory>
</include> </include>
</coverage> </coverage>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit> </phpunit>
...@@ -28,11 +28,4 @@ ...@@ -28,11 +28,4 @@
<directory suffix=".php">../../src</directory> <directory suffix=".php">../../src</directory>
</include> </include>
</coverage> </coverage>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit> </phpunit>
...@@ -28,11 +28,4 @@ ...@@ -28,11 +28,4 @@
<directory suffix=".php">../../src</directory> <directory suffix=".php">../../src</directory>
</include> </include>
</coverage> </coverage>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit> </phpunit>
...@@ -40,3 +40,11 @@ while true; do ...@@ -40,3 +40,11 @@ while true; do
;; ;;
esac esac
done done
if [[ "$TLS" == "yes" ]]
then
for file in "ca.pem" "client-cert.pem" "client-key.pem"
do
docker cp "rdbms:/var/lib/mysql/$file" .
done
fi
...@@ -28,11 +28,4 @@ ...@@ -28,11 +28,4 @@
<directory suffix=".php">../../src</directory> <directory suffix=".php">../../src</directory>
</include> </include>
</coverage> </coverage>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit> </phpunit>
...@@ -28,11 +28,4 @@ ...@@ -28,11 +28,4 @@
<directory suffix=".php">../../src</directory> <directory suffix=".php">../../src</directory>
</include> </include>
</coverage> </coverage>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit> </phpunit>
...@@ -28,11 +28,4 @@ ...@@ -28,11 +28,4 @@
<directory suffix=".php">../../src</directory> <directory suffix=".php">../../src</directory>
</include> </include>
</coverage> </coverage>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit> </phpunit>
...@@ -28,11 +28,4 @@ ...@@ -28,11 +28,4 @@
<directory suffix=".php">../../src</directory> <directory suffix=".php">../../src</directory>
</include> </include>
</coverage> </coverage>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit> </phpunit>
<?xml version="1.0" encoding="utf-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../vendor/phpunit/phpunit/schema/9.3.xsd"
colors="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
failOnRisky="true"
failOnWarning="true"
>
<php>
<var name="db_driver" value="mysqli"/>
<var name="db_host" value="127.0.0.1"/>
<var name="db_port" value="33306"/>
<var name="db_ssl_ca" value="ca.pem"/>
<var name="db_ssl_cert" value="client-cert.pem"/>
<var name="db_ssl_key" value="client-key.pem"/>
<!-- Use MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT since there's no way to generate a certificate
with a proper common name (CN) on Travis. This flag must be not used in production settings. -->
<var name="db_driver_option_flags" value="64"/>
<var name="db_user" value="root"/>
<var name="db_dbname" value="doctrine_tests"/>
</php>
<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>../../tests</directory>
</testsuite>
</testsuites>
<coverage>
<include>
<directory suffix=".php">../../src</directory>
</include>
</coverage>
</phpunit>
...@@ -28,11 +28,4 @@ ...@@ -28,11 +28,4 @@
<directory suffix=".php">../../src</directory> <directory suffix=".php">../../src</directory>
</include> </include>
</coverage> </coverage>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit> </phpunit>
...@@ -28,11 +28,4 @@ ...@@ -28,11 +28,4 @@
<directory suffix=".php">../../src</directory> <directory suffix=".php">../../src</directory>
</include> </include>
</coverage> </coverage>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit> </phpunit>
...@@ -27,11 +27,4 @@ ...@@ -27,11 +27,4 @@
<directory suffix=".php">../../src</directory> <directory suffix=".php">../../src</directory>
</include> </include>
</coverage> </coverage>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit> </phpunit>
...@@ -22,11 +22,4 @@ ...@@ -22,11 +22,4 @@
<directory suffix=".php">../../src</directory> <directory suffix=".php">../../src</directory>
</include> </include>
</coverage> </coverage>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit> </phpunit>
...@@ -28,11 +28,4 @@ ...@@ -28,11 +28,4 @@
<directory suffix=".php">../../src</directory> <directory suffix=".php">../../src</directory>
</include> </include>
</coverage> </coverage>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit> </phpunit>
...@@ -50,7 +50,7 @@ constants: ...@@ -50,7 +50,7 @@ constants:
The default transaction isolation level of a The default transaction isolation level of a
``Doctrine\DBAL\Connection`` is chosen by the underlying platform ``Doctrine\DBAL\Connection`` is chosen by the underlying platform
but it is always at least READ\_COMMITTED. but it is always at least ``READ_COMMITTED``.
Transaction Nesting Transaction Nesting
------------------- -------------------
......
...@@ -8,6 +8,8 @@ use Throwable; ...@@ -8,6 +8,8 @@ use Throwable;
/** /**
* Abstract schema synchronizer with methods for executing batches of SQL. * Abstract schema synchronizer with methods for executing batches of SQL.
*
* @deprecated
*/ */
abstract class AbstractSchemaSynchronizer implements SchemaSynchronizer abstract class AbstractSchemaSynchronizer implements SchemaSynchronizer
{ {
......
...@@ -7,6 +7,8 @@ use Doctrine\DBAL\Schema\Schema; ...@@ -7,6 +7,8 @@ use Doctrine\DBAL\Schema\Schema;
/** /**
* The synchronizer knows how to synchronize a schema with the configured * The synchronizer knows how to synchronize a schema with the configured
* database. * database.
*
* @deprecated
*/ */
interface SchemaSynchronizer interface SchemaSynchronizer
{ {
......
...@@ -12,6 +12,8 @@ use function count; ...@@ -12,6 +12,8 @@ use function count;
/** /**
* Schema Synchronizer for Default DBAL Connection. * Schema Synchronizer for Default DBAL Connection.
*
* @deprecated
*/ */
class SingleDatabaseSynchronizer extends AbstractSchemaSynchronizer class SingleDatabaseSynchronizer extends AbstractSchemaSynchronizer
{ {
......
...@@ -61,6 +61,14 @@ class ConnectionTest extends FunctionalTestCase ...@@ -61,6 +61,14 @@ class ConnectionTest extends FunctionalTestCase
{ {
$params = TestUtil::getConnectionParams(); $params = TestUtil::getConnectionParams();
if (isset($params['driverOptions'])) {
// Currently, MySQLi driver options may be either numeric MYSQLI_* keys
// or the {@link Connection::OPTION_FLAGS} string key.
// The options should be merged using array union instead of array_merge()
// to preserve the numeric keys.
$driverOptions += $params['driverOptions'];
}
return (new Driver())->connect( return (new Driver())->connect(
array_merge( array_merge(
$params, $params,
......
...@@ -42,9 +42,15 @@ class DriverTest extends AbstractDriverTest ...@@ -42,9 +42,15 @@ class DriverTest extends AbstractDriverTest
*/ */
private function getConnection(array $driverOptions): Connection private function getConnection(array $driverOptions): Connection
{ {
$params = TestUtil::getConnectionParams();
if (isset($params['driverOptions'])) {
$driverOptions = array_merge($params['driverOptions'], $driverOptions);
}
return $this->connection->getDriver()->connect( return $this->connection->getDriver()->connect(
array_merge( array_merge(
TestUtil::getConnectionParams(), $params,
['driverOptions' => $driverOptions] ['driverOptions' => $driverOptions]
) )
); );
......
...@@ -15,6 +15,9 @@ use function explode; ...@@ -15,6 +15,9 @@ use function explode;
use function extension_loaded; use function extension_loaded;
use function implode; use function implode;
use function is_string; use function is_string;
use function strlen;
use function strpos;
use function substr;
use function unlink; use function unlink;
/** /**
...@@ -187,6 +190,11 @@ class TestUtil ...@@ -187,6 +190,11 @@ class TestUtil
'dbname', 'dbname',
'port', 'port',
'server', 'server',
'ssl_key',
'ssl_cert',
'ssl_ca',
'ssl_capath',
'ssl_cipher',
'unix_socket', 'unix_socket',
] as $parameter ] as $parameter
) { ) {
...@@ -197,6 +205,14 @@ class TestUtil ...@@ -197,6 +205,14 @@ class TestUtil
$parameters[$parameter] = $configuration[$prefix . $parameter]; $parameters[$parameter] = $configuration[$prefix . $parameter];
} }
foreach ($configuration as $param => $value) {
if (strpos($param, $prefix . 'driver_option_') !== 0) {
continue;
}
$parameters['driverOptions'][substr($param, strlen($prefix . 'driver_option_'))] = $value;
}
return $parameters; return $parameters;
} }
......
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