$driver->setCoreFromVersion(); does not work with core Drupal7 because its __construct() requires a $random argument, in contrary to core Drupal8.
We work around this by setting the Driver core property explicitly instead of using setCoreFromVersion(): $driver->core = new \Drupal\Driver\Cores\Drupal7($path, $uri, new Random())
$driver->setCoreFromVersion();
does not work with core Drupal7 because its__construct()
requires a$random
argument, in contrary to core Drupal8.We work around this by setting the Driver core property explicitly instead of using setCoreFromVersion():
$driver->core = new \Drupal\Driver\Cores\Drupal7($path, $uri, new Random())
But ideally, both core drivers should work alike.