Closed
Description
Symfony version(s) affected
6.4.13
Description
The code does not work anymore. This is due to 1866ba2#diff-d08f24bd2c3ea5b2215dc3e17072095e89f6f7b05ce634022e5ced0c8d648ac0L87
How to reproduce
In symfony/symfony, on commit 1866ba2 and its parent e39f6a9, add an index.php
:
#!/usr/bin/env php
<?php
require __DIR__.'/vendor/autoload.php';
use Symfony\Component\Config\FileLocator;
$locator = new FileLocator();
$x = $locator->locate(__DIR__ . '/index.php');
dump($x);
execute it: ✅
now, use box to make a phar box compile
, then execute it ❌:
PHP Fatal error: Uncaught Symfony\Component\Config\Exception\FileLocatorFileNotFoundException: The file "index.php" does not exist (in: "phar:///home/gregoire/dev/github.com/lyrixx/symfony/index.phar"). in phar:///home/gregoire/dev/github.com/lyrixx/symfony/index.phar/src/Symfony/Component/Config/FileLocator.php:71
Stack trace:
#0 phar:///home/gregoire/dev/github.com/lyrixx/symfony/index.phar/index.php(10): Symfony\Component\Config\FileLocator->locate()
#1 /home/gregoire/dev/github.com/lyrixx/symfony/index.phar(14): require('...')
#2 {main}
thrown in phar:///home/gregoire/dev/github.com/lyrixx/symfony/index.phar/src/Symfony/Component/Config/FileLocator.php on line 71
Possible Solution
No response
Additional Context
No response