1
0
Fork 0

Make artifact paths in lock file cross-platform, fixes #3832

pull/4937/head
Jordi Boggiano 2016-02-19 16:25:25 +00:00
parent 9e623f50e7
commit 8a2d1a2ee2
2 changed files with 2 additions and 2 deletions

View File

@ -143,7 +143,7 @@ class ArtifactRepository extends ArrayRepository implements ConfigurableReposito
$package = JsonFile::parseJson($json, $composerFile); $package = JsonFile::parseJson($json, $composerFile);
$package['dist'] = array( $package['dist'] = array(
'type' => 'zip', 'type' => 'zip',
'url' => $file->getPathname(), 'url' => strtr($file->getPathname(), '\\', '/'),
'shasum' => sha1_file($file->getRealPath()), 'shasum' => sha1_file($file->getRealPath()),
); );

View File

@ -60,7 +60,7 @@ class ArtifactRepositoryTest extends TestCase
$repo = new ArtifactRepository($coordinates, new NullIO(), new Config()); $repo = new ArtifactRepository($coordinates, new NullIO(), new Config());
foreach ($repo->getPackages() as $package) { foreach ($repo->getPackages() as $package) {
$this->assertTrue(strpos($package->getDistUrl(), $absolutePath) === 0); $this->assertTrue(strpos($package->getDistUrl(), strtr($absolutePath, '\\', '/')) === 0);
} }
} }