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

Commit 440a867

Browse files
committed
Upgrade to libv8-6.2
1 parent d175721 commit 440a867

12 files changed

+28
-29
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ config.status
2222
config.sub
2323
configure
2424
configure.in
25+
configure.ac
2526
/include
2627
install-sh
2728
libtool

.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.1
21-
- V8=6.1 TEST_PHP_ARGS=-m
20+
- V8=6.2
21+
- V8=6.2 TEST_PHP_ARGS=-m
2222

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

CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
cmake_minimum_required(VERSION 3.1)
2-
project(php_v8)
2+
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.1/include)
7-
include_directories(/usr/local/opt/v8@6.1/include/libplatform)
6+
include_directories(/usr/local/opt/v8@6.2/include)
7+
include_directories(/usr/local/opt/v8@6.2/include/libplatform)
88

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

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ 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.1.170.
76+
You will need a recent v8 Google JavaScript engine version installed. At this time the extension is tested on 6.2.2.
7777

7878
#### PHP
7979
This extension is PHP7-only. It works and tested with both PHP 7.0 and PHP 7.1.
@@ -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.1](https://launchpad.net/~pinepain/+archive/ubuntu/libv8-6.1),
99+
[pinepain/libv8-6.2](https://launchpad.net/~pinepain/+archive/ubuntu/libv8-6.2),
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

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.1.170
11+
V8_MIN_API_VERSION_STR=6.2.2
1212

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

scripts/replace_expect.php

+4
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@
8181
}
8282

8383
foreach (array_combine($expectf_search[1], $expectf_replace[1]) as $search => $replace) {
84+
$replace = str_replace('\\\\n', '!!(ಠ_ಠ)!!', $replace);
85+
$replace = str_replace('\\n', "\n", $replace);
86+
$replace = str_replace('!!(ಠ_ಠ)!!', '\\\\n', $replace);
87+
8488
$result = preg_replace($search, $replace, $result);
8589
}
8690

scripts/test_v8/hello_world_build.sh

-13
This file was deleted.

scripts/test_v8/hello_world_build_deb.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
ROOT=/opt/libv8-5.7
3+
ROOT=/opt/libv8-6.2
44
LIB_DIR=$ROOT/lib/
55

66
SRC_DIR=$ROOT

scripts/test_v8/hello_world_build_osx.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
ROOT=/usr/local/opt/v8@5.7
3+
ROOT=/usr/local/opt/v8@6.2
44
LIB_DIR=$ROOT/lib/
55

66
SRC_DIR=$ROOT

tests/V8Exception_CreateMessage.phpt

+5-2
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ $res = $v8_helper->CompileRun($context, $source);
7070
$helper->line();
7171

7272
$v8_helper->run_checks($res);
73+
74+
// EXPECTF: ---/\["script_id":"V8\\ScriptOrigin":private\]=>\n int\(\d+\)/
75+
// EXPECTF: +++["script_id":"V8\ScriptOrigin":private]=>\n int(%d)
7376
?>
7477
EOF
7578
--EXPECTF--
@@ -104,7 +107,7 @@ V8\Message->GetScriptOrigin():
104107
bool(false)
105108
}
106109
["script_id":"V8\ScriptOrigin":private]=>
107-
int(19)
110+
int(%d)
108111
["source_map_url":"V8\ScriptOrigin":private]=>
109112
string(0) ""
110113
}
@@ -142,7 +145,7 @@ V8\Message->GetScriptOrigin():
142145
bool(false)
143146
}
144147
["script_id":"V8\ScriptOrigin":private]=>
145-
int(19)
148+
int(%d)
146149
["source_map_url":"V8\ScriptOrigin":private]=>
147150
string(0) ""
148151
}

tests/V8Exception_GetStackTrace.phpt

+4-2
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,10 @@ $isolate->SetCaptureStackTraceForUncaughtExceptions($stack_trace_generation_allo
8888
$res = $v8_helper->CompileRun($context, $source);
8989

9090

91+
// EXPECTF: ---/\["script_id":"V8\\StackFrame":private\]=>\n int\(\d+\)/
92+
// EXPECTF: +++["script_id":"V8\StackFrame":private]=>\n int(%d)
9193
?>
92-
--EXPECT--
94+
--EXPECTF--
9395
Can get stack trace when out of context: ok
9496

9597
exception: 'Error: test'
@@ -118,7 +120,7 @@ V8\StackTrace->getFrames():
118120
["column":"V8\StackFrame":private]=>
119121
int(15)
120122
["script_id":"V8\StackFrame":private]=>
121-
int(19)
123+
int(%d)
122124
["script_name":"V8\StackFrame":private]=>
123125
string(7) "test.js"
124126
["script_name_or_source_url":"V8\StackFrame":private]=>

tests/V8UnboundScript.phpt

+4-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,10 @@ $new_script = $unbound->BindToContext($context);
6262
$helper->dump($new_script->Run($context)->Value());
6363
$helper->space();
6464

65+
// EXPECTF: ---/V8\\UnboundScript->GetId\(\): int\(\d+\)/
66+
// EXPECTF: +++V8\UnboundScript->GetId(): int(%d)
6567
?>
66-
--EXPECT--
68+
--EXPECTF--
6769
UnboundScript representation:
6870
-----------------------------
6971
object(V8\UnboundScript)#6 (1) {
@@ -82,7 +84,7 @@ Accessors:
8284
----------
8385
V8\UnboundScript::GetIsolate() matches expected value
8486
V8\UnboundScript::BindToContext() result is instance of V8\Script
85-
V8\UnboundScript->GetId(): int(19)
87+
V8\UnboundScript->GetId(): int(%d)
8688
V8\UnboundScript->GetScriptName(): V8\StringValue->Value(): string(7) "test.js"
8789
V8\UnboundScript->GetSourceURL(): V8\UndefinedValue->IsUndefined(): bool(true)
8890
V8\UnboundScript->GetSourceMappingURL(): V8\StringValue->Value(): string(0) ""

0 commit comments

Comments
 (0)