Closed pinepain closed 7 years ago
Changes in 0.2.0:
$value
param in Template::set()
, #36;final
, #39 ;HeapStatistics
methods to match PSR-2, #38;V8\Exception
class and it methods, #33;FunctionObject::getScriptId()
method;NULL
instead, #40;ScriptOriginOptions
to use bit field, #42; ScriptOrigin::is*()
methods, #61;Value
stub;dotAll
flag, #54;RegExpObject\Flags
constants under RegExpObject
, #64;CompileOptions
constants under ScriptCompiler
, #65;Isolate::MemoryPressureNotification()
support, #57;StackFrame::isWasm()
, #53;CallbackInfo
, #67;ObjectTemplate
, #58;StartupData::warmUpSnapshotDataBlob()
, #59;JSON
class support, #56;Message::getErrorLevel()
method, #52;SymbolValue
methods, #41;TryCatch
methods, #41;PrimitiveValue::value()
abstract method;Isolate::SetRAILMode()
, #60;That's simple - see the linked issue for the reference. I really have no time support all PHP versions and what's more, I'd like to use new features from recent PHP version. Based on that 7.0 is soon to be EOL and extension is experimental, not supporting it is a wise choice in a long-term perspective.
Data
typehint for $value
param in Template::set()
, #36Internally there was Data
type hint, so it was impossible to pass something different. This change is fully cosmetic.
All constants now follow PSR-2 style and use no k
prefix, which was a rudiment from V8 C++ API. Constant names uses UPPER_CAMEL_CASE instead of PascalCase or camelCase.
Before | After |
---|---|
ConstructorBehavior::kThrow |
ConstructorBehavior::THROW |
ConstructorBehavior::kAllow |
ConstructorBehavior::ALLOW |
IntegrityLevel::kFrozen |
IntegrityLevel::FROZEN |
IntegrityLevel::kSealed |
IntegrityLevel::SEALED |
PropertyAttribute::None |
PropertyAttribute:: |
PropertyAttribute::ReadOnly |
PropertyAttribute::NONE |
PropertyAttribute::DontEnum |
PropertyAttribute::READ_ONLY |
PropertyAttribute::DontDelete |
PropertyAttribute::DONT_ENUM |
PropertyHandlerFlags::kNone |
PropertyHandlerFlags::NONE |
PropertyHandlerFlags::kAllCanRead |
PropertyHandlerFlags::ALL_CAN_READ |
PropertyHandlerFlags::kNonMasking |
PropertyHandlerFlags::NON_MASKING |
PropertyHandlerFlags::kOnlyInterceptStrings |
PropertyHandlerFlags::ONLY_INTERCEPT_STRINGS |
KeyCollectionMode::kOwnOnly |
KeyCollectionMode::OWN_ONLY |
KeyCollectionMode::kIncludePrototypes |
KeyCollectionMode::INCLUDE_PROTOTYPES |
IndexFilter::kIncludeIndices |
IndexFilter::INCLUDE_INDICES |
IndexFilter::kSkipIndices |
IndexFilter::SKIP_INDICES |
RegExpObject\Flags::kNone |
RegExpObject\Flags::NONE |
RegExpObject\Flags::kGlobal |
RegExpObject\Flags::GLOBAL |
RegExpObject\Flags::kIgnoreCase |
RegExpObject\Flags::IGNORE_CASE |
RegExpObject\Flags::kMultiline |
RegExpObject\Flags::MULTILINE |
RegExpObject\Flags::kSticky |
RegExpObject\Flags::STICKY |
RegExpObject\Flags::kUnicode |
RegExpObject\Flags::UNICODE |
ScriptCompiler\CompileOptions::kNoCompileOptions |
ScriptCompiler\CompileOptions::NO_COMPILE_OPTIONS |
ScriptCompiler\CompileOptions::kProduceParserCache |
ScriptCompiler\CompileOptions::PRODUCE_PARSER_CACHE |
ScriptCompiler\CompileOptions::kConsumeParserCache |
ScriptCompiler\CompileOptions::CONSUME_PARSER_CACHE |
ScriptCompiler\CompileOptions::kProduceCodeCache |
ScriptCompiler\CompileOptions::PRODUCE_CODE_CACHE |
ScriptCompiler\CompileOptions::kConsumeCodeCache |
ScriptCompiler\CompileOptions::CONSUME_CODE_CACHE |
StringValue::kMaxLength |
StringValue::MAX_LENGTH |
NOTE: affected constants list is incomplete, as listing them is a
There is no big reason to inherit service classes that holds only constants. I don't think there is good reason to do that. If your code extends constants-only classes, please, alter it to adopt this change.
HeapStatistics
methods to match PSR-2, #38Before | After |
---|---|
HeapStatistics::total_heap_size() |
HeapStatistics::getTotalHeapSize() |
HeapStatistics::total_heap_size_executable() |
HeapStatistics::getTotalHeapSizeExecutable() |
HeapStatistics::total_physical_size() |
HeapStatistics::getTotalPhysicalSize() |
HeapStatistics::total_available_size() |
HeapStatistics::getTotalAvailableSize() |
HeapStatistics::used_heap_size() |
HeapStatistics::getUsedHeapSize() |
HeapStatistics::heap_size_limit() |
HeapStatistics::getHeapSizeLimit() |
HeapStatistics::malloced_memory() |
HeapStatistics::getMallocedMemory() |
HeapStatistics::peak_malloced_memory() |
HeapStatistics::getPeakMallocedMemory() |
HeapStatistics::does_zap_garbage() |
HeapStatistics::doesZapGarbage() |
All other changes could be tracked by looking into tests/001-verify_extension_entities.phpt file diff.
It could be a list of transitions, what was before and what it become after. Stubs diff may come in handy here.