From fa9ab88003bb8b104639f3b569c1546c999588b3 Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Tue, 23 Aug 2022 19:35:29 +0300 Subject: [PATCH] Fix checking includedTables later --- src/DumpSettings.php | 5 +++++ src/Mysqldump.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/DumpSettings.php b/src/DumpSettings.php index 37ab2a08..c1e5f0c8 100644 --- a/src/DumpSettings.php +++ b/src/DumpSettings.php @@ -103,6 +103,11 @@ public function getIncludedTables(): array return $this->settings['include-tables'] ?? []; } + public function setIncludedTables(array $tables): void + { + $this->settings['include-tables'] = $tables; + } + public function getIncludedViews(): array { return $this->settings['include-views'] ?? []; diff --git a/src/Mysqldump.php b/src/Mysqldump.php index 0bc0e363..896fb24c 100644 --- a/src/Mysqldump.php +++ b/src/Mysqldump.php @@ -301,8 +301,8 @@ private function getDatabaseStructureTables() if (in_array(current($row), $includedTables, true)) { $this->tables[] = current($row); $elem = array_search(current($row), $includedTables); - // TODO should this be done in DumpSettings? unset($includedTables[$elem]); + $this->settings->setIncludedTables($includedTables); } } }