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

Commit 8fc173f

Browse files
committed
Upgrade to libv8-6.3, closes #45
1 parent 67fa362 commit 8fc173f

File tree

8 files changed

+14
-14
lines changed

8 files changed

+14
-14
lines changed

Diff for: .travis.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ env:
1616
- NO_INTERACTION=1
1717
- TEST_TIMEOUT=120
1818
matrix:
19-
- V8=6.2
20-
- V8=6.2 TEST_PHP_ARGS=-m
19+
- V8=6.3
20+
- V8=6.3 TEST_PHP_ARGS=-m
2121

2222
before_install:
2323
- sudo add-apt-repository ppa:pinepain/libv8-${V8} -y
2424
- sudo apt-get update -q
25-
- sudo apt-get install -y libv8-${V8}-dev
25+
- sudo apt-get install -y libv8-${V8}-dev libv8-${V8}-dbg
2626
- php -i
2727
- php-config || true
2828

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.2/include)
7-
include_directories(/usr/local/opt/v8@6.2/include/libplatform)
6+
include_directories(/usr/local/opt/v8@6.3/include)
7+
include_directories(/usr/local/opt/v8@6.3/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
@@ -48,7 +48,7 @@ $source = new \V8\StringValue($isolate, "'Hello' + ', World!'");
4848
$script = new \V8\Script($context, $source);
4949
$result = $script->run($context);
5050

51-
echo $result->toString($context)->value(), PHP_EOL;
51+
echo $result->value(), PHP_EOL;
5252
```
5353

5454
which will output `Hello, World!`. See how it's shorter and more readable than [that C++ version][v8-hello-world]?
@@ -69,7 +69,7 @@ in your IDE and other code-analysis tools.
6969
### Requirements
7070

7171
#### V8
72-
You will need a recent v8 Google JavaScript engine version installed. At this time the extension is tested on 6.2.2.
72+
You will need a recent v8 Google JavaScript engine version installed. At this time v8 >= 6.3.2 required.
7373

7474
#### PHP
7575
This extension is PHP7-only. It works and tested with both PHP 7.0 and PHP 7.1.
@@ -92,7 +92,7 @@ $ php --ri v8
9292

9393
While [pinepain/php](https://launchpad.net/~pinepain/+archive/ubuntu/php) PPA targets to contain all necessary
9494
extensions with dependencies, you may find
95-
[pinepain/libv8-6.2](https://launchpad.net/~pinepain/+archive/ubuntu/libv8-6.2),
95+
[pinepain/libv8-6.3](https://launchpad.net/~pinepain/+archive/ubuntu/libv8-6.3),
9696
[pinepain/libv8-experimental](https://launchpad.net/~pinepain/+archive/ubuntu/libv8-experimental) and
9797
[pinepain/php-v8](https://launchpad.net/~pinepain/+archive/ubuntu/php-v8) standalone PPAs useful.
9898

Diff for: config.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if test "$PHP_V8" != "no"; then
1919
SEARCH_PATH="/usr/local /usr"
2020
SEARCH_FOR="include/v8.h"
2121

22-
V8_MIN_API_VERSION_STR=6.2.2
22+
V8_MIN_API_VERSION_STR=6.3.2
2323

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

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.2
8+
sudo add-apt-repository ppa:pinepain/libv8-6.3
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.2 libv8-6.2-dev libv8-6.2-dbg
22+
sudo apt-get install -y libv8-6.3 libv8-6.3-dev libv8-6.3-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.1 php7.1-cli php7.1-dev php7.1-fpm

Diff for: stubs/src/StringValue.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*/
2222
class StringValue extends NameValue
2323
{
24-
const MAX_LENGTH = (1 << 28) - 16;
24+
const MAX_LENGTH = (1 << 30) - 25; // It's (1 << 28) - 16 on x32 platform, but we don't run on x32.
2525

2626
/**
2727
* @param Isolate $isolate

Diff for: tests/001-verify_extension_entities.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ abstract class V8\NameValue
619619

620620
class V8\StringValue
621621
extends V8\NameValue
622-
const MAX_LENGTH = 268435440
622+
const MAX_LENGTH = 1073741799
623623
public function __construct(V8\Isolate $isolate, $data)
624624
public function value(): string
625625
public function length(): int

Diff for: tests/StringValue.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ StringValue extends Value: ok
120120

121121
Class constants:
122122
----------------
123-
V8\StringValue::MAX_LENGTH = 268435440
123+
V8\StringValue::MAX_LENGTH = 1073741799
124124

125125

126126
Accessors:

0 commit comments

Comments
 (0)