Commit 69828422 by Carsten Brandt

allow non-lowercase package names

fixes #3438
parent 9e0a157f
...@@ -4,8 +4,7 @@ Yii Framework 2 composer extension Change Log ...@@ -4,8 +4,7 @@ Yii Framework 2 composer extension Change Log
2.0.0-rc under development 2.0.0-rc under development
-------------------------- --------------------------
- no changes in this release. - Bug #3438: Fixed support for non-lowercase package names (cebe)
2.0.0-beta April 13, 2014 2.0.0-beta April 13, 2014
------------------------- -------------------------
......
...@@ -110,7 +110,7 @@ class Installer extends LibraryInstaller ...@@ -110,7 +110,7 @@ class Installer extends LibraryInstaller
foreach ($autoload['psr-0'] as $name => $path) { foreach ($autoload['psr-0'] as $name => $path) {
$name = str_replace('\\', '/', trim($name, '\\')); $name = str_replace('\\', '/', trim($name, '\\'));
if (!$fs->isAbsolutePath($path)) { if (!$fs->isAbsolutePath($path)) {
$path = $this->vendorDir . '/' . $package->getName() . '/' . $path; $path = $this->vendorDir . '/' . $package->getPrettyName() . '/' . $path;
} }
$path = $fs->normalizePath($path); $path = $fs->normalizePath($path);
if (strpos($path . '/', $vendorDir . '/') === 0) { if (strpos($path . '/', $vendorDir . '/') === 0) {
...@@ -125,7 +125,7 @@ class Installer extends LibraryInstaller ...@@ -125,7 +125,7 @@ class Installer extends LibraryInstaller
foreach ($autoload['psr-4'] as $name => $path) { foreach ($autoload['psr-4'] as $name => $path) {
$name = str_replace('\\', '/', trim($name, '\\')); $name = str_replace('\\', '/', trim($name, '\\'));
if (!$fs->isAbsolutePath($path)) { if (!$fs->isAbsolutePath($path)) {
$path = $this->vendorDir . '/' . $package->getName() . '/' . $path; $path = $this->vendorDir . '/' . $package->getPrettyName() . '/' . $path;
} }
$path = $fs->normalizePath($path); $path = $fs->normalizePath($path);
if (strpos($path . '/', $vendorDir . '/') === 0) { if (strpos($path . '/', $vendorDir . '/') === 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment