phpv8 / php-v8

PHP extension for V8 JavaScript engine
https://php-v8.readthedocs.io
MIT License
217 stars 14 forks source link

Remove excessive Isolate and Context parameters #68

Closed pinepain closed 7 years ago

pinepain commented 7 years ago

They are often not needed (especially Isolate) and object's Context could be used instead. The Isolate and Context parameter appeared during mimicking V8 API where this parameter was largely used to deal with lack of function overriding by return type in C++, which is definitely not the case in PHP.

pinepain commented 7 years ago

After taking this issue more seriously and looking into v8 internals, i don't think this change is ever necessary. It's is not trivial or feasible at all for some extension parts to implement this change. Partial extension API changes will create certain ambiguity and I don't think that it worth doing that.