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
2efcbe2f
Unverified
Commit
2efcbe2f
authored
Jul 09, 2020
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing @throws DBALException
parent
2494d9bc
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
38 additions
and
0 deletions
+38
-0
Connection.php
src/Connection.php
+20
-0
PrimaryReadReplicaConnection.php
src/Connections/PrimaryReadReplicaConnection.php
+1
-0
Connection.php
src/Driver/PDO/Connection.php
+2
-0
OracleSessionInit.php
src/Event/Listeners/OracleSessionInit.php
+3
-0
AbstractPlatform.php
src/Platforms/AbstractPlatform.php
+2
-0
MySqlPlatform.php
src/Platforms/MySqlPlatform.php
+5
-0
SqlitePlatform.php
src/Platforms/SqlitePlatform.php
+2
-0
QueryBuilder.php
src/Query/QueryBuilder.php
+3
-0
No files found.
src/Connection.php
View file @
2efcbe2f
...
@@ -401,6 +401,8 @@ class Connection
...
@@ -401,6 +401,8 @@ class Connection
* Returns the database server version if the underlying driver supports it.
* Returns the database server version if the underlying driver supports it.
*
*
* @return string|null
* @return string|null
*
* @throws DBALException
*/
*/
private
function
getServerVersion
()
private
function
getServerVersion
()
{
{
...
@@ -626,6 +628,8 @@ class Connection
...
@@ -626,6 +628,8 @@ class Connection
* @param int $level The level to set.
* @param int $level The level to set.
*
*
* @return int
* @return int
*
* @throws DBALException
*/
*/
public
function
setTransactionIsolation
(
$level
)
public
function
setTransactionIsolation
(
$level
)
{
{
...
@@ -638,6 +642,8 @@ class Connection
...
@@ -638,6 +642,8 @@ class Connection
* Gets the currently active transaction isolation level.
* Gets the currently active transaction isolation level.
*
*
* @return int The current transaction isolation level.
* @return int The current transaction isolation level.
*
* @throws DBALException
*/
*/
public
function
getTransactionIsolation
()
public
function
getTransactionIsolation
()
{
{
...
@@ -1226,6 +1232,8 @@ class Connection
...
@@ -1226,6 +1232,8 @@ class Connection
/**
/**
* @return bool
* @return bool
*
* @throws DBALException
*/
*/
public
function
beginTransaction
()
public
function
beginTransaction
()
{
{
...
@@ -1314,6 +1322,8 @@ class Connection
...
@@ -1314,6 +1322,8 @@ class Connection
/**
/**
* Commits all current nesting transactions.
* Commits all current nesting transactions.
*
* @throws DBALException
*/
*/
private
function
commitAll
()
:
void
private
function
commitAll
()
:
void
{
{
...
@@ -1442,6 +1452,8 @@ class Connection
...
@@ -1442,6 +1452,8 @@ class Connection
* Gets the wrapped driver connection.
* Gets the wrapped driver connection.
*
*
* @return DriverConnection
* @return DriverConnection
*
* @throws DBALException
*/
*/
public
function
getWrappedConnection
()
public
function
getWrappedConnection
()
{
{
...
@@ -1513,6 +1525,8 @@ class Connection
...
@@ -1513,6 +1525,8 @@ class Connection
* @param string $type The name of the DBAL mapping type.
* @param string $type The name of the DBAL mapping type.
*
*
* @return mixed The converted value.
* @return mixed The converted value.
*
* @throws DBALException
*/
*/
public
function
convertToDatabaseValue
(
$value
,
$type
)
public
function
convertToDatabaseValue
(
$value
,
$type
)
{
{
...
@@ -1527,6 +1541,8 @@ class Connection
...
@@ -1527,6 +1541,8 @@ class Connection
* @param string $type The name of the DBAL mapping type.
* @param string $type The name of the DBAL mapping type.
*
*
* @return mixed The converted type.
* @return mixed The converted type.
*
* @throws DBALException
*/
*/
public
function
convertToPHPValue
(
$value
,
$type
)
public
function
convertToPHPValue
(
$value
,
$type
)
{
{
...
@@ -1540,6 +1556,8 @@ class Connection
...
@@ -1540,6 +1556,8 @@ class Connection
* @param DriverStatement $stmt The statement to bind the values to.
* @param DriverStatement $stmt The statement to bind the values to.
* @param mixed[] $params The map/list of named/positional parameters.
* @param mixed[] $params The map/list of named/positional parameters.
* @param int[]|string[] $types The parameter types (PDO binding types or DBAL mapping types).
* @param int[]|string[] $types The parameter types (PDO binding types or DBAL mapping types).
*
* @throws DBALException
*/
*/
private
function
_bindTypedValues
(
DriverStatement
$stmt
,
array
$params
,
array
$types
)
:
void
private
function
_bindTypedValues
(
DriverStatement
$stmt
,
array
$params
,
array
$types
)
:
void
{
{
...
@@ -1581,6 +1599,8 @@ class Connection
...
@@ -1581,6 +1599,8 @@ class Connection
* @param int|string|null $type The type to bind (PDO or DBAL).
* @param int|string|null $type The type to bind (PDO or DBAL).
*
*
* @return mixed[] [0] => the (escaped) value, [1] => the binding type.
* @return mixed[] [0] => the (escaped) value, [1] => the binding type.
*
* @throws DBALException
*/
*/
private
function
getBindingInfo
(
$value
,
$type
)
private
function
getBindingInfo
(
$value
,
$type
)
{
{
...
...
src/Connections/PrimaryReadReplicaConnection.php
View file @
2efcbe2f
...
@@ -98,6 +98,7 @@ class PrimaryReadReplicaConnection extends Connection
...
@@ -98,6 +98,7 @@ class PrimaryReadReplicaConnection extends Connection
*
*
* @param mixed[] $params
* @param mixed[] $params
*
*
* @throws DBALException
* @throws InvalidArgumentException
* @throws InvalidArgumentException
*/
*/
public
function
__construct
(
array
$params
,
Driver
$driver
,
?
Configuration
$config
=
null
,
?
EventManager
$eventManager
=
null
)
public
function
__construct
(
array
$params
,
Driver
$driver
,
?
Configuration
$config
=
null
,
?
EventManager
$eventManager
=
null
)
...
...
src/Driver/PDO/Connection.php
View file @
2efcbe2f
...
@@ -60,6 +60,8 @@ final class Connection implements ServerInfoAwareConnection
...
@@ -60,6 +60,8 @@ final class Connection implements ServerInfoAwareConnection
}
}
/**
/**
* {@inheritDoc}
*
* @return Statement
* @return Statement
*/
*/
public
function
prepare
(
string
$sql
)
:
StatementInterface
public
function
prepare
(
string
$sql
)
:
StatementInterface
...
...
src/Event/Listeners/OracleSessionInit.php
View file @
2efcbe2f
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
namespace
Doctrine\DBAL\Event\Listeners
;
namespace
Doctrine\DBAL\Event\Listeners
;
use
Doctrine\Common\EventSubscriber
;
use
Doctrine\Common\EventSubscriber
;
use
Doctrine\DBAL\DBALException
;
use
Doctrine\DBAL\Event\ConnectionEventArgs
;
use
Doctrine\DBAL\Event\ConnectionEventArgs
;
use
Doctrine\DBAL\Events
;
use
Doctrine\DBAL\Events
;
...
@@ -44,6 +45,8 @@ class OracleSessionInit implements EventSubscriber
...
@@ -44,6 +45,8 @@ class OracleSessionInit implements EventSubscriber
/**
/**
* @return void
* @return void
*
* @throws DBALException
*/
*/
public
function
postConnect
(
ConnectionEventArgs
$args
)
public
function
postConnect
(
ConnectionEventArgs
$args
)
{
{
...
...
src/Platforms/AbstractPlatform.php
View file @
2efcbe2f
...
@@ -2165,6 +2165,8 @@ abstract class AbstractPlatform
...
@@ -2165,6 +2165,8 @@ abstract class AbstractPlatform
* a string that defines the complete column
* a string that defines the complete column
*
*
* @return string DBMS specific SQL code portion that should be used to declare the column.
* @return string DBMS specific SQL code portion that should be used to declare the column.
*
* @throws DBALException
*/
*/
public
function
getColumnDeclarationSQL
(
$name
,
array
$field
)
public
function
getColumnDeclarationSQL
(
$name
,
array
$field
)
{
{
...
...
src/Platforms/MySqlPlatform.php
View file @
2efcbe2f
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
namespace
Doctrine\DBAL\Platforms
;
namespace
Doctrine\DBAL\Platforms
;
use
Doctrine\DBAL\DBALException
;
use
Doctrine\DBAL\Schema\ForeignKeyConstraint
;
use
Doctrine\DBAL\Schema\ForeignKeyConstraint
;
use
Doctrine\DBAL\Schema\Identifier
;
use
Doctrine\DBAL\Schema\Identifier
;
use
Doctrine\DBAL\Schema\Index
;
use
Doctrine\DBAL\Schema\Index
;
...
@@ -694,6 +695,8 @@ SQL
...
@@ -694,6 +695,8 @@ SQL
/**
/**
* @return string[]
* @return string[]
*
* @throws DBALException
*/
*/
private
function
getPreAlterTableAlterPrimaryKeySQL
(
TableDiff
$diff
,
Index
$index
)
private
function
getPreAlterTableAlterPrimaryKeySQL
(
TableDiff
$diff
,
Index
$index
)
{
{
...
@@ -733,6 +736,8 @@ SQL
...
@@ -733,6 +736,8 @@ SQL
* @param TableDiff $diff The table diff to gather the SQL for.
* @param TableDiff $diff The table diff to gather the SQL for.
*
*
* @return string[]
* @return string[]
*
* @throws DBALException
*/
*/
private
function
getPreAlterTableAlterIndexForeignKeySQL
(
TableDiff
$diff
)
private
function
getPreAlterTableAlterIndexForeignKeySQL
(
TableDiff
$diff
)
{
{
...
...
src/Platforms/SqlitePlatform.php
View file @
2efcbe2f
...
@@ -963,6 +963,8 @@ class SqlitePlatform extends AbstractPlatform
...
@@ -963,6 +963,8 @@ class SqlitePlatform extends AbstractPlatform
/**
/**
* @return string[]|false
* @return string[]|false
*
* @throws DBALException
*/
*/
private
function
getSimpleAlterTableSQL
(
TableDiff
$diff
)
private
function
getSimpleAlterTableSQL
(
TableDiff
$diff
)
{
{
...
...
src/Query/QueryBuilder.php
View file @
2efcbe2f
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
namespace
Doctrine\DBAL\Query
;
namespace
Doctrine\DBAL\Query
;
use
Doctrine\DBAL\Connection
;
use
Doctrine\DBAL\Connection
;
use
Doctrine\DBAL\DBALException
;
use
Doctrine\DBAL\Driver\Result
;
use
Doctrine\DBAL\Driver\Result
;
use
Doctrine\DBAL\ParameterType
;
use
Doctrine\DBAL\ParameterType
;
use
Doctrine\DBAL\Query\Expression\CompositeExpression
;
use
Doctrine\DBAL\Query\Expression\CompositeExpression
;
...
@@ -202,6 +203,8 @@ class QueryBuilder
...
@@ -202,6 +203,8 @@ class QueryBuilder
* for insert, update and delete statements.
* for insert, update and delete statements.
*
*
* @return Result|int
* @return Result|int
*
* @throws DBALException
*/
*/
public
function
execute
()
public
function
execute
()
{
{
...
...
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