@@ -245,14 +245,6 @@ public function testCheckPhpSettings(): void
245245 50
246246 );
247247
248- $ rawPostMessage = sprintf (
249- 'Your PHP Version is %s, but always_populate_raw_post_data = -1.
250- $HTTP_RAW_POST_DATA is deprecated from PHP 5.6 onwards and will be removed in PHP 7.0.
251- This will stop the installer from running.
252- Please open your php.ini file and set always_populate_raw_post_data to -1.
253- If you need more help please call your hosting provider. ' ,
254- PHP_VERSION
255- );
256248 $ expected = [
257249 'responseType ' => ResponseTypeInterface::RESPONSE_TYPE_SUCCESS ,
258250 'data ' => [
@@ -267,14 +259,6 @@ public function testCheckPhpSettings(): void
267259 ]
268260 ]
269261 ];
270- if (!$ this ->isPhp7OrHhvm ()) {
271- $ this ->setUpNoPrettyVersionParser ();
272- $ expected ['data ' ]['always_populate_raw_post_data ' ] = [
273- 'message ' => $ rawPostMessage ,
274- 'helpUrl ' => 'http://php.net/manual/en/ini.core.php#ini.always-populate-settings-data ' ,
275- 'error ' => false
276- ];
277- }
278262 $ this ->assertEquals ($ expected , $ this ->phpReadinessCheck ->checkPhpSettings ());
279263 }
280264
@@ -293,14 +277,6 @@ public function testCheckPhpSettingsFailed(): void
293277 200
294278 );
295279
296- $ rawPostMessage = sprintf (
297- 'Your PHP Version is %s, but always_populate_raw_post_data = -1.
298- $HTTP_RAW_POST_DATA is deprecated from PHP 5.6 onwards and will be removed in PHP 7.0.
299- This will stop the installer from running.
300- Please open your php.ini file and set always_populate_raw_post_data to -1.
301- If you need more help please call your hosting provider. ' ,
302- PHP_VERSION
303- );
304280 $ expected = [
305281 'responseType ' => ResponseTypeInterface::RESPONSE_TYPE_ERROR ,
306282 'data ' => [
@@ -315,14 +291,6 @@ public function testCheckPhpSettingsFailed(): void
315291 ]
316292 ]
317293 ];
318- if (!$ this ->isPhp7OrHhvm ()) {
319- $ this ->setUpNoPrettyVersionParser ();
320- $ expected ['data ' ]['always_populate_raw_post_data ' ] = [
321- 'message ' => $ rawPostMessage ,
322- 'helpUrl ' => 'http://php.net/manual/en/ini.core.php#ini.always-populate-settings-data ' ,
323- 'error ' => false
324- ];
325- }
326294 $ this ->assertEquals ($ expected , $ this ->phpReadinessCheck ->checkPhpSettings ());
327295 }
328296
@@ -333,28 +301,10 @@ public function testCheckPhpSettingsNoXDebug(): void
333301 {
334302 $ this ->phpInfo ->expects ($ this ->once ())->method ('getCurrent ' )->willReturn ([]);
335303
336- $ rawPostMessage = sprintf (
337- 'Your PHP Version is %s, but always_populate_raw_post_data = -1.
338- $HTTP_RAW_POST_DATA is deprecated from PHP 5.6 onwards and will be removed in PHP 7.0.
339- This will stop the installer from running.
340- Please open your php.ini file and set always_populate_raw_post_data to -1.
341- If you need more help please call your hosting provider. ' ,
342- PHP_VERSION
343- );
344304 $ expected = [
345305 'responseType ' => ResponseTypeInterface::RESPONSE_TYPE_SUCCESS ,
346306 'data ' => []
347307 ];
348- if (!$ this ->isPhp7OrHhvm ()) {
349- $ this ->setUpNoPrettyVersionParser ();
350- $ expected ['data ' ] = [
351- 'always_populate_raw_post_data ' => [
352- 'message ' => $ rawPostMessage ,
353- 'helpUrl ' => 'http://php.net/manual/en/ini.core.php#ini.always-populate-settings-data ' ,
354- 'error ' => false
355- ]
356- ];
357- }
358308
359309 $ expected ['data ' ]['missed_function_imagecreatefromjpeg ' ] = [
360310 'message ' => 'You must have installed GD library with --with-jpeg-dir=DIR option. ' ,
@@ -453,14 +403,6 @@ public function testCheckPhpExtensionsFailed(): void
453403 ];
454404 $ this ->assertEquals ($ expected , $ this ->phpReadinessCheck ->checkPhpExtensions ());
455405 }
456-
457- /**
458- * @return bool
459- */
460- protected function isPhp7OrHhvm (): bool
461- {
462- return version_compare (PHP_VERSION , '7.0.0-beta ' ) >= 0 || defined ('HHVM_VERSION ' );
463- }
464406}
465407
466408namespace Magento \Setup \Model ;
@@ -473,8 +415,6 @@ function ini_get($param)
473415{
474416 if ($ param === 'xdebug.max_nesting_level ' ) {
475417 return 100 ;
476- } elseif ($ param === 'always_populate_raw_post_data ' ) {
477- return -1 ;
478418 } elseif ($ param === 'memory_limit ' ) {
479419 return '512M ' ;
480420 }
0 commit comments