1๐
โ
I recommend to take a short look into their code. As it is open and you even liked to it. So it should not be that difficult.
According to their unit tests a V8 instance is constructed this way:
$engine = new V8(new V8Js());
look at https://github.com/spatie/server-side-rendering/blob/master/tests/Engines/V8Test.php
So the constructor in V8 class needs a V8Js object. The parameter is not optional as the code says:
public function __construct(V8Js $v8)
{
$this->v8 = $v8;
}
Found here: https://github.com/spatie/server-side-rendering/blob/master/src/Engines/V8.php
Interestingly, an issue on this topic has been closed. Perhaps it should be reopened with further details?
https://github.com/spatie/server-side-rendering/issues/32
Source:stackexchange.com