From 840a9d4364011b2e9c391b5d987d7de052da411b Mon Sep 17 00:00:00 2001 From: Marcin Harasim Date: Wed, 22 Jan 2020 17:22:34 +0100 Subject: [PATCH] Fix symfony version checks --- src/Command/InstallCommand.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Command/InstallCommand.php b/src/Command/InstallCommand.php index b77b559..db298e3 100644 --- a/src/Command/InstallCommand.php +++ b/src/Command/InstallCommand.php @@ -72,14 +72,14 @@ private function modifyNeonFile(string $destinationFile): void if (class_exists($symfonyKernel)) { $containerXmlPath = '%rootDir%/../../../var/cache/dev/srcDevDebugProjectContainer.xml'; - if (version_compare($symfonyKernel::VERSION, '5.0.0', '>=')) { - $containerXmlPath = '%rootDir%/../../../var/cache/dev/App_KernelDevDebugContainer.xml'; - } - if (version_compare($symfonyKernel::VERSION, '4.2.0', '>=')) { $containerXmlPath = '%rootDir%/../../../var/cache/dev/srcApp_KernelDevDebugContainer.xml'; } + if (version_compare($symfonyKernel::VERSION, '5.0.0', '>=')) { + $containerXmlPath = '%rootDir%/../../../var/cache/dev/App_KernelDevDebugContainer.xml'; + } + file_put_contents($destinationFile, sprintf(' symfony:%s', PHP_EOL), FILE_APPEND); file_put_contents($destinationFile, sprintf(' container_xml_path: %s', $containerXmlPath), FILE_APPEND); }