Skip to content

Commit

Permalink
Fix symfony version checks
Browse files Browse the repository at this point in the history
  • Loading branch information
sci3ma committed Jan 22, 2020
1 parent 23bc7fc commit 840a9d4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Command/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 840a9d4

Please sign in to comment.