Commit 03a88e4f by Qiang Xue

Adjusted composer for faker extension.

parent 389ef891
...@@ -44,26 +44,18 @@ class PhpDocController extends Controller ...@@ -44,26 +44,18 @@ class PhpDocController extends Controller
$except = []; $except = [];
if ($root === null) { if ($root === null) {
$root = dirname(dirname(YII_PATH)); $root = dirname(dirname(YII_PATH));
$extension = "$root/extensions/yii"; $extensionPath = "$root/extensions/yii";
Yii::setAlias('@yii/authclient', "$extension/authclient"); foreach (scandir($extensionPath) as $extension) {
Yii::setAlias('@yii/bootstrap', "$extension/bootstrap"); if (ctype_alpha($extension) && is_dir($extensionPath . '/' . $extension)) {
Yii::setAlias('@yii/debug', "$extension/debug"); Yii::setAlias("@yii/$extension", "$extensionPath/$extension");
Yii::setAlias('@yii/elasticsearch', "$extension/elasticsearch"); }
Yii::setAlias('@yii/gii', "$extension/gii"); }
Yii::setAlias('@yii/jui', "$extension/jui");
Yii::setAlias('@yii/mongodb', "$extension/mongodb");
Yii::setAlias('@yii/redis', "$extension/redis");
Yii::setAlias('@yii/smarty', "$extension/smarty");
Yii::setAlias('@yii/sphinx', "$extension/sphinx");
Yii::setAlias('@yii/swiftmailer', "$extension/swiftmailer");
$except = [ $except = [
'/apps/', '/apps/',
'/build/', '/build/',
'/docs/', '/docs/',
'/extensions/yii/codeception/',
'/extensions/yii/composer/', '/extensions/yii/composer/',
'/extensions/yii/twig/',
'/tests/', '/tests/',
'/vendor/', '/vendor/',
]; ];
......
...@@ -86,6 +86,7 @@ ...@@ -86,6 +86,7 @@
"ext-mongo": "required by yii2-mongo extension", "ext-mongo": "required by yii2-mongo extension",
"ext-pdo": "required by yii2-sphinx extension", "ext-pdo": "required by yii2-sphinx extension",
"ext-pdo_mysql": "required by yii2-sphinx extension", "ext-pdo_mysql": "required by yii2-sphinx extension",
"fzaninotto/faker": "required by yii2-faker extension",
"imagine/imagine": "required by yii2-imagine extension", "imagine/imagine": "required by yii2-imagine extension",
"smarty/smarty": "required by yii2-smarty extension", "smarty/smarty": "required by yii2-smarty extension",
"swiftmailer/swiftmailer": "required by yii2-swiftmailer extension", "swiftmailer/swiftmailer": "required by yii2-swiftmailer extension",
......
...@@ -10,4 +10,3 @@ To add a new extension named `xyz` (must be in lower case), take the following s ...@@ -10,4 +10,3 @@ To add a new extension named `xyz` (must be in lower case), take the following s
* `LICENSE.md` * `LICENSE.md`
3. ask Qiang to create a subsplit for `xyz` and a composer package named `yii2-xyz`; 3. ask Qiang to create a subsplit for `xyz` and a composer package named `yii2-xyz`;
4. modify `/composer.json` and add `xyz` to the `replace` section; 4. modify `/composer.json` and add `xyz` to the `replace` section;
5. modify `/build/controllers/PhpDocController.php` about the method `actionProperty()`.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment