1
0
Fork 0

bumped finder version, reverted warning suppression

pull/2052/head
Robert Schönthal 2013-07-05 12:27:48 +02:00
parent 1a4a104df0
commit 963f189fb2
2 changed files with 3 additions and 7 deletions

View File

@ -26,7 +26,7 @@
"justinrainbow/json-schema": "1.1.*",
"seld/jsonlint": "1.*",
"symfony/console": "~2.3@dev",
"symfony/finder": "~2.1",
"symfony/finder": "~2.2",
"symfony/process": "~2.1@dev"
},
"require-dev": {

View File

@ -54,7 +54,7 @@ class ClassMapGenerator
if (is_file($path)) {
$path = array(new \SplFileInfo($path));
} elseif (is_dir($path)) {
$path = Finder::create()->useBestAdapter()->files()->followLinks()->name('/.*[php|inc]/')->in($path);
$path = Finder::create()->useBestAdapter()->files()->followLinks()->name('/\.(php|inc)$/')->in($path);
} else {
throw new \RuntimeException(
'Could not scan for classes inside "'.$path.
@ -98,11 +98,7 @@ class ClassMapGenerator
$traits = version_compare(PHP_VERSION, '5.4', '<') ? '' : '|trait';
try {
if (!is_readable($path)) {
throw new \RuntimeException('file not found');
}
//suppress warnings on unclosed comments
$contents = @php_strip_whitespace($path);
$contents = php_strip_whitespace($path);
} catch (\Exception $e) {
throw new \RuntimeException('Could not scan for classes inside '.$path.": \n".$e->getMessage(), 0, $e);
}