View more context

 

ethanj

if you have the option though you should totally use 7.1 or greater since php 5.6 and 7.0 are hitting end of life at the end of the month

👍 (1)
Jason Hale

ya, client had a last minute server change, totally agree though

nightjarnz

Yes it can run on 5.6. A better option is to update that new server.

nightjarnz

Your dependency errros @Jason Hale are probably coming from the composer.lock, - not composer.json. If you have built the site on PHP 7, it will be locked to PHP 7 compatible dependencies.

The fix is simple, clone the project, rebuild on PHP 5.6 (or use the platform option of composer to enforce the constraint) https://getcomposer.org/doc/06-config.md#platform

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

Dependency Management for PHP

Hide attachment content
👍 (1)
Jason Hale

k, thanks @nightjarnz will take a look. it is coming from the .lock

Mo

platform is the way to go if the live environment differs from you dev environment

StefGuev

I've checked for saving session data with Session::set('something','special);É

StefGuev

I notice something strange on documentation. I used on SS3.X Session::set('Something','Something'); to set sesson vars. In Silverstripe 4 API https://api.silverstripe.org/4/SilverStripe/Control/Session.html the function seems there but if I use this, I always have a error to not used method static. I've checked the documentation https://docs.silverstripe.org/en/4/developer_guides/cookies_and_sessions/sessions/ and it's seem completly different. Considering this, it's a error in the API?

stephenmcm

the function is no longer static you need to invoke it as a method

StefGuev

you mean do something like this? :

  1. $session = new Session();
  2. $session->set('test','allo');

nightjarnz

More likely to be an error in the documentation @StefGuev