jhedstrom / DrupalDriver

A collection of drivers for controlling Drupal.
GNU General Public License v2.0
64 stars 95 forks source link

Make setCoreFromVersion() work with Drupal7, not only Drupal8. #15

Closed PieterDC closed 9 years ago

PieterDC commented 9 years ago

$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.

jhedstrom commented 9 years ago

Attempting a fix in #17.

Thanks for reporting this!