Skip to content

Commit

Permalink
Use correct namespace name in app composer.json.
Browse files Browse the repository at this point in the history
Use the correctly slashed namespace in the app's composer.json.

Refs #7062
  • Loading branch information
markstory committed Jul 26, 2015
1 parent 810d0e6 commit d42da3a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Shell/Task/PluginTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,11 @@ protected function _modifyAutoloader($plugin, $path)

$autoloadPath = str_replace(ROOT, '.', $this->path);
$autoloadPath = str_replace('\\', '/', $autoloadPath);
$namespace = str_replace('/', '\\', $plugin);

$config = json_decode(file_get_contents($file), true);
$config['autoload']['psr-4'][$plugin . '\\'] = $autoloadPath . $plugin . "/src";
$config['autoload-dev']['psr-4'][$plugin . '\\Test\\'] = $autoloadPath . $plugin . "/tests";
$config['autoload']['psr-4'][$namespace . '\\'] = $autoloadPath . $plugin . "/src";
$config['autoload-dev']['psr-4'][$namespace . '\\Test\\'] = $autoloadPath . $plugin . "/tests";

$this->out('<info>Modifying composer autoloader</info>');

Expand Down

0 comments on commit d42da3a

Please sign in to comment.