Skip to content
This repository has been archived by the owner on Jan 6, 2020. It is now read-only.

Commit

Permalink
Merge branch '4.0'
Browse files Browse the repository at this point in the history
* 4.0:
  fixed makePathRelative usage
  • Loading branch information
fabpot committed Aug 25, 2017
2 parents 0dd0cb4 + bf582cc commit eb6266b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Composer/ScriptHandler.php
Expand Up @@ -212,7 +212,7 @@ public static function installRequirementsFile(Event $event)
$fs->copy(__DIR__.'/../Resources/skeleton/app/check.php', $binDir.'/symfony_requirements', true);
$fs->remove(array($appDir.'/check.php', $appDir.'/SymfonyRequirements.php', true));

$fs->dumpFile($binDir.'/symfony_requirements', '#!/usr/bin/env php'."\n".str_replace(".'/SymfonyRequirements.php'", ".'/".$fs->makePathRelative($varDir, $binDir)."SymfonyRequirements.php'", file_get_contents($binDir.'/symfony_requirements')));
$fs->dumpFile($binDir.'/symfony_requirements', '#!/usr/bin/env php'."\n".str_replace(".'/SymfonyRequirements.php'", ".'/".$fs->makePathRelative(realpath($varDir), realpath($binDir))."SymfonyRequirements.php'", file_get_contents($binDir.'/symfony_requirements')));
$fs->chmod($binDir.'/symfony_requirements', 0755);
}

Expand All @@ -223,7 +223,7 @@ public static function installRequirementsFile(Event $event)
if ($fs->exists($webDir.'/config.php')) {
$requiredDir = $newDirectoryStructure ? $varDir : $appDir;

$fs->dumpFile($webDir.'/config.php', str_replace('/../app/SymfonyRequirements.php', '/'.$fs->makePathRelative($requiredDir, $webDir).'SymfonyRequirements.php', file_get_contents(__DIR__.'/../Resources/skeleton/web/config.php')));
$fs->dumpFile($webDir.'/config.php', str_replace('/../app/SymfonyRequirements.php', '/'.$fs->makePathRelative(realpath($requiredDir), realpath($webDir)).'SymfonyRequirements.php', file_get_contents(__DIR__.'/../Resources/skeleton/web/config.php')));
}
}

Expand Down Expand Up @@ -365,7 +365,7 @@ protected static function updateDirectoryStructure(Event $event, $rootDir, $appD

$fs->dumpFile($webDir.'/app.php', str_replace($appDir.'/bootstrap.php.cache', $varDir.'/bootstrap.php.cache', file_get_contents($webDir.'/app.php')));
$fs->dumpFile($webDir.'/app_dev.php', str_replace($appDir.'/bootstrap.php.cache', $varDir.'/bootstrap.php.cache', file_get_contents($webDir.'/app_dev.php')));
$fs->dumpFile($binDir.'/console', str_replace(array(".'/bootstrap.php.cache'", ".'/AppKernel.php'"), array(".'/".$fs->makePathRelative($varDir, $binDir)."bootstrap.php.cache'", ".'/".$fs->makePathRelative($appDir, $binDir)."AppKernel.php'"), file_get_contents($binDir.'/console')));
$fs->dumpFile($binDir.'/console', str_replace(array(".'/bootstrap.php.cache'", ".'/AppKernel.php'"), array(".'/".$fs->makePathRelative(realpath($varDir), realpath($binDir))."bootstrap.php.cache'", ".'/".$fs->makePathRelative(realpath($appDir), realpath($binDir))."AppKernel.php'"), file_get_contents($binDir.'/console')));
$fs->dumpFile($rootDir.'/phpunit.xml.dist', $phpunit);
$fs->dumpFile($rootDir.'/composer.json', $composer);

Expand Down

0 comments on commit eb6266b

Please sign in to comment.