View more context

 

Barry

hi all. Is it possible to configure public/assets to be a different folder name, e.g. public/mycustomfolder ?

null

No, ASSETS_DIR is a hard-coded constant in silverstripe/framework

null
  1. if (!defined('ASSETS_DIR')) {
  2. define('ASSETS_DIR', 'assets');
  3. }

Actually you might be able to set it as an environment variable in your .env. No idea if anything will break though 😅

Firesphere

You could define it before it's initialised, e.g. in your _config.php?

Ken Sander

Working in my Mac dev enviroment with MAMP and PHP 7. OSX ships with php 5.4 so I was faking the php version in Silverstripe’s composer file with platform config — <https://getcomposer.org/doc/06-config.md#platform&gt;

That all worked fine but tonight upgrading some sites to 4.4.4 and getting the error:

PHP Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' i in VendorPlugin.php when I run composer update

I updated composer as well, so not sure if it’s something with that.

Don’t really want to install PHP 7 and update path for mac CLI version as it’s not needed as MAMP handles all that.

Show 2 attachment(s)
getcomposer.org  
Config - Composer

A Dependency Manager for PHP

getcomposer.org  
Config - Composer

A Dependency Manager for PHP

Hide attachment content
nightjarnz

@Ken Sander then you're choosing to use an end of life PHP version, where support over 3 years ago.

null

> OSX ships with php 5.4 How old is your version of OSX? o.o