Hard coded path in project-kernel Factory is a problem

閲覧: 39 回
最初の未読メッセージにスキップ

Arkan M Gerges Anabi

未読、
2015/07/01 11:11:022015/07/01
To: aur...@googlegroups.com
Hi guys,

I just wanted to mention, that If I want to change the default vendor composer directory (vendor) to something like (vendor/composer) to group the files that are got by installing (composer install) from other package managers like bower, a hard coded path is found in
vendor/composer/aura/project-kernel/src/Factory.php on line 135

And the error that was thrown is
failed to open stream: No such file or directory in /shared-folder/nextdating/profile-manager/vendor/composer/aura/project-kernel/src/Factory.php on line 135.

The snippet code from project-kernel/src/Factory.php is:
public function newKernel(
$path,
$class,
$auto_resolve = ContainerBuilder::ENABLE_AUTO_RESOLVE
) {
require "{$path}/config/_env.php";
$di = $this->newContainer(
$path,
$_ENV['AURA_CONFIG_MODE'],
"{$path}/composer.json",
"{$path}/vendor/composer/installed.json", <------------- here is the hard coded path
$auto_resolve
);
return $di->newInstance($class);
}

It's better to not hard code the paths, this will leave a flexibility for example in my case
"config": {
"vendor-dir": "vendor/composer"
},
to be used in the composer.json file.


Best regards,
Arkan

Moshe Brevda

未読、
2015/07/05 2:03:562015/07/05
To: aur...@googlegroups.com
This, along with many other environmental settings, would be much better served from environmental variables. I'm not sure how much attention the "framework" parts of v2 will still receive. Paul?
全員に返信
投稿者に返信
転送
新着メール 0 件