Phar Alias Handling
Pre-release
Pre-release
Description
Releases v3.1.0 and v.2.1.0 aim to overcome drawbacks in Phar's alias resolving (either by Phar archives using Phar::setAlias() in meta-data or Phar::mapPhar() in stub code).
Merged pull-requests
Migration
In case custom Assertable interceptors have been used, path resolving has to be adjusted in order to make use of alias resolving features.
before - example in v3.0.1
$baseFile = Helper::determineBaseFile($path);
after - example in v3.1.0
$invocation = Manager::instance()->resolve($path);
$baseName = $invocation->getBaseName(); // previously called $baseFile
Open Issues
There have been reports about flaws using stream_select() and according stream_cast() in PharStreamWrapper. Since it was not possible to reproduce the behavior in an isolated scenario and specific platform requiresments were not clear, these aspects have not been covered by these releses - see #8 and #19 for details.
Features
- added low-level
Phar\Readerfor stub & meta-data (incl. alias) and their model representations - added
Resolver\PharInvocationResolverin order to resolve/handle alias names - added
Interceptor\ConjunctionInterceptorfor combining multiple interceptors - added
Interceptor\PharMetaDataInterceptorfor actually testing against insecure deserialization in meta-data of Phar archives