phpv8 / v8js

V8 Javascript Engine for PHP — This PHP extension embeds the Google V8 Javascript Engine
http://pecl.php.net/package/v8js
MIT License
1.84k stars 200 forks source link

Remove deprecated Context versions of ToBoolean and BooleanValue #435

Closed timothympace closed 4 years ago

timothympace commented 4 years ago

Description

This PR removes the usage of deprecated v8 methods. The context versions of ToBoolean and Boolean value were removed in this commit, which marks V8 7.6.58. The original commit referenced has deprecation comments that helped transition to the correct APIs.

Fixes

https://github.com/phpv8/v8js/issues/425

Testing

Was tested with the following build of V8: Version: 7.7.299.15 Build Args: is_official_build=true, is_component_build=true, v8_use_external_startup_data=false, use_custom_libcxx=false, is_clang=false, is_cfi=false, treat_warnings_as_errors=false

I've also tested this with other builds, and it gives compatibility all the way up to v8 7.9. Tried with 7.9.317.33 and all tests were still passing. Tried with 8.0.426.19 and almost all tests were failing.

timothympace commented 4 years ago

@stesie Would really appreciate a review on this when you get a chance. Just wanted to make sure this didn't get forgotten 😄