--TEST-- Bug #81211 (Symlinks are followed when creating PHAR archive) --EXTENSIONS-- phar --SKIPIF-- --FILE-- buildFromDirectory(__DIR__ . '/bug81211/foo'); } catch (UnexpectedValueException $ex) { echo $ex->getMessage(), PHP_EOL; } try { $archive->buildFromIterator(new RecursiveDirectoryIterator(__DIR__ . '/bug81211/foo', FilesystemIterator::SKIP_DOTS), __DIR__ . '/bug81211/foo'); } catch (UnexpectedValueException $ex) { echo $ex->getMessage(), PHP_EOL; } ?> --CLEAN-- --EXPECTF-- Iterator RecursiveIteratorIterator returned a path "%s%ebug81211%efoobar%efile" that is not in the base directory "%s%ebug81211%efoo" Iterator RecursiveDirectoryIterator returned a path "%s%ebug81211%efoobar%efile" that is not in the base directory "%s%ebug81211%efoo"