From 5a578e640fc727cbcb2607e755bf77185f79ed5d Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 17 Sep 2024 19:29:38 +0100 Subject: [PATCH] convertEntities - Remove old schema files --- src/CRM/CivixBundle/Command/ConvertEntityCommand.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/CRM/CivixBundle/Command/ConvertEntityCommand.php b/src/CRM/CivixBundle/Command/ConvertEntityCommand.php index cd987f32..1bda8a18 100644 --- a/src/CRM/CivixBundle/Command/ConvertEntityCommand.php +++ b/src/CRM/CivixBundle/Command/ConvertEntityCommand.php @@ -54,11 +54,9 @@ protected function execute(InputInterface $input, OutputInterface $output) { /** * @param $xmlFiles * @param $isCore - * - * @return array * @throws \Exception */ - public static function convertEntities(array $xmlFiles, bool $isCore): array { + public static function convertEntities(array $xmlFiles, bool $isCore): void { $xmlFiles = preg_grep('/files.xml$/', $xmlFiles, PREG_GREP_INVERT); $xmlFiles = preg_grep('/Schema.xml$/', $xmlFiles, PREG_GREP_INVERT); @@ -114,10 +112,7 @@ public static function convertEntities(array $xmlFiles, bool $isCore): array { // Cleanup old files array_map('unlink', glob($basedir->string('xml/schema/CRM/*/*.entityType.php'))); - return $ctx; - // array_map('unlink', $xmlFiles); - // unlink($basedir->string('sql/auto_install.sql')); - // unlink($basedir->string('sql/auto_uninstall.sql')); + array_map('unlink', $xmlFiles); } public static function getTablesForThisExtension($xmlFiles): array {