From 78643e4e9b864c81c3f19d73734fe65b16c05825 Mon Sep 17 00:00:00 2001 From: ADmad Date: Mon, 11 May 2020 01:37:05 +0530 Subject: [PATCH] Fix erros reported by psalm and phpstan --- src/Command/BakeMigrationDiffCommand.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Command/BakeMigrationDiffCommand.php b/src/Command/BakeMigrationDiffCommand.php index 31035cc0..c6cce9d5 100644 --- a/src/Command/BakeMigrationDiffCommand.php +++ b/src/Command/BakeMigrationDiffCommand.php @@ -542,7 +542,9 @@ protected function getCurrentSchema() } $connection = ConnectionManager::get($this->connection); - $connection->cacheMetadata(false); + if (method_exists($connection, 'cacheMetadata')) { + $connection->cacheMetadata(false); + } $collection = $connection->getSchemaCollection(); foreach ($this->tables as $table) { if (preg_match("/^.*phinxlog$/", $table) === 1) {