Skip to content

Commit 0ae3838

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: added a comment about a workaround [Finder] no PHP warning on empty directory iteration fixed CS
2 parents be3a827 + b28cd81 commit 0ae3838

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/Symfony/Bridge/Twig/Command/LintCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ private function displayJson(OutputInterface $output, $filesInfo)
207207
}
208208
});
209209

210-
$output->writeln(json_encode($filesInfo, defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES : 0));
210+
$output->writeln(json_encode($filesInfo, defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES : 0));
211211

212212
return min($errors, 1);
213213
}

src/Symfony/Component/Finder/Iterator/RecursiveDirectoryIterator.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@ public function isRewindable()
137137
return $this->rewindable;
138138
}
139139

140+
// workaround for an HHVM bug, should be removed when https://github.com/facebook/hhvm/issues/7281 is fixed
141+
if ('' === $this->getPath()) {
142+
return $this->rewindable = false;
143+
}
144+
140145
if (false !== $stream = @opendir($this->getPath())) {
141146
$infos = stream_get_meta_data($stream);
142147
closedir($stream);

0 commit comments

Comments
 (0)