Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated methods to Connection::class. #19964

Merged
merged 1 commit into from
Sep 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading