Open murrant opened 1 month ago
virtual_file_ex
doesn't know about custom streams or phar, so it doesn't think the phar://
path is absolute. When it calls tsrm_realpath_r
it will eventually perform a stat to /absolute/path/to/phar/phar:///absolute/path/to/phar/test.phar/test.php
which obviously fails.
We would need to strip the phar://
prefix or teach that callchain about the phar uri scheme...
EDIT: changing this at the VCWD or virtual_file
level seems like a bad idea given the other callers of e.g. VCWD_REALPATH
...
Not sure what the best solution would be here other than special-casing the userland realpath function.
Description
I'm trying to include packages in my phar but many of them use realpath to files inside the Phar which spits out false instead of a path; breaking things. If the behavior was to return the same path when the path starts with phar:// it would just work.
The following code:
make_phar.php
test.php
php test.php && php make_phar.php && php test.phar
Resulted in this output:
But I expected this output instead:
PHP Version
PHP 8.3.7
Operating System
No response