getConfigDirs(); $matches = glob($appConfigDir.'/*local.php'); $this->skipIf( 0 == count($matches), 'There are no local config files to migrate. Skipping the migration.' ); } public function up(Schema $schema): void { $pathsHelper = $this->container->get('mautic.helper.paths'); $appConfigDir = $pathsHelper->getRootPath().'/app/config'; $localConfigDir = $pathsHelper->getVendorRootPath().'/config'; $matches = glob($appConfigDir.'/*local.php'); foreach ($matches as $file) { rename($file, $localConfigDir.'/'.pathinfo($file, PATHINFO_BASENAME)); } } /** * @return string[] */ public function getConfigDirs(): array { $pathsHelper = $this->container->get('mautic.helper.paths'); $appConfigDir = $pathsHelper->getRootPath().'/app/config'; $localConfigDir = $pathsHelper->getVendorRootPath().'/config'; return [$appConfigDir, $localConfigDir]; } }