go to bug id or search bugs for
Detecting the PHAR in a file path like 'phar:///home/kelunik/acme-client.phar/vendor/autoload.php' works, but it fails if there's no '.phar' extension. 'phar:///home/kelunik/acme-client/vendor/autoload.php' therefore doesn't work if the PHAR is renamed to 'acme-client'.
Finding the PHAR in such a path isn't possible with quite some I/O. Because of that, I propose to use a non-valid character such as a NUL-byte to separate the PHAR path from the path inside the PHAR.
I think Java uses ! or # or so as a separator.
File functions work regardless of the file name of the PHAR.
File functions are broken if the PHAR doesn't end with '.phar'.
Add a Patch
Add a Pull Request
#76061 and #76128 might be related (not sure).
The documentation states:
| The file name's extension must contain .phar.
So this is not a bug, but rather a feature request, in my opinion.
Related To: Bug #76061