fix the _only_ option in calls to FileHelper::findFiles()

This commit is contained in:
John Was
2014-01-27 21:04:49 +01:00
parent 2be0fd6e13
commit 62a7e397e0
6 changed files with 12 additions and 12 deletions

View File

@ -42,10 +42,10 @@ class ClassmapController extends Controller
}
return null;
},
'only' => ['.php'],
'only' => ['*.php'],
'except' => [
'Yii.php',
'BaseYii.php',
'/Yii.php',
'/BaseYii.php',
'/console/',
],
];

View File

@ -71,10 +71,10 @@ class PhpDocController extends Controller
}
return null;
},
'only' => ['.php'],
'only' => ['*.php'],
'except' => array_merge($except, [
'BaseYii.php',
'Yii.php',
'/BaseYii.php',
'/Yii.php',
'/views/',
'/requirements/',
'/gii/generators/',

View File

@ -137,7 +137,7 @@ class RenderController extends Controller
}
return null;
},
'only' => ['.php'],
'only' => ['*.php'],
'except' => $except,
];
return FileHelper::findFiles($path, $options);
@ -147,7 +147,7 @@ class RenderController extends Controller
{
$path = FileHelper::normalizePath($path);
$options = [
'only' => ['.md'],
'only' => ['*.md'],
'except' => $except,
];
return FileHelper::findFiles($path, $options);

View File

@ -204,7 +204,7 @@ class FixtureController extends \yii\console\controllers\FixtureController
$fixturePath = Yii::getAlias($this->fixturePath);
if ($this->needToGenerateAll($file[0])) {
$files = FileHelper::findFiles($templatePath, ['only' => ['.php']]);
$files = FileHelper::findFiles($templatePath, ['only' => ['*.php']]);
} else {
$filesToSearch = [];
foreach ($file as $fileName) {

View File

@ -314,7 +314,7 @@ class FixtureController extends Controller
{
$fixturesPath = Yii::getAlias($this->fixturePath);
$filesToSearch = ['.php'];
$filesToSearch = ['*.php'];
if (!$this->needToApplyAll($fixtures[0])) {
$filesToSearch = [];
foreach ($fixtures as $fileName) {

View File

@ -30,7 +30,7 @@ return [
// and the '.svn' will match all files and directories named exactly '.svn'.
// Note, the '/' characters in a pattern matches both '/' and '\'.
// See helpers/FileHelper::findFiles() description for more details on pattern matching rules.
'only' => ['.php'],
'only' => ['*.php'],
// array, list of patterns that specify which files (not directories) should be processed.
// If empty or not set, all files will be processed.
// Please refer to "except" for details about the patterns.