-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX] Enhance alias resolving and reduce file system invocation
* Consider direct alias invocation without being registered Invoking an aliased phar like `phar:///path/to/phar.phar/autoload.php` would allow to extract and register a potential alias name of the base name at `/path/to/phar.phar`. Using alias names directly inside phar archive does provide any possibility to map its full path to an alias (e.g. directly invoking `phar//alias.phar/autoload.php` would fail). This change aims to resolve the original base name by walking the current stack trace backwards. In terms of performance this is not ideal, but it's the only chance to retrieve the required information. That's also why the next section addresses performance. * Enhance performance by reducing file system invocation Interceptors have to resolve the base file name from some given Phar invocation request. Internally the given path is traversed until a valid file is found in the file system and considered as the base name of the Phar archive. This change reduces superfluous calls to `is_file` when splitting the path in order to resolve the actual base name. Resolves: #21 Resolves: #23
- Loading branch information
Showing
9 changed files
with
161 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters