A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/cakephp/phinx/commit/0ef61fc10395dc25ab37c45125a5be5d6231299c below:

fix warning in info when using connection config (#2312) · cakephp/phinx@0ef61fc · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+7

-1

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+7

-1

lines changed Original file line number Diff line number Diff line change

@@ -9,6 +9,7 @@

9 9

namespace Phinx\Console\Command;

10 10 11 11

use InvalidArgumentException;

12 +

use PDO;

12 13

use Phinx\Config\Config;

13 14

use Phinx\Config\ConfigInterface;

14 15

use Phinx\Db\Adapter\AdapterInterface;

@@ -467,7 +468,12 @@ protected function writeInformationOutput(?string &$environment, OutputInterface

467 468 468 469

if (isset($envOptions['name'])) {

469 470

$name = $envOptions['name'];

470 -

if ($envOptions['adapter'] === 'sqlite') {

471 +

// We do error handling for missing adapter or connection is invalid later on running a command

472 +

$adapter = $envOptions['adapter'] ?? null;

473 +

if (isset($envOptions['connection']) && $envOptions['connection'] instanceof PDO) {

474 +

$adapter = $envOptions['connection']->getAttribute(PDO::ATTR_DRIVER_NAME);

475 +

}

476 +

if ($adapter === 'sqlite') {

471 477

$name .= SQLiteAdapter::getSuffix($envOptions);

472 478

}

473 479

$output->writeln('<info>using database</info> ' . $name, $this->verbosityLevel);

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4