File tree Expand file tree Collapse file tree 3 files changed +36
-4
lines changed Expand file tree Collapse file tree 3 files changed +36
-4
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ php composer.phar require --prefer-dist bazilio/yii2-stubs-generator
19
19
or add
20
20
21
21
``` json
22
- "bazilio/yii2-stubs-generator" : " ~0.0.1 "
22
+ "bazilio/yii2-stubs-generator" : " * "
23
23
```
24
24
25
25
to the require section of your composer.json.
@@ -46,4 +46,12 @@ php yii stubs console
46
46
php yii stubs console common frontend
47
47
```
48
48
49
- File with stubs by default located in vendor directory.
49
+ File with stubs by default located in vendor directory.
50
+
51
+ Usage with PhpStorm
52
+ -------------------
53
+ yii stubs common console frontend
54
+
55
+ 1 . Install ` File Watchers ` JetBrains plugin
56
+ 2 . Open ` File Watchers ` plugin config and import [ watcher.xml] ( watcher.xml )
57
+ 3 . Edit imported watcher for your needs
Original file line number Diff line number Diff line change 7
7
8
8
class StubsController extends Controller
9
9
{
10
- public $ outputFile = ' yii2stubs.php ' ;
10
+ public $ outputFile = null ;
11
11
12
12
protected function getTemplate ()
13
13
{
@@ -48,7 +48,7 @@ class ConsoleApplication extends yii\console\Application
48
48
49
49
public function actionIndex ($ app )
50
50
{
51
- $ path = \Yii::$ app ->getVendorPath () . DIRECTORY_SEPARATOR . 'Yii.php ' ;
51
+ $ path = $ this -> outputFile ? $ this -> outputFile : \Yii::$ app ->getVendorPath () . DIRECTORY_SEPARATOR . 'Yii.php ' ;
52
52
53
53
$ components = [];
54
54
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <TaskOptions >
3
+ <TaskOptions >
4
+ <option name =" arguments" value =" stubs console common frontend" />
5
+ <option name =" checkSyntaxErrors" value =" true" />
6
+ <option name =" description" value =" " />
7
+ <option name =" exitCodeBehavior" value =" ERROR" />
8
+ <option name =" fileExtension" value =" php" />
9
+ <option name =" immediateSync" value =" true" />
10
+ <option name =" name" value =" Generate Yii2 stubs" />
11
+ <option name =" output" value =" $Projectpath$/vendor/Yii.php" />
12
+ <option name =" outputFilters" >
13
+ <array />
14
+ </option >
15
+ <option name =" outputFromStdout" value =" false" />
16
+ <option name =" passParentEnvs" value =" true" />
17
+ <option name =" program" value =" $Projectpath$/yii" />
18
+ <option name =" scopeName" value =" main.php files" />
19
+ <option name =" trackOnlyRoot" value =" false" />
20
+ <option name =" workingDir" value =" $Projectpath$" />
21
+ <envs />
22
+ </TaskOptions >
23
+ </TaskOptions >
24
+
You can’t perform that action at this time.
0 commit comments