i have created a cli app which tries to create a file with symfony 3 fileSystem component. All works fine, but if i put the app in a phar archive symfony can\'t write the file.<
Phar's have a different path structure, and that symfony method does dirname($filename);
https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Filesystem/Filesystem.php#L679
Try defining the full path.
$path = '.';
if (!empty($pharPath = \Phar::running(false))) {
$path = dirname($pharPath);
}
$this->fileSystem->dumpFile(
$path.'/testfile.txt',
'my test content'
);