Skip to content

Commit

Permalink
Fix autoloader prefix for applications.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Apr 20, 2017
1 parent 21e5082 commit 1fe7821
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions components/lib/Conductor/Package2XmlToComposer.php
Expand Up @@ -527,11 +527,16 @@ public function convert($output_file = null)
$this->name = strtolower($suggested_alias . '/' . $pkgname);
}

$this->autoload = array(
'psr-0' => array(
$this->data['name'] == 'Horde_Core' ? 'Horde' : $this->data['name'] => "lib/"
)
);
if ($this->data['name'] == 'Horde_Core') {
$prefix = 'Horde';
} elseif ($this->data['name'] == 'imp') {
$prefix = 'IMP';
} elseif (strpos($this->data['name'], 'Horde') !== 0) {
$prefix = Horde_String::ucfirst($this->data['name']);
} else {
$prefix = $this->data['name'];
}
$this->autoload = array('psr-0' => array($prefix => "lib/"));

// assemble human-readable composer.json
$j = new stdClass();
Expand Down

0 comments on commit 1fe7821

Please sign in to comment.