Changelog
2.0.4
- Done: Elaborate the logic that prevents double inclusion.
- Fixed: The default redefinitions of call_user_func etc. still seem to be buggy.
- Fixed: Stream::url_stat suppresses errors, but not exceptions, in the delegated stat call.
- Fixed: DIRECTORY_SEPARATOR-related cache issues on Windows.
2.0.3
2.0.2
- Unsuccessful attempt at fixing $frame is undefined in CallRerouting::connectDefaultInternals.
2.0.1
2.0.0
- Added support for the redefinition of PHP's internal functions.
1.4.3
- Fixed: Warning: strpos(): Offset not contained in string.
- Fixed: Fatal error: Call to undefined function patchwork\callrerouting\deployqueue().
- Fixed: wildcard issues in HHVM due to the non-incremental ordering of get_declared_classes().
- No more warnings when Patchwork is not the first imported file. In case of unexpected behavior, use Patchwork\hasMissed($callable) : bool to check if your callable shows up too early to be redefinable.
- Removed the suppress-warnings key from patchwork.json, which is now redundant per previous point.
1.4.2
- Fixed: Error: Please import Patchwork from a point in your code where no user-defined function, class or trait is yet defined (BrainMonkey + PHPUnit).
- Fixed: Patchwork warning when included in PHPUnit bootstrap.
1.4.1
- Fixed: Correctly handle class instances.
- Fixed: restoreAll() crashes with wildcards, multiple methods.
- Autoloading is no longer used with Composer.
1.4.0
- Wildcards are now supported, e.g. replace('App\*', ...).
- Optional configuration files (patchwork.json) are now used to blacklist/whitelist files for preprocessing, suppress warnings and specify a cache path.
- The cache used by Patchwork can now be primed by running patchwork.phar from the command line.
- redefine, restore[All] and relay are now the main aliases of replace, undo[All] and callOriginal.
- Fixed: issues with flock().
1.3.5
- Fixed: faulty HHVM support.
- Fixed: incompatibility with WinCache.
1.3.4
- Fixed: .
1.3.2
- Fixed: .
1.3.1
- Fixed: .
1.3.0
- Wrapper-like behavior is now available to redefinitions using Patchwork\callOriginal().
- Preprocessor output is now optionally cached.
- Patchwork\replaceLater is now a alias to Patchwork\replace, which now performs an existence check when a redefinition is being undone, or on shutdown.
- HHVM is now supported.
- No interference with opcode caches was detected.
1.2.9
- Fixed: .
1.2.8
- Fixed: .
1.2.7
- .
1.2.6
- .
- Moved the PHAR from the main repository.
1.2.5
1.2.4
- Fixed: Patchwork\Preprocessor\Stream::rmdir passes a wrong parameter to rmdir.
- The stream wrapper now has stream_metadata and stream_truncate methods.
1.2.3
- Method redefinitions that are closures now have $this bound to the method's object.
1.2.2
1.2.1
- No errors are thrown anymore if an opcode cache is enabled.
- An error is now thrown when including Patchwork.php if PHP version is lower than 5.3.0.
1.2.0
- Fixed: Aliased methods imported from a trait misidentify themselves by their original name during call interception.
- Static and instance method redefinitions are now heritable. This means that redefining A::foo now also redefines B::foo, if B extends A and foo is not overridden in B.
1.1.3
- Fixed: Referring to a namespaced function with a leading backslash causes redefinition to silently fail.
1.1.2
1.1.1
1.1.0
- Fixed: Error thrown from call interception code in namespaced anonymous functions.
- Renamed public API functions: patch → replace, unpatch → undo, escape → pass.
- Removed a specialized PHPUnit test case class.
- Added Patchwork\undoAll.
- Added Patchwork\replaceLater.
1.0.0
- Initial public release.