Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
278d782a
Unverified
Commit
278d782a
authored
Aug 18, 2020
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.10.x' into 2.11.x
parents
dba0ea26
1f84cc8f
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
96 additions
and
10 deletions
+96
-10
.travis.yml
.travis.yml
+3
-0
transactions.rst
docs/en/reference/transactions.rst
+1
-1
AbstractDriverTest.php
...trine/Tests/DBAL/Functional/Driver/AbstractDriverTest.php
+4
-3
ConnectionTest.php
...ne/Tests/DBAL/Functional/Driver/Mysqli/ConnectionTest.php
+6
-0
DriverTest.php
...ine/Tests/DBAL/Functional/Driver/PDOSqlsrv/DriverTest.php
+6
-0
SchemaManagerFunctionalTestCase.php
...BAL/Functional/Schema/SchemaManagerFunctionalTestCase.php
+4
-3
SqliteSchemaManagerTest.php
.../Tests/DBAL/Functional/Schema/SqliteSchemaManagerTest.php
+4
-3
TestUtil.php
tests/Doctrine/Tests/TestUtil.php
+16
-0
docker-run-mysql-or-mariadb.sh
tests/travis/docker-run-mysql-or-mariadb.sh
+8
-0
mysqli-tls.docker.travis.xml
tests/travis/mysqli-tls.docker.travis.xml
+44
-0
No files found.
.travis.yml
View file @
278d782a
...
@@ -148,6 +148,9 @@ jobs:
...
@@ -148,6 +148,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
...
...
docs/en/reference/transactions.rst
View file @
278d782a
...
@@ -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
-------------------
-------------------
...
...
tests/Doctrine/Tests/DBAL/Functional/Driver/AbstractDriverTest.php
View file @
278d782a
...
@@ -30,8 +30,9 @@ abstract class AbstractDriverTest extends DbalFunctionalTestCase
...
@@ -30,8 +30,9 @@ abstract class AbstractDriverTest extends DbalFunctionalTestCase
$user
=
$params
[
'user'
]
??
null
;
$user
=
$params
[
'user'
]
??
null
;
$password
=
$params
[
'password'
]
??
null
;
$password
=
$params
[
'password'
]
??
null
;
$driverOptions
=
$params
[
'driverOptions'
]
??
[];
$connection
=
$this
->
driver
->
connect
(
$params
,
$user
,
$password
);
$connection
=
$this
->
driver
->
connect
(
$params
,
$user
,
$password
,
$driverOptions
);
self
::
assertInstanceOf
(
DriverConnection
::
class
,
$connection
);
self
::
assertInstanceOf
(
DriverConnection
::
class
,
$connection
);
}
}
...
...
tests/Doctrine/Tests/DBAL/Functional/Driver/Mysqli/ConnectionTest.php
View file @
278d782a
...
@@ -8,6 +8,8 @@ use Doctrine\DBAL\Driver\Mysqli\MysqliException;
...
@@ -8,6 +8,8 @@ use Doctrine\DBAL\Driver\Mysqli\MysqliException;
use
Doctrine\Tests\DbalFunctionalTestCase
;
use
Doctrine\Tests\DbalFunctionalTestCase
;
use
Doctrine\Tests\TestUtil
;
use
Doctrine\Tests\TestUtil
;
use
function
array_merge
;
use
const
MYSQLI_OPT_CONNECT_TIMEOUT
;
use
const
MYSQLI_OPT_CONNECT_TIMEOUT
;
/**
/**
...
@@ -54,6 +56,10 @@ class ConnectionTest extends DbalFunctionalTestCase
...
@@ -54,6 +56,10 @@ class ConnectionTest extends DbalFunctionalTestCase
{
{
$params
=
TestUtil
::
getConnectionParams
();
$params
=
TestUtil
::
getConnectionParams
();
if
(
isset
(
$params
[
'driverOptions'
]))
{
$driverOptions
=
array_merge
(
$params
[
'driverOptions'
],
$driverOptions
);
}
return
new
Connection
(
return
new
Connection
(
$params
,
$params
,
$params
[
'user'
]
??
''
,
$params
[
'user'
]
??
''
,
...
...
tests/Doctrine/Tests/DBAL/Functional/Driver/PDOSqlsrv/DriverTest.php
View file @
278d782a
...
@@ -9,6 +9,8 @@ use Doctrine\Tests\DBAL\Functional\Driver\AbstractDriverTest;
...
@@ -9,6 +9,8 @@ use Doctrine\Tests\DBAL\Functional\Driver\AbstractDriverTest;
use
Doctrine\Tests\TestUtil
;
use
Doctrine\Tests\TestUtil
;
use
PDO
;
use
PDO
;
use
function
array_merge
;
/**
/**
* @requires extension pdo_sqlsrv
* @requires extension pdo_sqlsrv
*/
*/
...
@@ -42,6 +44,10 @@ class DriverTest extends AbstractDriverTest
...
@@ -42,6 +44,10 @@ class DriverTest extends AbstractDriverTest
{
{
$params
=
TestUtil
::
getConnectionParams
();
$params
=
TestUtil
::
getConnectionParams
();
if
(
isset
(
$params
[
'driverOptions'
]))
{
$driverOptions
=
array_merge
(
$params
[
'driverOptions'
],
$driverOptions
);
}
return
$this
->
connection
->
getDriver
()
->
connect
(
return
$this
->
connection
->
getDriver
()
->
connect
(
$params
,
$params
,
$params
[
'user'
]
??
''
,
$params
[
'user'
]
??
''
,
...
...
tests/Doctrine/Tests/DBAL/Functional/Schema/SchemaManagerFunctionalTestCase.php
View file @
278d782a
...
@@ -116,8 +116,9 @@ abstract class SchemaManagerFunctionalTestCase extends DbalFunctionalTestCase
...
@@ -116,8 +116,9 @@ abstract class SchemaManagerFunctionalTestCase extends DbalFunctionalTestCase
$user
=
$params
[
'user'
]
??
null
;
$user
=
$params
[
'user'
]
??
null
;
$password
=
$params
[
'password'
]
??
null
;
$password
=
$params
[
'password'
]
??
null
;
$driverOptions
=
$params
[
'driverOptions'
]
??
[];
$connection
=
$this
->
connection
->
getDriver
()
->
connect
(
$params
,
$user
,
$password
);
$connection
=
$this
->
connection
->
getDriver
()
->
connect
(
$params
,
$user
,
$password
,
$driverOptions
);
self
::
assertInstanceOf
(
Connection
::
class
,
$connection
);
self
::
assertInstanceOf
(
Connection
::
class
,
$connection
);
...
...
tests/Doctrine/Tests/DBAL/Functional/Schema/SqliteSchemaManagerTest.php
View file @
278d782a
...
@@ -45,8 +45,9 @@ class SqliteSchemaManagerTest extends SchemaManagerFunctionalTestCase
...
@@ -45,8 +45,9 @@ class SqliteSchemaManagerTest extends SchemaManagerFunctionalTestCase
$user
=
$params
[
'user'
]
??
null
;
$user
=
$params
[
'user'
]
??
null
;
$password
=
$params
[
'password'
]
??
null
;
$password
=
$params
[
'password'
]
??
null
;
$driverOptions
=
$params
[
'driverOptions'
]
??
[];
$connection
=
$this
->
connection
->
getDriver
()
->
connect
(
$params
,
$user
,
$password
);
$connection
=
$this
->
connection
->
getDriver
()
->
connect
(
$params
,
$user
,
$password
,
$driverOptions
);
self
::
assertInstanceOf
(
Connection
::
class
,
$connection
);
self
::
assertInstanceOf
(
Connection
::
class
,
$connection
);
...
...
tests/Doctrine/Tests/TestUtil.php
View file @
278d782a
...
@@ -14,6 +14,9 @@ use function explode;
...
@@ -14,6 +14,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
;
/**
/**
...
@@ -181,6 +184,11 @@ class TestUtil
...
@@ -181,6 +184,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
)
{
)
{
...
@@ -191,6 +199,14 @@ class TestUtil
...
@@ -191,6 +199,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
;
}
}
...
...
tests/travis/docker-run-mysql-or-mariadb.sh
View file @
278d782a
...
@@ -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
tests/travis/mysqli-tls.docker.travis.xml
0 → 100644
View file @
278d782a
<?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>
../Doctrine/Tests/DBAL
</directory>
</testsuite>
</testsuites>
<coverage>
<include>
<directory
suffix=
".php"
>
../../lib/Doctrine
</directory>
</include>
</coverage>
<groups>
<exclude>
<group>
performance
</group>
<group>
locking_functional
</group>
</exclude>
</groups>
</phpunit>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment