Skip to content

Commit 45e427a

Browse files
committed
API update and version bump for 0.5.0.
1 parent 04e35c7 commit 45e427a

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ Include the `phpv8/v8js-stubs` repository in the **require-dev** section of your
1616

1717
```json
1818
"require-dev": {
19-
"phpv8/v8js-stubs": "~0.4"
19+
"phpv8/v8js-stubs": "~0.5"
2020
}
2121
```

src/V8Js.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,17 @@ public static function registerExtension($extension_name, $code, array $dependen
134134
*/
135135
public static function getExtensions()
136136
{}
137+
138+
/**
139+
* Creates a custom V8 heap snapshot with the provided JavaScript source embedded.
140+
* Snapshots are supported by V8 4.3.7 and higher. For older versions of V8 this
141+
* extension doesn't provide this method.
142+
*
143+
* @since 0.5.0
144+
* @param string $embed_source
145+
*
146+
* @return string|false
147+
*/
148+
public static function createSnapshot($embed_source)
149+
{}
137150
}

0 commit comments

Comments
 (0)