Skip to content

Commit

Permalink
Merge pull request #19964 from terabytesoftw/remove-deprecated-connec…
Browse files Browse the repository at this point in the history
…tion

Remove deprecated methods to `Connection::class`.
  • Loading branch information
bizley authored Sep 22, 2023
2 parents e7be9e9 + 28f160b commit ce8c654
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions framework/db/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,15 +289,6 @@ class Connection extends Component
* @see pdo
*/
public $pdoClass;
/**
* @var string the class used to create new database [[Command]] objects. If you want to extend the [[Command]] class,
* you may configure this property to use your extended version of the class.
* Since version 2.0.14 [[$commandMap]] is used if this property is set to its default value.
* @see createCommand
* @since 2.0.7
* @deprecated since 2.0.14. Use [[$commandMap]] for precise configuration.
*/
public $commandClass = 'yii\db\Command';
/**
* @var array mapping between PDO driver names and [[Command]] classes.
* The keys of the array are PDO driver names while the values are either the corresponding
Expand Down Expand Up @@ -760,9 +751,7 @@ public function createCommand($sql = null, $params = [])
{
$driver = $this->getDriverName();
$config = ['class' => 'yii\db\Command'];
if ($this->commandClass !== $config['class']) {
$config['class'] = $this->commandClass;
} elseif (isset($this->commandMap[$driver])) {
if (isset($this->commandMap[$driver])) {
$config = !is_array($this->commandMap[$driver]) ? ['class' => $this->commandMap[$driver]] : $this->commandMap[$driver];
}
$config['db'] = $this;
Expand Down

0 comments on commit ce8c654

Please sign in to comment.