Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autoloader broken for packages using target-dir #5

Closed
derhasi opened this issue Apr 28, 2015 · 1 comment
Closed

Autoloader broken for packages using target-dir #5

derhasi opened this issue Apr 28, 2015 · 1 comment

Comments

@derhasi
Copy link
Contributor

derhasi commented Apr 28, 2015

Currently packages, that utilise target-dir are not correctly installed. The autoloader will break for those.

How to reproduce

composer.json:

{
  "name": "derhasi/composer-test",
  "minimum-stability": "dev",
  "prefer-stable": true,
  "require": {
    "davidbarratt/custom-installer": "dev-master",
    "symfony/console": "2.3.*"
  },
  "config": {
    "vendor-dir": "vendor"
  },
  "extra": {
    "custom-installer": {
      "library": "vendor/{$vendor}/{$name}"
    }
  }
}

After composer install the following autoloader is generated at vendor/composer/autoload_namespaces.php:

<?php

// autoload_namespaces.php @generated by Composer

$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);

return array(
    'Symfony\\Component\\Console\\' => array($baseDir . '/'),
);

But it should be 'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'), instead.

@davidbarratt
Copy link
Owner

Fixed per #6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants