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
f4c43d52
Unverified
Commit
f4c43d52
authored
Apr 21, 2020
by
Grégoire Paris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document actual types
parent
2348831a
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
22 additions
and
4 deletions
+22
-4
MysqliConnection.php
lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php
+4
-0
MysqliStatement.php
lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php
+2
-0
OCI8Connection.php
lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php
+2
-0
PDOConnection.php
lib/Doctrine/DBAL/Driver/PDOConnection.php
+7
-2
Connection.php
lib/Doctrine/DBAL/Portability/Connection.php
+2
-0
ResultCacheTest.php
tests/Doctrine/Tests/DBAL/Functional/ResultCacheTest.php
+1
-1
WriteTest.php
tests/Doctrine/Tests/DBAL/Functional/WriteTest.php
+3
-0
DbalPerformanceTestListener.php
tests/Doctrine/Tests/DbalPerformanceTestListener.php
+1
-1
No files found.
lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php
View file @
f4c43d52
...
...
@@ -200,6 +200,8 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
/**
* {@inheritdoc}
*
* @return int
*/
public
function
errorCode
()
{
...
...
@@ -208,6 +210,8 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
/**
* {@inheritdoc}
*
* @return string
*/
public
function
errorInfo
()
{
...
...
lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php
View file @
f4c43d52
...
...
@@ -401,6 +401,8 @@ class MysqliStatement implements IteratorAggregate, Statement
/**
* {@inheritdoc}
*
* @return string
*/
public
function
errorInfo
()
{
...
...
lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php
View file @
f4c43d52
...
...
@@ -148,6 +148,8 @@ class OCI8Connection implements Connection, ServerInfoAwareConnection
/**
* {@inheritdoc}
*
* @return int|false
*/
public
function
lastInsertId
(
$name
=
null
)
{
...
...
lib/Doctrine/DBAL/Driver/PDOConnection.php
View file @
f4c43d52
...
...
@@ -56,12 +56,15 @@ class PDOConnection extends PDO implements Connection, ServerInfoAwareConnection
* @param string $prepareString
* @param array<int, int> $driverOptions
*
* @return Statement
* @return
\PDO
Statement
*/
public
function
prepare
(
$prepareString
,
$driverOptions
=
[])
{
try
{
return
parent
::
prepare
(
$prepareString
,
$driverOptions
);
$statement
=
parent
::
prepare
(
$prepareString
,
$driverOptions
);
assert
(
$statement
instanceof
\PDOStatement
);
return
$statement
;
}
catch
(
\PDOException
$exception
)
{
throw
new
PDOException
(
$exception
);
}
...
...
@@ -69,6 +72,8 @@ class PDOConnection extends PDO implements Connection, ServerInfoAwareConnection
/**
* {@inheritdoc}
*
* @return \PDOStatement
*/
public
function
query
()
{
...
...
lib/Doctrine/DBAL/Portability/Connection.php
View file @
f4c43d52
...
...
@@ -108,6 +108,8 @@ class Connection extends \Doctrine\DBAL\Connection
/**
* {@inheritdoc}
*
* @return Statement
*/
public
function
prepare
(
$statement
)
{
...
...
tests/Doctrine/Tests/DBAL/Functional/ResultCacheTest.php
View file @
f4c43d52
...
...
@@ -21,7 +21,7 @@ use const CASE_LOWER;
*/
class
ResultCacheTest
extends
DbalFunctionalTestCase
{
/** @var
array<int, array<int, int|string>
> */
/** @var
list<array{test_int: int, test_string: string}
> */
private
$expectedResult
=
[[
'test_int'
=>
100
,
'test_string'
=>
'foo'
],
[
'test_int'
=>
200
,
'test_string'
=>
'bar'
],
[
'test_int'
=>
300
,
'test_string'
=>
'baz'
]];
/** @var DebugStack */
...
...
tests/Doctrine/Tests/DBAL/Functional/WriteTest.php
View file @
f4c43d52
...
...
@@ -7,6 +7,7 @@ use Doctrine\DBAL\Driver\DriverException;
use
Doctrine\DBAL\ParameterType
;
use
Doctrine\DBAL\Schema\Sequence
;
use
Doctrine\DBAL\Schema\Table
;
use
Doctrine\DBAL\Statement
;
use
Doctrine\DBAL\Types\Type
;
use
Doctrine\Tests\DbalFunctionalTestCase
;
use
Throwable
;
...
...
@@ -94,6 +95,7 @@ class WriteTest extends DbalFunctionalTestCase
$sql
=
'INSERT INTO write_table (test_int, test_string) VALUES (?, ?)'
;
$stmt
=
$this
->
connection
->
prepare
(
$sql
);
self
::
assertInstanceOf
(
Statement
::
class
,
$stmt
);
$stmt
->
bindValue
(
1
,
1
,
Type
::
getType
(
'integer'
));
$stmt
->
bindValue
(
2
,
'foo'
,
Type
::
getType
(
'string'
));
$stmt
->
execute
();
...
...
@@ -106,6 +108,7 @@ class WriteTest extends DbalFunctionalTestCase
$sql
=
'INSERT INTO write_table (test_int, test_string) VALUES (?, ?)'
;
$stmt
=
$this
->
connection
->
prepare
(
$sql
);
self
::
assertInstanceOf
(
Statement
::
class
,
$stmt
);
$stmt
->
bindValue
(
1
,
1
,
'integer'
);
$stmt
->
bindValue
(
2
,
'foo'
,
'string'
);
$stmt
->
execute
();
...
...
tests/Doctrine/Tests/DbalPerformanceTestListener.php
View file @
f4c43d52
...
...
@@ -16,7 +16,7 @@ class DbalPerformanceTestListener implements TestListener
{
use
TestListenerDefaultImplementation
;
/** @var
string[][]
*/
/** @var
array<string, array<string, float>>
*/
private
$timings
=
[];
public
function
endTest
(
Test
$test
,
float
$time
)
:
void
...
...
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