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

Releases: phpv8/php-v8

Sync with V8 upstream and new features

27 Feb 21:38
Compare
Choose a tag to compare

I'm excited to announce that starting from this release documentation is available at https://php-v8.readthedocs.io.

Read The Docs is awesome place to host documentation and Sphinx would help to create decent documentation. Contributors welcomed!

This is the last version that supports PHP 7.1. For all next versions PHP >= 7.2 required.

BC-breaking changes:

  • Upgrade v8 version to 6.6.313
  • Remove deprecated and non-working ScriptCompiler cache options
  • Rework PromiseObject
  • Add ValueObject::isBigInt64Array() and ValueObject::isBigUint64Array methods

Non-breaking changes:

  • Add number of native and detached contexts to HeapStatistics
  • Add support to produce code cache
  • Add ScriptCompiler::OPTION_EAGER_COMPILE option
  • Add support for integer->strings for ObjectValue::GetOwnPropertyNames and `ObjectValue::GetPropertyNames
  • Add {Template,ObjectValue}:setLazyDataProperty() method

Bug fixes and improvements

23 Oct 20:23
Compare
Choose a tag to compare

This release brings stability and improvements. It contains some minor BC-breaking changes which should not affect general public. See full change log below for details

Changelog:

* - BC-breaking changes

  • * require libv8 >= 6.4.6;
  • * remove UnboundScript::kNoScriptId const and return null in getId() on no data
  • * change ScriptCompiler::cachedDataVersionTag(): int method name and return type to be ScriptCompiler::getCachedDataVersionTag(): float;
  • * remove StartupData::getRawSize() method;
  • fix segfault when invalid startup data passed to isolate;
  • fix external exception lost when it has refcount 1;
  • change script compiler version tag generation to take into account changes to extension internals;
  • add CallbackInfoInterface;
  • add support for ScriptCompiler::kProduceFullCodeCache;
  • add {Isolate,Context}::within() as optimization solution;
  • add StartupData::isRejected();
  • add docs skeleton.

Upgrade extension API

06 Oct 20:52
Compare
Choose a tag to compare

This release introduces many major changes to public API and breaks BC for the sake of more solid and stable API in a further versions.

PLEASE READ:

Maintaining this project takes significant amount of time and efforts.
If you like my work and want to show your appreciation, please consider supporting me at https://www.patreon.com/pinepain.

Changes:

  • Drop PHP 7.0 support, #30;
  • Add typehint for $value param in Template::set(), #36;
  • Rename constants to match PSR-2 convention, #34;
  • Make enum classes with constants final, #39 ;
  • Rename HeapStatistics methods to match PSR-2, #38;
  • Rename V8\Exception class and it methods, #33;
  • Add FunctionObject::getScriptId() method;
  • Remove no-data constants and use NULL instead, #40;
  • Refactor ScriptOriginOptions to use bit field, #42;
  • Remove redundant ScriptOrigin::is*() methods, #61;
  • Add missed method to Value stub;
  • Fix improperly adjusted external allocated memory on weak callback call;
  • Add Proxy and Promise builtin support, #55;
  • Add support for regexp dotAll flag, #54;
  • Move RegExpObject\Flags constants under RegExpObject, #64;
  • Move CompileOptions constants under ScriptCompiler, #65;
  • Add Isolate::MemoryPressureNotification() support, #57;
  • Require libv8 >= 6.3.163;
  • Add StackFrame::isWasm(), #53;
  • Get rid of CallbackInfo, #67;
  • Add immutable prototype chains to ObjectTemplate, #58;
  • Add StartupData::warmUpSnapshotDataBlob(), #59;
  • Add missed JSON class support, #56;
  • Add Message::getErrorLevel() method, #52;
  • Rename SymbolValue methods, #41;
  • Rename TryCatch methods, #41;
  • Add missed PrimitiveValue::value() abstract method;
  • Add Isolate::SetRAILMode(), #60;
  • Fix improperly internally constructed RAILMode enum class, #60.

See #43 (comment) for details

Refactor methods name to follow PSR-2 camelCase convention

01 Sep 17:21
Compare
Choose a tag to compare

This is the last release that supports PHP 7.0.

Changes:

  • refactor method names to follow PSR-2 camelCase convention;

Improve exceptions api

17 Jul 19:12
Compare
Choose a tag to compare

This release extends and clarify existent API and does not introduce any BC-breaking changes.

Changes list:

  • Change V8\Exception::*Error() return type to V8\ObjectValue as the only possible type;
  • Add external exception wiring option to V8\Isolate::ThrowException().

Fix segfaults on unclean shutdown

17 Jul 12:19
Compare
Choose a tag to compare

Changes to public API and other important changes which may affect end-user:

  • Fix segfaults on unclean shutdown
  • Require v8 >= 6.1.170

Add Value() metod to all Primitive values and fix bugs

03 May 17:07
Compare
Choose a tag to compare

Changes to public API and other important changes which may affect end-user:

  • Enforce Value() method on all V8\Primitive values;
  • Fix segfault when zero args passed to V8\FunctionObject::NewInstance();

Improve JS primitive types handling and bug fixes

30 Apr 20:15
Compare
Choose a tag to compare

This release introduces separate representation for undefined value and fixes some bugs. Please, see change list below for more details.

* - BC-breaking or potentially BC-breaking changes

Changes to public API and other important changes which may affect end-user:

  • * Make V8\Isolate::ThrowException() method void;
  • * Remove non-documented V8Isolate::ContextDisposedNotification();
  • * Make V8\Value, V8\PrimitiveValue and V8\NameValue abstract;
  • V8\Isolate time limit affects js runtime only;
  • Introduce separate class for undefined value - V8UndefenedValue;
  • Fix V8\Tempalte::Set() to do not accept non-primitive values;
  • Remove all private properties from V8\Isolate;

Improve API

22 Apr 19:09
Compare
Choose a tag to compare

This release adds low-level optimizations, simplify some internal methods and fix few bugs. For more details see change list below.

As of this release, V8 >= 6.0.45 required.

* - BC-breaking or potentially BC-breaking changes

Changes to public API and other important changes which may affect end-user:

  • Raise libv8 required version to 6.0.45;
  • Add V8\Value::InstanceOf() method;
  • Add V8\ObjectValue::SetNativeDataProperty() method;
  • Add V8\PropertyFilter, V8\KeyCollectionMode and V8\IndexFilter enums;
  • Add property filtering support to V8\ObjectValue::Get{Property,OwnProperty}Names();
  • Consistently expose all well-known symbols on V8\SymbolValue;
  • Setting boolean props on StackFrame with valid type;
  • Remove non-working and non-supporting $attributes argument from V8\StringValue constructor in stubs;
  • * Add V8\ConstructorBehavior and support for it in V8\FunctionTemplate constructor;
  • * Add signature support in V8\FunctionTemplate constructor via $receiver;
  • * Add signature support to Template:SetNativeDataProperty() and ObjectTemplate::SetAccessor() via $receiver;
  • * Remove require $isolate parameter from V8\Value::TypeOf();
  • * Remove deprecated V8\Context::EstimatedSize() method;
  • * Remove deprecated V8\StackTrace\StackTraceOptions;
  • * Remove deprecated V8\StackTrace::AsArray();
  • * Require Context explicitly in V8\Isolate::ThrowException();
  • * Rename V8\Exceptions\GenericException to V8\Exceptions\Exception;
  • * Rename V8\Exceptions\AbstractResourceLimitException to V8\Exceptions\ResourceLimitException;
  • * Check whether returned context is empty in V8\Isolate\GetEnteredContext() instead of checking InContext();

Cleanups, optimizations and fixes

05 Mar 20:51
Compare
Choose a tag to compare

This release adds low-level optimizations, simplify some internal methods and fix few bugs. For more details see change list below.

As of this release, V8 >= 5.9.5 required.

* - BC-breaking or potentially BC-breaking changes

Changes to public API and other important changes which may affect end-user:

  • * Replace V8\Isolate::GetCurrentContext with V8\Isolate::GetEnteredContext();
  • * Remove V8\ObjectValue::CreationContext(), use V8\ObjectValue::GetContext();
  • Add V8\PropertyCallbackInfo::ShouldThrowOnError() method;
  • Add V8\FunctionCallbackInfo::NewTarget() method;
  • V8\ReturnValue now explicitly holds isolate and context which could be accessed outside of calling context, though ReturnValue::{Get,Set} could be accessed only within calling context as before;
  • Fix potential problems with V8\FunctionCallbackInfo and V8\PropertyCallbackInfo, now they are fully build, properly stores owning isolate and context and could be safely used outside calling scope;
  • Fix leak when V8\ScriptCompiler::CompileFunctionInContext() invoked with arguments or arguments and context extensions;
  • Fix segfault under when abruptly exiting (die(), exit(), uncaught exception) from isolate which entered multiple time or from multiple nested isolates (quite rare use case).
  • Add V8\Exceptions\ValueException to stubs. It support was in extension for ages but for some reason it was missed from stubs.
  • Remove $global_template and $global_object private props from V8\Context. They were never exposed to end-user anyway.