1
1
<?php
2
2
/**
3
- * Copyright © Magento, Inc. All rights reserved.
4
- * See COPYING.txt for license details .
3
+ * Copyright 2024 Adobe
4
+ * All Rights Reserved .
5
5
*/
6
6
declare (strict_types=1 );
7
7
@@ -245,14 +245,6 @@ public function testCheckPhpSettings(): void
245
245
50
246
246
);
247
247
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
- );
256
248
$ expected = [
257
249
'responseType ' => ResponseTypeInterface::RESPONSE_TYPE_SUCCESS ,
258
250
'data ' => [
@@ -267,14 +259,6 @@ public function testCheckPhpSettings(): void
267
259
]
268
260
]
269
261
];
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
- }
278
262
$ this ->assertEquals ($ expected , $ this ->phpReadinessCheck ->checkPhpSettings ());
279
263
}
280
264
@@ -293,14 +277,6 @@ public function testCheckPhpSettingsFailed(): void
293
277
200
294
278
);
295
279
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
- );
304
280
$ expected = [
305
281
'responseType ' => ResponseTypeInterface::RESPONSE_TYPE_ERROR ,
306
282
'data ' => [
@@ -315,14 +291,6 @@ public function testCheckPhpSettingsFailed(): void
315
291
]
316
292
]
317
293
];
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
- }
326
294
$ this ->assertEquals ($ expected , $ this ->phpReadinessCheck ->checkPhpSettings ());
327
295
}
328
296
@@ -333,28 +301,10 @@ public function testCheckPhpSettingsNoXDebug(): void
333
301
{
334
302
$ this ->phpInfo ->expects ($ this ->once ())->method ('getCurrent ' )->willReturn ([]);
335
303
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
- );
344
304
$ expected = [
345
305
'responseType ' => ResponseTypeInterface::RESPONSE_TYPE_SUCCESS ,
346
306
'data ' => []
347
307
];
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
- }
358
308
359
309
$ expected ['data ' ]['missed_function_imagecreatefromjpeg ' ] = [
360
310
'message ' => 'You must have installed GD library with --with-jpeg-dir=DIR option. ' ,
@@ -453,14 +403,6 @@ public function testCheckPhpExtensionsFailed(): void
453
403
];
454
404
$ this ->assertEquals ($ expected , $ this ->phpReadinessCheck ->checkPhpExtensions ());
455
405
}
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
- }
464
406
}
465
407
466
408
namespace Magento \Setup \Model ;
@@ -473,8 +415,6 @@ function ini_get($param)
473
415
{
474
416
if ($ param === 'xdebug.max_nesting_level ' ) {
475
417
return 100 ;
476
- } elseif ($ param === 'always_populate_raw_post_data ' ) {
477
- return -1 ;
478
418
} elseif ($ param === 'memory_limit ' ) {
479
419
return '512M ' ;
480
420
}
0 commit comments