-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Breaking included AWS Phar #21
Comments
Can you please point to the specific version of the aws.phar file, how it is used/included and mention the exact PHP version (and OS distribution) you're using? Thx |
Hi. |
Current workaroundinstead of require('/path/to/aws.phar'); please use (for the time being) require('phar:///path/to/aws.phar/aws-autoloader.php'); This is what the stub of ExplanationThe stub of libraries like
The stub of the
|
In PR #22 I've added test cases first in order to reproduce the behavior. Next step would be a fix... |
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. Fixes: #21
I needed only |
@ohader this solution does not work with "geoip2.phar"? |
i have workaround for "GeoIP2.phar" |
* 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
* 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
* 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
* 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
Hi. Joomla 3.9.4 updated/included this package.
Currently I'm using aws.phar to use for S3, but since last update, I'm getting this error:
This error is related to this package, not in Joomla or my own code. Maybe a bug?
The text was updated successfully, but these errors were encountered: