回答編集履歴

7

cve

2018/03/14 14:22

投稿

earnest_gay
earnest_gay

スコア615

test CHANGED
File without changes

6

cve

2018/03/14 14:22

投稿

earnest_gay
earnest_gay

スコア615

test CHANGED
@@ -87,3 +87,43 @@
87
87
  fuel/packages/material/classes/generate.php
88
88
 
89
89
  fuel/packages/material/classes/generate/scaffold.php
90
+
91
+
92
+
93
+ ```
94
+
95
+ MG-MacBook-Pro:model_fuelphp_test_migration MacPRO-N-GOTO$ php oil g scaffold monkey name:string description:text -f --with-presenter --gdc
96
+
97
+ string(125) "/Applications/MAMP/htdocs/Dev/personal/web/model_fuelphp_test_migration/fuel/packages/material/views/scaffolding/template.php"
98
+
99
+ Creating migration: /Applications/MAMP/htdocs/Dev/personal/web/model_fuelphp_test_migration/fuel/app/migrations/001_create_monkeys.php
100
+
101
+ Creating model: /Applications/MAMP/htdocs/Dev/personal/web/model_fuelphp_test_migration/fuel/app/modules/provide/classes/model/app/monkey.php
102
+
103
+ Creating controller: /Applications/MAMP/htdocs/Dev/personal/web/model_fuelphp_test_migration/fuel/app/modules/web/classes/controller/monkey.php
104
+
105
+ Creating view: /Applications/MAMP/htdocs/Dev/personal/web/model_fuelphp_test_migration/fuel/app/modules/web/views/monkey/index.php
106
+
107
+ Creating view: /Applications/MAMP/htdocs/Dev/personal/web/model_fuelphp_test_migration/fuel/app/modules/web/views/monkey/view.php
108
+
109
+ Creating view: /Applications/MAMP/htdocs/Dev/personal/web/model_fuelphp_test_migration/fuel/app/modules/web/views/monkey/create.php
110
+
111
+ Creating view: /Applications/MAMP/htdocs/Dev/personal/web/model_fuelphp_test_migration/fuel/app/modules/web/views/monkey/edit.php
112
+
113
+ Creating view: /Applications/MAMP/htdocs/Dev/personal/web/model_fuelphp_test_migration/fuel/app/modules/web/views/monkey/_form.php
114
+
115
+ MG-MacBook-Pro:model_fuelphp_test_migration MacPRO-N-GOTO$ php oil r migrate
116
+
117
+ Performed migrations for app:default:
118
+
119
+ 001_create_monkeys
120
+
121
+ MG-MacBook-Pro:model_fuelphp_test_migration MacPRO-N-GOTO$ php oil r migrate:down
122
+
123
+ Reverted migrations for app:default:
124
+
125
+ - 001_create_monkeys
126
+
127
+ MG-MacBook-Pro:model_fuelphp_test_migration MacPRO-N-GOTO$
128
+
129
+ ```

5

cw

2018/03/14 14:22

投稿

earnest_gay
earnest_gay

スコア615

test CHANGED
@@ -38,7 +38,7 @@
38
38
 
39
39
  // Generation Directory Change(gdc or GDC)
40
40
 
41
- $target_commands = [
41
+ $original_commands = [
42
42
 
43
43
  '--gdc',
44
44
 
@@ -48,7 +48,7 @@
48
48
 
49
49
  $is_proprietary_processing = false;
50
50
 
51
- foreach ($target_commands as $target_command) {
51
+ foreach ($original_commands as $original_command) {
52
52
 
53
53
  if($is_proprietary_processing) {
54
54
 
@@ -58,7 +58,7 @@
58
58
 
59
59
  // 独自コマンドがあるかチェック。
60
60
 
61
- $is_proprietary_processing = in_array($target_command, $_SERVER['argv']);
61
+ $is_proprietary_processing = in_array($original_command, $_SERVER['argv']);
62
62
 
63
63
  }
64
64
 

4

cw

2018/03/14 13:51

投稿

earnest_gay
earnest_gay

スコア615

test CHANGED
@@ -46,11 +46,11 @@
46
46
 
47
47
  ];
48
48
 
49
- $target_result = false;
49
+ $is_proprietary_processing = false;
50
50
 
51
51
  foreach ($target_commands as $target_command) {
52
52
 
53
- if ($target_result) {
53
+ if($is_proprietary_processing) {
54
54
 
55
55
  break;
56
56
 
@@ -58,13 +58,13 @@
58
58
 
59
59
  // 独自コマンドがあるかチェック。
60
60
 
61
- $target_result = in_array($target_command, $_SERVER['argv']);
61
+ $is_proprietary_processing = in_array($target_command, $_SERVER['argv']);
62
62
 
63
63
  }
64
64
 
65
65
 
66
66
 
67
- if ($target_result) {
67
+ if ($is_proprietary_processing) {
68
68
 
69
69
  \Material\Command::init($_SERVER['argv']);
70
70
 
@@ -75,8 +75,6 @@
75
75
  \Oil\Command::init($_SERVER['argv']);
76
76
 
77
77
  }
78
-
79
-
80
78
 
81
79
  ```
82
80
 

3

ss

2018/03/14 13:49

投稿

earnest_gay
earnest_gay

スコア615

test CHANGED
File without changes

2

ss

2018/03/14 13:47

投稿

earnest_gay
earnest_gay

スコア615

test CHANGED
@@ -50,7 +50,7 @@
50
50
 
51
51
  foreach ($target_commands as $target_command) {
52
52
 
53
- if($target_result) {
53
+ if ($target_result) {
54
54
 
55
55
  break;
56
56
 

1

d3えd

2018/03/14 13:47

投稿

earnest_gay
earnest_gay

スコア615

test CHANGED
@@ -1,3 +1,7 @@
1
+ ファイル生成場所がコマンドによる指定に対応していない為、独自がoilを拡張。
2
+
3
+
4
+
1
5
  fuel/packages/oilを拡張して解決。
2
6
 
3
7
  fuel/packages/oil自体を拡張してgit管理しても新規端末からのgit clone時のcomposer updateによってfuel/packages/oilが上書きされてしまうため意味がない。