Move .composer into vendor (hardcoded for now)
parent
305856f2f5
commit
1e0710b32f
|
@ -11,9 +11,11 @@ use Composer\Package;
|
||||||
use Composer\Json\JsonFile;
|
use Composer\Json\JsonFile;
|
||||||
use Composer\Console\Application as ComposerApplication;
|
use Composer\Console\Application as ComposerApplication;
|
||||||
|
|
||||||
|
$vendorPath = 'vendor';
|
||||||
|
|
||||||
// initialize repository manager
|
// initialize repository manager
|
||||||
$rm = new Repository\RepositoryManager();
|
$rm = new Repository\RepositoryManager();
|
||||||
$rm->setLocalRepository(new Repository\FilesystemRepository(new JsonFile('.composer/installed.json')));
|
$rm->setLocalRepository(new Repository\FilesystemRepository(new JsonFile($vendorPath.'/.composer/installed.json')));
|
||||||
$rm->setRepositoryClass('composer', 'Composer\Repository\ComposerRepository');
|
$rm->setRepositoryClass('composer', 'Composer\Repository\ComposerRepository');
|
||||||
$rm->setRepositoryClass('pear', 'Composer\Repository\PearRepository');
|
$rm->setRepositoryClass('pear', 'Composer\Repository\PearRepository');
|
||||||
$rm->setRepositoryClass('package', 'Composer\Repository\PackageRepository');
|
$rm->setRepositoryClass('package', 'Composer\Repository\PackageRepository');
|
||||||
|
@ -26,8 +28,8 @@ $dm->setDownloader('zip', new Downloader\ZipDownloader());
|
||||||
|
|
||||||
// initialize installation manager
|
// initialize installation manager
|
||||||
$im = new Installer\InstallationManager();
|
$im = new Installer\InstallationManager();
|
||||||
$im->addInstaller(new Installer\LibraryInstaller('vendor', $dm, $rm->getLocalRepository()));
|
$im->addInstaller(new Installer\LibraryInstaller($vendorPath, $dm, $rm->getLocalRepository()));
|
||||||
$im->addInstaller(new Installer\LibraryInstaller('vendor/bundles', $dm, $rm->getLocalRepository(), 'symfony-bundle'));
|
$im->addInstaller(new Installer\LibraryInstaller($vendorPath.'/bundles', $dm, $rm->getLocalRepository(), 'symfony-bundle'));
|
||||||
|
|
||||||
// load package
|
// load package
|
||||||
$loader = new Package\Loader\ArrayLoader($rm);
|
$loader = new Package\Loader\ArrayLoader($rm);
|
||||||
|
|
|
@ -117,7 +117,7 @@ EOT
|
||||||
|
|
||||||
$output->writeln('> Generating autoload.php');
|
$output->writeln('> Generating autoload.php');
|
||||||
$generator = new AutoloadGenerator($localRepo, $composer->getPackage(), $installationManager);
|
$generator = new AutoloadGenerator($localRepo, $composer->getPackage(), $installationManager);
|
||||||
$generator->dump('.composer/autoload.php');
|
$generator->dump('vendor/.composer/autoload.php');
|
||||||
|
|
||||||
$output->writeln('> Done');
|
$output->writeln('> Done');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue