8000 Configuring Connection with Driver instance legacy but not deprecated · Issue #17641 · cakephp/cakephp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Configuring Connection with Driver instance legacy but not deprecated #17641
Open
@othercorey

Description

@othercorey

Description

https://github.com/cakephp/cakephp/blob/5.x/src/Database/Connection.php#L139-L147

In Connection::createDrivers(), passing in a Driver instance is marked legacy, but this config path was not marked deprecated in 5.0.

Is this still considered legacy and should it be deprecated?

if (!is_string($driver)) {
    assert($driver instanceof Driver);
    if (!$driver->enabled()) {
        throw new MissingExtensionException(['driver' => get_class($driver), 'name' => $this->configName()]);
    }

    // Legacy support for setting instance instead of driver class
    return [self::ROLE_READ => $driver, self::ROLE_WRITE => $driver];
}

CakePHP Version

5.0

PHP Version

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0