Skip to content
This repository was archived by the owner on Mar 29, 2024. It is now read-only.

Commit a2781b1

Browse files
authored
Merge pull request #28 from pinepain/require-v8-6.1.170
Require v8 >= 6.1.170
2 parents 664640e + 917a520 commit a2781b1

File tree

8 files changed

+18
-26
lines changed

8 files changed

+18
-26
lines changed

Diff for: .travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ env:
1717
- NO_INTERACTION=1
1818
- TEST_TIMEOUT=120
1919
matrix:
20-
- V8=6.0
21-
- V8=6.0 TEST_PHP_ARGS=-m
20+
- V8=6.1
21+
- V8=6.1 TEST_PHP_ARGS=-m
2222

2323
before_install:
2424
- sudo add-apt-repository ppa:pinepain/libv8-${V8} -y

Diff for: CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ project(php_v8)
33

44
# NOTE: This CMake file is just for syntax highlighting in CLion
55

6-
include_directories(/usr/local/opt/v8@6.0/include)
7-
include_directories(/usr/local/opt/v8@6.0/include/libplatform)
6+
include_directories(/usr/local/opt/v8@6.1/include)
7+
include_directories(/usr/local/opt/v8@6.1/include/libplatform)
88

99
include_directories(/usr/local/include/php)
1010
include_directories(/usr/local/include/php/TSRM)

Diff for: README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,14 @@ in your IDE and other code-analysis tools.
7373
### Requirements
7474

7575
#### V8
76-
You will need a recent v8 Google JavaScript engine version installed. At this time the extension is tested on 6.0.45.
76+
You will need a recent v8 Google JavaScript engine version installed. At this time the extension is tested on 6.1.170.
7777

7878
#### PHP
7979
This extension is PHP7-only. It works and tested with both PHP 7.0 and PHP 7.1.
8080

8181
#### OS
8282
This extension works and tested on x64 Linux and macOS. As of written it is Ubuntu 16.04 LTS Xenial Xerus, amd64
83-
and macOS 10.12.1. Windows is not supported at this time.
83+
and macOS 10.12.5. Windows is not supported at this time.
8484

8585
### Quick guide
8686

@@ -96,7 +96,7 @@ $ php --ri v8
9696

9797
While [pinepain/php](https://launchpad.net/~pinepain/+archive/ubuntu/php) PPA targets to contain all necessary
9898
extensions with dependencies, you may find
99-
[pinepain/libv8-6.0](https://launchpad.net/~pinepain/+archive/ubuntu/libv8-6.0),
99+
[pinepain/libv8-6.1](https://launchpad.net/~pinepain/+archive/ubuntu/libv8-6.1),
100100
[pinepain/libv8-experimental](https://launchpad.net/~pinepain/+archive/ubuntu/libv8-experimental) and
101101
[pinepain/php-v8](https://launchpad.net/~pinepain/+archive/ubuntu/php-v8) standalone PPAs useful.
102102

Diff for: config.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ if test "$PHP_V8" != "no"; then
88
SEARCH_PATH="/usr/local /usr"
99
SEARCH_FOR="include/v8.h"
1010

11-
V8_MIN_API_VERSION_STR=6.0.45
11+
V8_MIN_API_VERSION_STR=6.1.170
1212

1313
DESIRED_V8_VERSION=`echo "${V8_MIN_API_VERSION_STR}" | $AWK 'BEGIN { FS = "."; } { printf "%s.%s", [$]1, [$]2;}'`
1414

Diff for: scripts/provision/provision.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ echo Provisioning...
55
# Add Ondřej Surý's PPA with co-installable PHP versions:
66
sudo add-apt-repository -y ppa:ondrej/php
77
# Add libv8 PPA:
8-
sudo add-apt-repository ppa:pinepain/libv8-6.0
8+
sudo add-apt-repository ppa:pinepain/libv8-6.1
99

1010
# Let's update packages list:
1111
sudo apt-get update
@@ -19,7 +19,7 @@ sudo apt-get install -y git htop curl pkgconf
1919

2020

2121
# Build and development requirements
22-
sudo apt-get install -y libv8-6.0 libv8-6.0-dev libv8-6.0-dbg
22+
sudo apt-get install -y libv8-6.1 libv8-6.1-dev libv8-6.1-dbg
2323
sudo apt-get install -y dh-make valgrind
2424
sudo apt-get install -y libssl-dev openssl
2525
sudo apt-get install -y php7.0 php7.0-cli php7.0-dev php7.0-fpm

Diff for: src/php_v8_value.cc

-10
Original file line numberDiff line numberDiff line change
@@ -314,16 +314,6 @@ php_v8_value_t *php_v8_get_or_create_value(zval *return_value, v8::Local<v8::Val
314314
}
315315

316316

317-
//static PHP_METHOD (V8Value, __construct) {
318-
// zval *php_v8_isolate_zv;
319-
//
320-
// if (zend_parse_parameters(ZEND_NUM_ARGS(), "o", &php_v8_isolate_zv) == FAILURE) {
321-
// return;
322-
// }
323-
//
324-
// PHP_V8_THROW_EXCEPTION("V8\\Value::__construct() should not be called. Use specific values instead.")
325-
//}
326-
327317
static PHP_METHOD(V8Value, GetIsolate) {
328318
zval rv;
329319

Diff for: tests/004-ICU-Intl_DateTimeFormat.phpt

+3-3
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ console.log(new Intl.DateTimeFormat('de-DE', options).format(date));
7575
options.timeZone = 'UTC';
7676
options.timeZoneName = 'short';
7777
console.log(new Intl.DateTimeFormat('en-US', options).format(date));
78-
// → "Thursday, December 20, 2012, GMT"
78+
// → "Thursday, December 20, 2012, UTC"
7979
8080
// sometimes you want to be more precise
8181
var options = {
@@ -129,8 +129,8 @@ HEREDOC;
129129
20/12/2012
130130

131131
Donnerstag, 20. Dezember 2012
132-
Thursday, December 20, 2012, GMT
133-
3:00:00 am GMT
132+
Thursday, December 20, 2012, UTC
133+
3:00:00 am UTC
134134
12/20/2012, 03:00:00
135135

136136
Wednesday, December 19, 2012

Diff for: tests/V8DateObject.phpt

+5-3
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@ val
9696
$file_name = 'test.js';
9797

9898
// TODO: for some reason v8 still be notified about TZ changes, see https://groups.google.com/forum/?fromgroups#!topic/v8-users/f249jR67ANk
99-
// TODO: we temporary set EDT instead of PDT which was before
99+
// We temporary set EDT instead of PDT which was before, this should lead to no error, but the output date value is
100+
// undefined, it's a must to invoke \V8\DateObject::DateTimeConfigurationChangeNotification($isolate); as we did before.
101+
// This case is verify that no segfault or exception thrown and to demonstrate that result is not what you expect to get.
100102
$script = new V8\Script($context, new \V8\StringValue($isolate, $source), new \V8\ScriptOrigin($file_name));
101103
$res = $script->Run($context);
102104
$helper->value_matches($test_time, $value->ValueOf());
@@ -106,7 +108,7 @@ putenv("TZ={$old_tz}"); // Go back
106108

107109

108110
?>
109-
--EXPECT--
111+
--EXPECTF--
110112
Object representation:
111113
----------------------
112114
object(V8\DateObject)#6 (2) {
@@ -204,6 +206,6 @@ Expected 1445444940000.0 value is identical to actual value 1445444940000.0
204206

205207
Timezone change (without notification to v8):
206208
---------------------------------------------
207-
val: Wed Oct 21 2015 09:29:00 GMT-0700 (PDT)
209+
val: Wed Oct 21 2015 09:29:00 GMT-0700 (%sDT)
208210
typeof val: object
209211
Expected 1445444940000.0 value is identical to actual value 1445444940000.0

0 commit comments

Comments
 (0)