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:
- stage: Test
php: 7.4
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
php: 7.4
env: DB=mariadb.docker IMAGE=mariadb:10.3
......
......@@ -343,6 +343,10 @@ Please use other database client applications for import, e.g.:
# 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
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 @@
<directory suffix=".php">../../src</directory>
</include>
</coverage>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit>
......@@ -28,11 +28,4 @@
<directory suffix=".php">../../src</directory>
</include>
</coverage>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit>
......@@ -28,11 +28,4 @@
<directory suffix=".php">../../src</directory>
</include>
</coverage>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit>
......@@ -28,11 +28,4 @@
<directory suffix=".php">../../src</directory>
</include>
</coverage>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit>
......@@ -40,3 +40,11 @@ while true; do
;;
esac
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 @@
<directory suffix=".php">../../src</directory>
</include>
</coverage>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit>
......@@ -28,11 +28,4 @@
<directory suffix=".php">../../src</directory>
</include>
</coverage>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit>
......@@ -28,11 +28,4 @@
<directory suffix=".php">../../src</directory>
</include>
</coverage>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit>
......@@ -28,11 +28,4 @@
<directory suffix=".php">../../src</directory>
</include>
</coverage>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</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 @@
<directory suffix=".php">../../src</directory>
</include>
</coverage>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit>
......@@ -28,11 +28,4 @@
<directory suffix=".php">../../src</directory>
</include>
</coverage>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit>
......@@ -27,11 +27,4 @@
<directory suffix=".php">../../src</directory>
</include>
</coverage>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit>
......@@ -22,11 +22,4 @@
<directory suffix=".php">../../src</directory>
</include>
</coverage>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit>
......@@ -28,11 +28,4 @@
<directory suffix=".php">../../src</directory>
</include>
</coverage>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit>
......@@ -50,7 +50,7 @@ constants:
The default transaction isolation level of a
``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
-------------------
......
......@@ -8,6 +8,8 @@ use Throwable;
/**
* Abstract schema synchronizer with methods for executing batches of SQL.
*
* @deprecated
*/
abstract class AbstractSchemaSynchronizer implements SchemaSynchronizer
{
......
......@@ -7,6 +7,8 @@ use Doctrine\DBAL\Schema\Schema;
/**
* The synchronizer knows how to synchronize a schema with the configured
* database.
*
* @deprecated
*/
interface SchemaSynchronizer
{
......
......@@ -12,6 +12,8 @@ use function count;
/**
* Schema Synchronizer for Default DBAL Connection.
*
* @deprecated
*/
class SingleDatabaseSynchronizer extends AbstractSchemaSynchronizer
{
......
......@@ -61,6 +61,14 @@ class ConnectionTest extends FunctionalTestCase
{
$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(
array_merge(
$params,
......
......@@ -42,9 +42,15 @@ class DriverTest extends AbstractDriverTest
*/
private function getConnection(array $driverOptions): Connection
{
$params = TestUtil::getConnectionParams();
if (isset($params['driverOptions'])) {
$driverOptions = array_merge($params['driverOptions'], $driverOptions);
}
return $this->connection->getDriver()->connect(
array_merge(
TestUtil::getConnectionParams(),
$params,
['driverOptions' => $driverOptions]
)
);
......
......@@ -15,6 +15,9 @@ use function explode;
use function extension_loaded;
use function implode;
use function is_string;
use function strlen;
use function strpos;
use function substr;
use function unlink;
/**
......@@ -187,6 +190,11 @@ class TestUtil
'dbname',
'port',
'server',
'ssl_key',
'ssl_cert',
'ssl_ca',
'ssl_capath',
'ssl_cipher',
'unix_socket',
] as $parameter
) {
......@@ -197,6 +205,14 @@ class TestUtil
$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;
}
......
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