File tree 7 files changed +39
-13
lines changed
dev/tests/integration/testsuite/Magento/Developer/Model/Logger/Handler 7 files changed +39
-13
lines changed Original file line number Diff line number Diff line change 142
142
<type name =" Magento\Config\Model\Config\Structure\ConcealInProductionConfigList" >
143
143
<arguments >
144
144
<argument name =" configs" xsi : type =" array" >
145
- <item name =" dev" xsi : type =" const" >Magento\Config\Model\Config\Structure\ElementVisibilityInterface::HIDDEN</item >
145
+ <item name =" dev/restrict" xsi : type =" const" >Magento\Config\Model\Config\Structure\ElementVisibilityInterface::HIDDEN</item >
146
+ <item name =" dev/front_end_development_workflow" xsi : type =" const" >Magento\Config\Model\Config\Structure\ElementVisibilityInterface::HIDDEN</item >
147
+ <item name =" dev/template" xsi : type =" const" >Magento\Config\Model\Config\Structure\ElementVisibilityInterface::HIDDEN</item >
148
+ <item name =" dev/translate_inline" xsi : type =" const" >Magento\Config\Model\Config\Structure\ElementVisibilityInterface::HIDDEN</item >
149
+ <item name =" dev/js" xsi : type =" const" >Magento\Config\Model\Config\Structure\ElementVisibilityInterface::HIDDEN</item >
150
+ <item name =" dev/css" xsi : type =" const" >Magento\Config\Model\Config\Structure\ElementVisibilityInterface::HIDDEN</item >
151
+ <item name =" dev/image" xsi : type =" const" >Magento\Config\Model\Config\Structure\ElementVisibilityInterface::HIDDEN</item >
152
+ <item name =" dev/static" xsi : type =" const" >Magento\Config\Model\Config\Structure\ElementVisibilityInterface::HIDDEN</item >
153
+ <item name =" dev/grid" xsi : type =" const" >Magento\Config\Model\Config\Structure\ElementVisibilityInterface::HIDDEN</item >
154
+ <item name =" dev/debug/template_hints_storefront" xsi : type =" const" >Magento\Config\Model\Config\Structure\ElementVisibilityInterface::HIDDEN</item >
155
+ <item name =" dev/debug/template_hints_admin" xsi : type =" const" >Magento\Config\Model\Config\Structure\ElementVisibilityInterface::HIDDEN</item >
156
+ <item name =" dev/debug/template_hints_blocks" xsi : type =" const" >Magento\Config\Model\Config\Structure\ElementVisibilityInterface::HIDDEN</item >
146
157
<item name =" general/locale/code" xsi : type =" const" >Magento\Config\Model\Config\Structure\ElementVisibilityInterface::DISABLED</item >
147
158
</argument >
148
159
</arguments >
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ class ConfigProvider
16
16
* [
17
17
* 'developer' => [
18
18
* 'production' => [
19
- * {{setting_path}} => {{setting_value}}
19
+ * {{setting_path}} => ['value' => {{setting_value}}, 'lock' => {{lock_value}}]
20
20
* ]
21
21
* ]
22
22
* ]
@@ -41,7 +41,7 @@ public function __construct(array $config = [])
41
41
* need to turn off 'dev/debug/debug_logging' setting in this case method
42
42
* will return array
43
43
* [
44
- * {{setting_path}} => {{setting_value}}
44
+ * {{setting_path}} => ['value' => {{setting_value}}, 'lock' => {{lock_value}}]
45
45
* ]
46
46
*
47
47
* @param string $currentMode
Original file line number Diff line number Diff line change @@ -205,17 +205,17 @@ protected function setStoreMode($mode)
205
205
private function saveAppConfigs ($ mode )
206
206
{
207
207
$ configs = $ this ->configProvider ->getConfigs ($ this ->getMode (), $ mode );
208
- foreach ($ configs as $ path => $ value ) {
209
- $ this ->emulatedAreaProcessor ->process (function () use ($ path , $ value ) {
208
+ foreach ($ configs as $ path => $ item ) {
209
+ $ this ->emulatedAreaProcessor ->process (function () use ($ path , $ item ) {
210
210
$ this ->processorFacadeFactory ->create ()->process (
211
211
$ path ,
212
- $ value ,
212
+ $ item [ ' value ' ] ,
213
213
ScopeConfigInterface::SCOPE_TYPE_DEFAULT ,
214
214
null ,
215
- true
215
+ $ item [ ' lock ' ]
216
216
);
217
217
});
218
- $ this ->output ->writeln ('Config " ' . $ path . ' = ' . $ value . '" has been saved. ' );
218
+ $ this ->output ->writeln ('Config " ' . $ path . ' = ' . $ item [ ' value ' ] . '" has been saved. ' );
219
219
}
220
220
}
221
221
Original file line number Diff line number Diff line change @@ -226,7 +226,7 @@ public function testEnableProductionModeMinimal()
226
226
->method ('getConfigs ' )
227
227
->with ('developer ' , 'production ' )
228
228
->willReturn ([
229
- 'dev/debug/debug_logging ' => 0
229
+ 'dev/debug/debug_logging ' => [ ' value ' => 0 , ' lock ' => false ]
230
230
]);
231
231
$ this ->emulatedAreaProcessor ->expects ($ this ->once ())
232
232
->method ('process ' )
@@ -245,7 +245,7 @@ public function testEnableProductionModeMinimal()
245
245
0 ,
246
246
ScopeConfigInterface::SCOPE_TYPE_DEFAULT ,
247
247
null ,
248
- true
248
+ false
249
249
);
250
250
$ this ->outputMock ->expects ($ this ->once ())
251
251
->method ('writeln ' )
Original file line number Diff line number Diff line change 75
75
<argument name =" config" xsi : type =" array" >
76
76
<item name =" developer" xsi : type =" array" >
77
77
<item name =" production" xsi : type =" array" >
78
- <item name =" dev/debug/debug_logging" xsi : type =" string" >0</item >
78
+ <item name =" dev/debug/debug_logging" xsi : type =" array" >
79
+ <item name =" value" xsi : type =" string" >0</item >
80
+ <item name =" lock" xsi : type =" boolean" >false</item >
81
+ </item >
82
+ </item >
83
+ <item name =" developer" xsi : type =" array" >
84
+ <item name =" dev/debug/debug_logging" xsi : type =" array" >
85
+ <item name =" value" xsi : type =" string" >1</item >
86
+ <item name =" lock" xsi : type =" boolean" >false</item >
87
+ </item >
88
+ </item >
89
+ </item >
90
+ <item name =" production" xsi : type =" array" >
91
+ <item name =" developer" xsi : type =" array" >
92
+ <item name =" dev/debug/debug_logging" xsi : type =" array" >
93
+ <item name =" value" xsi : type =" string" >1</item >
94
+ <item name =" lock" xsi : type =" boolean" >false</item >
95
+ </item >
79
96
</item >
80
97
</item >
81
98
</argument >
Original file line number Diff line number Diff line change 28
28
<group id =" debug" translate =" label" type =" text" sortOrder =" 30" showInDefault =" 1" showInWebsite =" 1" showInStore =" 1" >
29
29
<field id =" debug_logging" translate =" label comment" type =" select" sortOrder =" 30" showInDefault =" 1" showInWebsite =" 0" showInStore =" 0" >
30
30
<label >Log to File</label >
31
- <comment >Not available in production mode.</comment >
32
31
<source_model >Magento\Config\Model\Config\Source\Yesno</source_model >
33
32
</field >
34
33
</group >
Original file line number Diff line number Diff line change @@ -95,7 +95,6 @@ public function setUp()
95
95
96
96
// Preconditions
97
97
$ this ->mode ->enableDeveloperMode ();
98
- $ this ->enableDebugging ();
99
98
if (file_exists ($ this ->getDebuggerLogPath ())) {
100
99
unlink ($ this ->getDebuggerLogPath ());
101
100
}
You can’t perform that action at this time.
0 commit comments