|Changelog for runkit
||What has changed?
+ PHP 5.4, 5.5, and 5.6 are now fully supported
- PHP 4.x is not supported anymore
+ Closures are now accepted by runkit_function_add, runkit_function_redefine, runkit_method_add, and runkit_method_redefine
This feature works in PHP 5.3 and above.
+ Introduced new function "runkit_default_property_remove" (Thanks to Juhan Kundla)
+ Ability to add non-scalar default properties was added
+ Magic methods __isset, __unset, __callStatic, serialize, unserialize, debugInfo and __toString are now supported.
+ Functions runkit_class_adopt & runkit_class_emancipate now change class-hierarchy (issue #13)
+ Adding and redefining functions and methods, which return references, were fully implemented
New optional argument 'return_ref' of functions runkit_function_add and runkit_function_redefine was introduced
New constant RUNKIT_ACC_RETURN_REFERENCE was introduced for use with functions runkit_method_add and runkit_method_redefine
+ Properties adding, removing, and importing were reworked for proper inheritance (including objects in PHP5+)
+ A new constant RUNKIT_OVERRIDE_OBJECTS was introduced. Use it by bitwise adding to the flags parameter
of functions runkit_default_property_add and runkit_import to add (and remove) properties of existing objects.
This feature works in PHP 5.x and above and it is switched off by default.
+ New (the third one) parameter remove_from_objects of boolean type was introduced
in runkit_default_property_remove function. Pass the TRUE value to remove property from existing objects.
This feature works in PHP 5.x and above. The default value for this parameter is FALSE.
+ Namespaces are fully supported by constants manipulation functions (Thanks to Antony Dovgal)
+ Allow disabling of allow_url_include in a Runkit_Sandbox (PHP >= 5.2) (Thanks to Sara Golemon)
+ New optional argument 'doc_comment' of functions runkit_method_add, runkit_method_redefine, runkit_function_add,
and runkit_function_redefine was introduced to specify doc_comments.
+ Preserve doc_comments on copying and redefining functions and methods.
* Highly probable crashes on using Reflection objects after modifying removing or renaming of functions, methods, and properties,
for which those Reflection objects have been instantiated, were eliminated
* Crash on sandbox creation when register_globals is switched on was fixed
* Building and working with PHP4 were fixed
* Crash on syntax error in source file importing with runkit_import was fixed
* The possible crash on manipulating constants having length less than two characters was eliminated
* Crash after using runkit_class_adopt when inherited methods access properties of the parent class (issue #59)
* Crash on calling renamed private/protected method (issue #64)
* Crash when copied function contains finally (issue #77) (Thanks to Antony Dovgal)
* Lists of directories in open_basedir sandbox setting are now supported
* All ways of adding and removing magic methods and old-style constructors
were reworked and corrected (Thanks to Anthony Dovgal for issues #35, #57, and #79).
* Side effect of redefining, adding and removing class constant (Issue #25) was eliminated
* Adding of non-lowercase default properties was fixed (removed lowercasing)
* Skip the leading slash in class names
* Copying, redefining, and renaming of functions were reworked
* Converting of input parameters (class names & function names) to lowecase was eliminated
* runkit_method_redefine function now sets the 'prototype' field for the method
and its descendants (Thanks to Anthony Dovgal)
* Freeing already freed memory on importing of a non-existent file was eliminated
* A test for correctness of runkit.superglobals feature was added
* Tests for correctness of inheritance of properties were added
* Tests for correctness of adding static properties were added
* Bug 57649 (https://bugs.php.net/bug.php?id=57649) has been fixed without apathy ;)
Thanks to Sara Golemon for tests.
* Importing class extending another class was fixed (Issue #48) (thanks to mido0258)
* User-defined functions should remain after Runkit's shutdown
(thanks to Sara Golemon for code and to https://github.com/cobrafast for test)
* Restoring of misplaced internal functions was corrected (issue #63)
* Delete temporary function on errors of adding/redefining methods
* runkit_method_add, runkit_method_copy, and runkit_method_rename now override derived methods (issue #62)
Build system improvements:
* PEAR Channel zenovich.github.io/pear was introduced for releasing new packages
* Declarations after statement were restricted during compiling
* Warnings now will be treated as errors
* All tests now succeed under valgrind
* A compilation bug (with gcc 4.3+), caused by wrong definition of internal function,
was fixed (Thanks to Reeze Xia)
||License was changed to the BSD License (3 Clause)
* Building on windows-platform was fixed.
* The issue with inheritance of methods, which have been created by the runkit_method_rename function, was fixed.
* Fixed dumb bug in workarounds based on php-version.
||Disappointing incompatibility issue with php 5.3+ in untested code was fixed.
+ The patch made by David Sklar was applied to support creation and changing of static methods.
The new user-level const "RUNKIT_ACC_STATIC" was introduced.
+ An ability to import static class properties was added.
The new user-level const "RUNKIT_IMPORT_CLASS_STATIC_PROPS" was introduced.
+ An ability to apply a closure to a sandbox in PHP 5.3+ by calling the call_user_func method was added.
* Fixes of issues with importing constant arrays into properties and constants
* Fixes of issues with importing functions or methods having static variables inside them
* The behaviour that old methods had been always overridden by new ones independently from
the RUNKIT_IMPORT_OVERRIDE flag was corrected
* Compatibility with 5.3+ in zts mode
* runkit_function_* functions were fixed with the patch from Keisial at gmail dot com
(see the second comment from http://pecl.php.net/bugs/bug.php?id=14086)
* The reverting of protected methods via runkit_method_copy was corrected, the segmentation fault
on calling restored method was eliminated
* Elimination of the segmentation-fault on exit after restoring modified internal functions
(see also http://pecl.php.net/bugs/bug.php?id=11632)
* Correction for the situation when a method or function having static variables in itself
and copied by runkit crashes afterwards on calling if the original method or function was removed
* The issue that the runkit used to create new methods with lowercase names was fixed, tests were extended
* Methods' prototype detection was fixed
||Allow building part of runkit while leaving other functionality out.
--enable-runkit works as before, building all runkit features
Individual features may enabled or disable by using
--enable-runkit-featurename or --disbale-runkit-featurename
where featurename is any of:
modify - Runtime manipulation
super - Superglobal registration
sandbox - Sandboxing
Ex: ./configure --enable-runkit --disable-runkit-modify
Enable superglobal registration and sandbox support,
but disable runtime manipulation.
./configure --disable-runkit --enable-runkit-sandbox
Enable only sandboxing support.
This release also:
- Fixes PHP4 (ZE1) compilation
- Closes a potential crash-bug in runkit_import()
handling of default properties
- Resolves an output buffering bug in Runkit_Sandbox
- Resolves Runkit_Sandbox failure when superglobals are defined
||Added source file runkit_props.c to package
||Fixed SAPI handlers for genuinely threaded webservers (e.g. apache2-worker)
Fixed internal pointer corruption in function/class popping
Implemented class property importing in runkit_import()
Began refactor for PHP6 compatability
||Primarily bugfix release, only new functionality is expanded parent_scope setting.
Workaround bug when using runkit_import() with opcode caches by bypassing cache for imported file.
Fix using runkit_import() with multiple classes (Thanks to Stuart Herbert for the patch)
Fix various reference issues for parameters passed to manipulation functions.
Fix C++ compatability in sandbox source files.
Fix parent_scope support (was only applied to property_read and eval/include/require ops)
Expand parent_scope setting to allow variable arrays as symbol tables.