silverstripe-framework: custom COMPOSER_VENDOR_DIR breaks SilverStripe
Affected Version
silverstripe-themes/simple dev-master 4d546a4 The SilverStripe simple theme (default SilverStripe 3 theme)
silverstripe/recipe-cms 1.1.0 SilverStripe recipe for fully featured page and asset content editing
silverstripe/recipe-plugin 1.2.0 Helper plugin to install SilverStripe recipes
Description
I am installing silverstripe using a custom COMPOSER_VENDOR_DIR
and it breaks.
It seems like silverstripe expect vendor
to be the COMPOSER_VENDOR_DIR
and won’t work otherwise.
Installation fails because it is not able to correctly detect the BASE_PATH, and from then on, everything is broken.
A workaround is to define “BASE_PATH” before initializing silverstripe (in install.php or index.php) and also create a symlink from vendor
to the actual path of COMPOSER_VENDOR_DIR
.
The symlink has to be created both for the root
project and for public/resources
.
Steps to Reproduce
export COMPOSER_VENDOR_DIR=.dev_vendor
composer create-project silverstripe/installer test
cd test
php -S 0.0.0.0:8888
Now navigate to http://localhost:8888/public/install.php
About this issue
- Original URL
- State: open
- Created 6 years ago
- Comments: 17 (17 by maintainers)
Personally, I think we should be using the env var
COMPOSER_VENDOR_DIR
; it’s not important to me that other packages make this assumption, we shouldn’t really.