mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 14:26:54 +08:00
fix the _only_ option in calls to FileHelper::findFiles()
This commit is contained in:
@ -42,10 +42,10 @@ class ClassmapController extends Controller
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
'only' => ['.php'],
|
'only' => ['*.php'],
|
||||||
'except' => [
|
'except' => [
|
||||||
'Yii.php',
|
'/Yii.php',
|
||||||
'BaseYii.php',
|
'/BaseYii.php',
|
||||||
'/console/',
|
'/console/',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
@ -71,10 +71,10 @@ class PhpDocController extends Controller
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
'only' => ['.php'],
|
'only' => ['*.php'],
|
||||||
'except' => array_merge($except, [
|
'except' => array_merge($except, [
|
||||||
'BaseYii.php',
|
'/BaseYii.php',
|
||||||
'Yii.php',
|
'/Yii.php',
|
||||||
'/views/',
|
'/views/',
|
||||||
'/requirements/',
|
'/requirements/',
|
||||||
'/gii/generators/',
|
'/gii/generators/',
|
||||||
|
@ -137,7 +137,7 @@ class RenderController extends Controller
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
'only' => ['.php'],
|
'only' => ['*.php'],
|
||||||
'except' => $except,
|
'except' => $except,
|
||||||
];
|
];
|
||||||
return FileHelper::findFiles($path, $options);
|
return FileHelper::findFiles($path, $options);
|
||||||
@ -147,7 +147,7 @@ class RenderController extends Controller
|
|||||||
{
|
{
|
||||||
$path = FileHelper::normalizePath($path);
|
$path = FileHelper::normalizePath($path);
|
||||||
$options = [
|
$options = [
|
||||||
'only' => ['.md'],
|
'only' => ['*.md'],
|
||||||
'except' => $except,
|
'except' => $except,
|
||||||
];
|
];
|
||||||
return FileHelper::findFiles($path, $options);
|
return FileHelper::findFiles($path, $options);
|
||||||
@ -160,4 +160,4 @@ class RenderController extends Controller
|
|||||||
{
|
{
|
||||||
return array_merge(parent::globalOptions(), ['template', 'guide']);
|
return array_merge(parent::globalOptions(), ['template', 'guide']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -204,7 +204,7 @@ class FixtureController extends \yii\console\controllers\FixtureController
|
|||||||
$fixturePath = Yii::getAlias($this->fixturePath);
|
$fixturePath = Yii::getAlias($this->fixturePath);
|
||||||
|
|
||||||
if ($this->needToGenerateAll($file[0])) {
|
if ($this->needToGenerateAll($file[0])) {
|
||||||
$files = FileHelper::findFiles($templatePath, ['only' => ['.php']]);
|
$files = FileHelper::findFiles($templatePath, ['only' => ['*.php']]);
|
||||||
} else {
|
} else {
|
||||||
$filesToSearch = [];
|
$filesToSearch = [];
|
||||||
foreach ($file as $fileName) {
|
foreach ($file as $fileName) {
|
||||||
|
@ -314,7 +314,7 @@ class FixtureController extends Controller
|
|||||||
{
|
{
|
||||||
$fixturesPath = Yii::getAlias($this->fixturePath);
|
$fixturesPath = Yii::getAlias($this->fixturePath);
|
||||||
|
|
||||||
$filesToSearch = ['.php'];
|
$filesToSearch = ['*.php'];
|
||||||
if (!$this->needToApplyAll($fixtures[0])) {
|
if (!$this->needToApplyAll($fixtures[0])) {
|
||||||
$filesToSearch = [];
|
$filesToSearch = [];
|
||||||
foreach ($fixtures as $fileName) {
|
foreach ($fixtures as $fileName) {
|
||||||
|
@ -30,7 +30,7 @@ return [
|
|||||||
// and the '.svn' will match all files and directories named exactly '.svn'.
|
// and the '.svn' will match all files and directories named exactly '.svn'.
|
||||||
// Note, the '/' characters in a pattern matches both '/' and '\'.
|
// Note, the '/' characters in a pattern matches both '/' and '\'.
|
||||||
// See helpers/FileHelper::findFiles() description for more details on pattern matching rules.
|
// 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.
|
// array, list of patterns that specify which files (not directories) should be processed.
|
||||||
// If empty or not set, all files will be processed.
|
// If empty or not set, all files will be processed.
|
||||||
// Please refer to "except" for details about the patterns.
|
// Please refer to "except" for details about the patterns.
|
||||||
|
Reference in New Issue
Block a user