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
383fc749
Unverified
Commit
383fc749
authored
Jul 01, 2020
by
Sergei Morozov
Committed by
GitHub
Jul 01, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4135 from morozov/remove-pdo-references
Remove irrelevant references to PDO from the documentation
parents
5bca2b72
2c9fae14
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
11 additions
and
32 deletions
+11
-32
phpcs.xml.dist
phpcs.xml.dist
+1
-0
ColumnCase.php
src/ColumnCase.php
+0
-4
Connection.php
src/Connection.php
+3
-8
Connection.php
src/Driver/Connection.php
+0
-2
Connection.php
src/Driver/Mysqli/Connection.php
+1
-1
Statement.php
src/Driver/Statement.php
+2
-2
DriverManager.php
src/DriverManager.php
+0
-4
ParameterType.php
src/ParameterType.php
+0
-6
QueryBuilder.php
src/Query/QueryBuilder.php
+2
-3
Statement.php
src/Statement.php
+2
-2
No files found.
phpcs.xml.dist
View file @
383fc749
...
...
@@ -104,6 +104,7 @@
<!-- See https://github.com/slevomat/coding-standard/issues/770 -->
<rule
ref=
"SlevomatCodingStandard.Namespaces.UnusedUses"
>
<exclude-pattern>
src/Driver/ExceptionConverterDriver.php
</exclude-pattern>
<exclude-pattern>
src/Query/QueryBuilder.php
</exclude-pattern>
</rule>
<!-- see https://github.com/doctrine/dbal/issues/3377 -->
...
...
src/ColumnCase.php
View file @
383fc749
...
...
@@ -9,15 +9,11 @@ final class ColumnCase
{
/**
* Convert column names to upper case.
*
* @see \PDO::CASE_UPPER
*/
public
const
UPPER
=
1
;
/**
* Convert column names to lower case.
*
* @see \PDO::CASE_LOWER
*/
public
const
LOWER
=
2
;
...
...
src/Connection.php
View file @
383fc749
...
...
@@ -1034,8 +1034,6 @@ class Connection implements DriverConnection
* Executes an SQL INSERT/UPDATE/DELETE query with the given parameters
* and returns the number of affected rows.
*
* This method supports PDO binding types as well as DBAL mapping types.
*
* @param string $query The SQL query.
* @param array<mixed> $params The query parameters.
* @param array<int|string|null> $types The parameter types.
...
...
@@ -1511,16 +1509,13 @@ class Connection implements DriverConnection
* Binds a set of parameters, some or all of which are typed with a PDO binding type
* or DBAL mapping type, to a given statement.
*
* @internal Duck-typing used on the $stmt parameter to support driver statements as well as
* raw PDOStatement instances.
*
* @param DriverStatement $stmt The statement to bind the values to.
* @param mixed[] $params The map/list of named/positional parameters.
* @param int[]|string[] $types The parameter types (PDO binding types or DBAL mapping types).
*/
private
function
_bindTypedValues
(
DriverStatement
$stmt
,
array
$params
,
array
$types
)
:
void
{
// Check whether parameters are positional or named. Mixing is not allowed
, just like in PDO
.
// Check whether parameters are positional or named. Mixing is not allowed.
if
(
is_int
(
key
(
$params
)))
{
// Positional parameters
$typeOffset
=
array_key_exists
(
0
,
$types
)
?
-
1
:
0
;
...
...
@@ -1552,7 +1547,7 @@ class Connection implements DriverConnection
}
/**
* Gets the binding type of a given type.
The given type can be a PDO or DBAL mapping type.
* Gets the binding type of a given type.
*
* @param mixed $value The value to bind.
* @param int|string|null $type The type to bind (PDO or DBAL).
...
...
@@ -1590,7 +1585,7 @@ class Connection implements DriverConnection
{
$resolvedParams
=
[];
// Check whether parameters are positional or named. Mixing is not allowed
, just like in PDO
.
// Check whether parameters are positional or named. Mixing is not allowed.
if
(
is_int
(
key
(
$params
)))
{
// Positional parameters
$typeOffset
=
array_key_exists
(
0
,
$types
)
?
-
1
:
0
;
...
...
src/Driver/Connection.php
View file @
383fc749
...
...
@@ -7,8 +7,6 @@ use Doctrine\DBAL\ParameterType;
/**
* Connection interface.
* Driver connections must implement this interface.
*
* This resembles (a subset of) the PDO interface.
*/
interface
Connection
{
...
...
src/Driver/Mysqli/Connection.php
View file @
383fc749
...
...
@@ -147,7 +147,7 @@ final class Connection implements ServerInfoAwareConnection
}
/**
* {@inheritdoc}
non-PHPdoc)
* {@inheritdoc}
*/
public
function
rollBack
()
{
...
...
src/Driver/Statement.php
View file @
383fc749
...
...
@@ -31,7 +31,7 @@ interface Statement
/**
* Binds a PHP variable to a corresponding named (not supported by mysqli driver, see comment below) or question
* mark placeholder in the SQL statement that was use to prepare the statement. Unlike
PDOStatement->bindValue()
,
* mark placeholder in the SQL statement that was use to prepare the statement. Unlike
{@link bindValue()}
,
* the variable is bound as a reference and will only be evaluated at the time
* that PDOStatement->execute() is called.
*
...
...
@@ -62,7 +62,7 @@ interface Statement
* Executes a prepared statement
*
* If the prepared statement included parameter markers, you must either:
* call
PDOStatement->bindParam()
to bind PHP variables to the parameter markers:
* call
{@link bindParam()}
to bind PHP variables to the parameter markers:
* bound variables pass their value as input and receive the output value,
* if any, of their associated parameter markers or pass an array of input-only
* parameter values.
...
...
src/DriverManager.php
View file @
383fc749
...
...
@@ -100,10 +100,6 @@ final class DriverManager
* Any additional driver-specific options for the driver. These are just passed
* through to the driver.
*
* <b>pdo</b>:
* You can pass an existing PDO instance through this parameter. The PDO
* instance will be wrapped in a Doctrine\DBAL\Connection.
*
* <b>wrapperClass</b>:
* You may specify a custom wrapper class through the 'wrapperClass'
* parameter but this class MUST inherit from Doctrine\DBAL\Connection.
...
...
src/ParameterType.php
View file @
383fc749
...
...
@@ -9,15 +9,11 @@ final class ParameterType
{
/**
* Represents the SQL NULL data type.
*
* @see \PDO::PARAM_NULL
*/
public
const
NULL
=
0
;
/**
* Represents the SQL INTEGER data type.
*
* @see \PDO::PARAM_INT
*/
public
const
INTEGER
=
1
;
...
...
@@ -30,8 +26,6 @@ final class ParameterType
/**
* Represents the SQL large object data type.
*
* @see \PDO::PARAM_LOB
*/
public
const
LARGE_OBJECT
=
3
;
...
...
src/Query/QueryBuilder.php
View file @
383fc749
...
...
@@ -7,6 +7,7 @@ use Doctrine\DBAL\Driver\Result;
use
Doctrine\DBAL\ParameterType
;
use
Doctrine\DBAL\Query\Expression\CompositeExpression
;
use
Doctrine\DBAL\Query\Expression\ExpressionBuilder
;
use
Doctrine\DBAL\Statement
;
use
function
array_key_exists
;
use
function
array_keys
;
...
...
@@ -1258,7 +1259,7 @@ class QueryBuilder
/**
* Creates a new named parameter and bind the value $value to it.
*
* This method provides a shortcut for
PDOStatement::bindValue
* This method provides a shortcut for
{@link Statement::bindValue()}
* when using prepared statements.
*
* The parameter $value specifies the value that you want to bind. If
...
...
@@ -1266,8 +1267,6 @@ class QueryBuilder
* placeholder for you. An automatic placeholder will be of the name
* ':dcValue1', ':dcValue2' etc.
*
* For more information see {@link http://php.net/pdostatement-bindparam}
*
* Example:
* <code>
* $value = 2;
...
...
src/Statement.php
View file @
383fc749
...
...
@@ -77,7 +77,7 @@ class Statement implements DriverStatement
/**
* Binds a parameter value to the statement.
*
* The value can optionally be bound with a
PDO binding type or a
DBAL mapping type.
* The value can optionally be bound with a DBAL mapping type.
* If bound with a DBAL mapping type, the binding type is derived from the mapping
* type and the value undergoes the conversion routines of the mapping type before
* being bound.
...
...
@@ -117,7 +117,7 @@ class Statement implements DriverStatement
*
* @param string|int $name The name or position of the parameter.
* @param mixed $var The reference to the variable to bind.
* @param int $type The
PDO
binding type.
* @param int $type The binding type.
* @param int|null $length Must be specified when using an OUT bind
* so that PHP allocates enough memory to hold the returned value.
*
...
...
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