[PECL-CVS] [pecl-file_formats-yaml] php7: Ignore null array offset warnings in explicit null tests

[email protected] (Bryan Davis)
Newsgroups php.pecl.cvs
Message-ID <[email protected]>
Author: Bryan Davis (bd808)
Date: 2025-11-11T18:10:34-07:00

Commit: https://github.com/php/pecl-file_formats-yaml/commit/c1c7bc72c6fc32b11764fa550066423360173905
Raw diff: https://github.com/php/pecl-file_formats-yaml/commit/c1c7bc72c6fc32b11764fa550066423360173905.diff

Ignore null array offset warnings in explicit null tests

Ignore warnings while running tests involving explicit null handling.
This avoids false test failures triggered by PHP 8.5 deprecation
warnings.

Bug: #97

Changed paths:
  M  tests/bug_64019.phpt
  M  tests/yaml_parse_spec_null.phpt


Diff:

diff --git a/tests/bug_64019.phpt b/tests/bug_64019.phpt
index 7d1dd40..ba33d49 100644
--- a/tests/bug_64019.phpt
+++ b/tests/bug_64019.phpt
@@ -2,6 +2,9 @@
 Test PECL bug #64019
 --SKIPIF--
 <?php if(!extension_loaded('yaml')) die('skip yaml n/a'); ?>
+--INI--
+; Ignore Deprecated: Using null as an array offset is deprecated...
+error_reporting = E_ALL & ~E_DEPRECATED
 --FILE--
 <?php
 $yaml_code = <<<YAML
diff --git a/tests/yaml_parse_spec_null.phpt b/tests/yaml_parse_spec_null.phpt
index 3e6aa59..8522b30 100644
--- a/tests/yaml_parse_spec_null.phpt
+++ b/tests/yaml_parse_spec_null.phpt
@@ -2,6 +2,9 @@
 Yaml 1.1 Spec - null
 --SKIPIF--
 <?php if(!extension_loaded('yaml')) die('skip yaml n/a'); ?>
+--INI--
+; Ignore Deprecated: Using null as an array offset is deprecated...
+error_reporting = E_ALL & ~E_DEPRECATED
 --FILE--
 <?php
   var_dump(yaml_parse('
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.