Skip to content

Commit 70f33af

Browse files
Deprecate report_memleaks INI directive
1 parent fb87b14 commit 70f33af

File tree

6 files changed

+18
-2
lines changed

6 files changed

+18
-2
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ PHP NEWS
2929
(timwolla)
3030
. Returning null from __debugInfo() has been deprecated. (DanielEScherzer)
3131
. Support #[\Override] on properties. (Jiří Pudil)
32+
. The report_memleaks INI directive has been deprecated. (alexandre-daubois)
3233

3334
- Curl:
3435
. The curl_close() function has been deprecated. (DanielEScherzer)

UPGRADING

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ PHP 8.5 UPGRADE NOTES
337337
. Returning null from __debugInfo() has been deprecated.
338338
Return an empty array instead.
339339
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_debuginfo_returning_null
340+
. The report_memleaks INI directive has been deprecated.
340341

341342
- Curl:
342343
. The curl_close() function has been deprecated, as CurlHandle objects are

main/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2397,6 +2397,7 @@ zend_result php_module_startup(sapi_module_struct *sf, zend_module_entry *additi
23972397
"Directive '%s' is deprecated",
23982398
{
23992399
"allow_url_include",
2400+
"report_memleaks",
24002401
NULL
24012402
}
24022403
},

php.ini-development

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,11 +537,12 @@ ignore_repeated_errors = Off
537537
; https://php.net/ignore-repeated-source
538538
ignore_repeated_source = Off
539539

540+
; DEPRECATED: This INI setting is deprecated and will be removed in PHP 9.0.
540541
; If this parameter is set to Off, then memory leaks will not be shown (on
541542
; stdout or in the log). This is only effective in a debug compile, and if
542543
; error reporting includes E_WARNING in the allowed list
543544
; https://php.net/report-memleaks
544-
report_memleaks = On
545+
report_memleaks = Off
545546

546547
; This setting is off by default.
547548
;report_zend_debug = 0

php.ini-production

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,11 +539,12 @@ ignore_repeated_errors = Off
539539
; https://php.net/ignore-repeated-source
540540
ignore_repeated_source = Off
541541

542+
; DEPRECATED: This INI setting is deprecated and will be removed in PHP 9.0.
542543
; If this parameter is set to Off, then memory leaks will not be shown (on
543544
; stdout or in the log). This is only effective in a debug compile, and if
544545
; error reporting includes E_WARNING in the allowed list
545546
; https://php.net/report-memleaks
546-
report_memleaks = On
547+
report_memleaks = Off
547548

548549
; This setting is off by default.
549550
;report_zend_debug = 0
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--TEST--
2+
Deprecated INI directive report_memleaks warning
3+
--INI--
4+
report_memleaks=1
5+
--FILE--
6+
<?php
7+
echo "Testing deprecated report_memleaks INI directive.\n";
8+
?>
9+
--EXPECT--
10+
Deprecated: Directive 'report_memleaks' is deprecated in Unknown on line 0
11+
Testing deprecated report_memleaks INI directive.

0 commit comments

Comments
 (0)