Fix php proxies to resolve __FILE__ and __DIR__ using realpath on PHP <8, fixes #10261
parent
3bb78fd1ee
commit
28c34128ee
|
@ -291,6 +291,7 @@ if (PHP_VERSION_ID < 80000) {
|
|||
{
|
||||
// get rid of composer-bin-proxy:// prefix for __FILE__ & __DIR__ resolution
|
||||
\$opened_path = substr(\$path, 21);
|
||||
\$opened_path = realpath(\$opened_path) ?: \$opened_path;
|
||||
\$this->handle = fopen(\$opened_path, \$mode);
|
||||
\$this->position = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue