Unverified Commit 383fc749 authored by Sergei Morozov's avatar Sergei Morozov Committed by GitHub

Merge pull request #4135 from morozov/remove-pdo-references

Remove irrelevant references to PDO from the documentation
parents 5bca2b72 2c9fae14
......@@ -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 -->
......
......@@ -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;
......
......@@ -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;
......
......@@ -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
{
......
......@@ -147,7 +147,7 @@ final class Connection implements ServerInfoAwareConnection
}
/**
* {@inheritdoc}non-PHPdoc)
* {@inheritdoc}
*/
public function rollBack()
{
......
......@@ -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.
......
......@@ -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.
......
......@@ -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;
......
......@@ -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;
......
......@@ -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.
*
......
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