Closed
Description
Symfony version(s) affected: 4.0.11 (might as well be earlier versions)
Description
In Finder 4.0.8 the commit symfony/finder@45429ad was released which should remove duplicate slashes from path names.
However, this results in an error when used to find files in an FTP root dir.
The documentation (https://symfony.com/doc/current/components/finder.html:) by the way explicitly states that the slash is required in this case:
// always add a trailing slash when looking for in the FTP root dir
$finder->in('ftp://example.com/');
How to reproduce
$finder = new Finder();
$files = $finder->files()->in('ftp://speedtest.tele2.net/');
foreach ($files as $file) {
var_dump($file);
}
Possible Solution
One might parse the given $dir
string and trwat it differently if ti starts with "ftp://"