Skip to content

Commit 5ca032d

Browse files
author
Ivan Gavryshko
committed
MAGETWO-33027: [GITHUB] Installation Incomplete with XDebug enabled #904
- fixed issue - implemented unified output format for failed setting check
1 parent 8a5f359 commit 5ca032d

File tree

2 files changed

+26
-30
lines changed

2 files changed

+26
-30
lines changed

setup/src/Magento/Setup/Controller/Environment.php

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,19 @@ private function checkRawPost()
191191
$error = true;
192192
}
193193

194+
$message = sprintf(
195+
'Your PHP Version is %s, but always_populate_raw_post_data = %d.
196+
$HTTP_RAW_POST_DATA is deprecated from PHP 5.6 onwards and will stop the installer from running.
197+
Please open your php.ini file and set always_populate_raw_post_data to -1.
198+
If you need more help please call your hosting provider.
199+
',
200+
PHP_VERSION,
201+
ini_get('always_populate_raw_post_data')
202+
);
203+
194204
$data['rawpost'] = [
195-
'version' => PHP_VERSION,
196-
'ini' => ini_get('always_populate_raw_post_data'),
205+
'message' => $message,
206+
'helpUrl' => 'http://php.net/manual/en/ini.core.php#ini.always-populate-settings-data',
197207
'error' => $error
198208
];
199209

@@ -216,12 +226,18 @@ private function checkXDebugNestedLevel()
216226
$minimumRequiredXDebugNestedLevel = $this->phpInformation->getRequiredMinimumXDebugNestedLevel();
217227

218228
if ($minimumRequiredXDebugNestedLevel > $currentXDebugNestingLevel) {
219-
$error = true;
229+
$error = false;
220230
}
221231

232+
$message = sprintf(
233+
'Magento2 requires xdebug.max_nesting_level to be set %d or more,
234+
but it set xdebug.max_nesting_level=%d.',
235+
$minimumRequiredXDebugNestedLevel,
236+
$currentXDebugNestingLevel
237+
);
238+
222239
$data['xdebug_max_nesting_level'] = [
223-
'currentLevel' => $currentXDebugNestingLevel,
224-
'requiredLevel' => $minimumRequiredXDebugNestedLevel,
240+
'message' => $message,
225241
'error' => $error
226242
];
227243
}

setup/view/magento/setup/readiness-check/progress.phtml

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -112,37 +112,17 @@
112112
<span class="readiness-check-icon icon-failed-round"></span>
113113
<h3 class="readiness-check-title">PHP Settings Check</h3>
114114

115-
<div ng-show="settings.data.rawpost.error">
116-
<div class="rediness-check-side">
115+
<div ng-repeat="setting in settings.data">
116+
<div ng-show="setting.error && setting.helpUrl" class="rediness-check-side">
117117
<p class="side-title">Need Help?</p>
118-
<a href="http://php.net/manual/en/ini.core.php#ini.always-populate-settings-data" target="_blank">PHP Documentation</a>
119-
</div>
120-
<div class="readiness-check-content">
121-
122-
<p>
123-
Your PHP Version is {{settings.data.rawpost.version}}, but always_populate_raw_post_data = {{settings.data.rawpost.ini}}.
124-
<a href="#php-settings" ng-click="updateOnExpand(settings)">
125-
<span ng-hide="settings.expanded">Show detail</span>
126-
<span ng-show="settings.expanded">Hide detail</span>
127-
</a>
128-
</p>
129-
<p ng-show="settings.expanded">
130-
$HTTP_RAW_POST_DATA is deprecated from PHP 5.6 onwards and will stop the installer from running.
131-
Please open your php.ini file and set always_populate_raw_post_data to -1.
132-
</p>
133-
<p ng-show="settings.expanded">If you need more help please call your hosting provider.</p>
118+
<a href="{{setting.helpUrl}}" target="_blank">PHP Documentation</a>
134119
</div>
135-
</div>
136-
137-
<div ng-show="settings.data.xdebug_max_nesting_level.error">
138-
<div class="readiness-check-content">
120+
<div ng-show="setting.error" class="readiness-check-content">
139121
<p>
140-
Magento2 requires xdebug.max_nesting_level to be set {{settings.data.xdebug_max_nesting_level.requiredLevel}} or more,
141-
but it set xdebug.max_nesting_level={{settings.data.xdebug_max_nesting_level.currentLevel}}.
122+
{{setting.message}}
142123
</p>
143124
</div>
144125
</div>
145-
146126
</div>
147127

148128
</div>

0 commit comments

Comments
 (0)