Your message dated Wed, 25 Feb 2026 08:18:43 +0000
with message-id <[email protected]>
and subject line Bug#1128313: fixed in php-console-commandline 1.2.6-2
has caused the Debian Bug report #1128313,
regarding php-console-commandline: Failing autopkgtests with PHP 8.5
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1128313: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1128313
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: php-console-commandline
Version: 1.2.6-1
Severity: normal
X-Debbugs-Cc: [email protected]

Dear Maintainer,

php-console-commandline v1.2.6-1 autopkgtests fail when running with PHP
8.5. The diff for the failing tests don't say much:

FAIL [12/53] Test for Console_CommandLine::addOption() method (errors 
5).[/tmp/autopkgtest.bpChUz/build.19f/real-tree/tests/console_commandline_addoption_errors_5.phpt]
========DIFF========
002+ Stack trace:
003+ #0 /usr/share/php/Console/CommandLine.php(855): trigger_error()
004+ #1 /usr/share/php/Console/CommandLine/Option.php(308): 
Console_CommandLine::triggerError()
005+ #2 /usr/share/php/Console/CommandLine.php(646): 
Console_CommandLine_Option->validate()
006+ #3 
/tmp/autopkgtest.bpChUz/build.19f/real-tree/tests/console_commandline_addoption_errors_5.php(6):
 Console_CommandLine->addOption()
007+ #4 {main}
========DONE========

trigger_error is using E_USER_ERROR, which is deprecated, and that seems
to be the cause of the failures.

I have applied the following patch in Ubuntu, which resolves the
situation by throwing actual exceptions:

--- a/Console/CommandLine.php
+++ b/Console/CommandLine.php
@@ -826,8 +826,7 @@
     {
         if (!isset(self::$actions[$name])) {
             if (!class_exists($class)) {
-                self::triggerError('action_class_does_not_exists',
-                    E_USER_ERROR,
+                self::throwException('action_class_does_not_exists',
                     array('{$name}' => $name, '{$class}' => $class));
             }
             self::$actions[$name] = array($class, false);
@@ -835,27 +834,24 @@
     }
 
     // }}}
-    // triggerError() {{{
+    // throwException() {{{
 
     /**
-     * A wrapper for programming errors triggering.
+     * A wrapper for programming Exception throwing.
      *
      * @param string $msgId  Identifier of the message
-     * @param int    $level  The php error level
      * @param array  $params An array of search=>replaces entries
      *
      * @return void
-     * @todo remove Console::triggerError() and use exceptions only
      */
-    public static function triggerError($msgId, $level, $params=array())
+    public static function throwException($msgId, $params=array())
     {
+        $msg = 'unknown error';
         if (isset(self::$errors[$msgId])) {
             $msg = str_replace(array_keys($params),
                 array_values($params), self::$errors[$msgId]);
-            trigger_error($msg, $level);
-        } else {
-            trigger_error('unknown error', $level);
         }
+        throw new \Exception($msg);
     }
 
     // }}}
--- a/tests/console_commandline_addargument.phpt
+++ b/tests/console_commandline_addargument.phpt
@@ -112,4 +112,4 @@
   }
 }
 
-Fatal error: argument name must be a valid php variable name (got: Some 
invalid name) in %sCommandLine.php on line %d
+Fatal error: Uncaught Exception: argument name must be a valid php variable 
name (got: Some invalid name) in %sCommandLine.php on line %d
--- a/tests/console_commandline_addargument_2.phpt
+++ b/tests/console_commandline_addargument_2.phpt
@@ -25,4 +25,4 @@
 ?>
 --EXPECTF--
 foo bar
-Fatal error: only optional arguments can have a default value in 
%sCommandLine.php on line %d
+Fatal error: Uncaught Exception: only optional arguments can have a default 
value in %sCommandLine.php on line %d
--- a/tests/console_commandline_addoption_errors_1.phpt
+++ b/tests/console_commandline_addoption_errors_1.phpt
@@ -11,4 +11,4 @@
 ?>
 --EXPECTF--
 
-Fatal error: option name must be a valid php variable name (got: Some invalid 
name) in %sCommandLine.php on line %d
+Fatal error: Uncaught Exception: option name must be a valid php variable name 
(got: Some invalid name) in %sCommandLine.php on line %d
--- a/tests/console_commandline_addoption_errors_2.phpt
+++ b/tests/console_commandline_addoption_errors_2.phpt
@@ -11,4 +11,4 @@
 ?>
 --EXPECTF--
 
-Fatal error: you must provide at least an option short name or long name for 
option "name" in %sCommandLine.php on line %d
+Fatal error: Uncaught Exception: you must provide at least an option short 
name or long name for option "name" in %sCommandLine.php on line %d
--- a/tests/console_commandline_addoption_errors_3.phpt
+++ b/tests/console_commandline_addoption_errors_3.phpt
@@ -11,4 +11,4 @@
 ?>
 --EXPECTF--
 
-Fatal error: option "name" short name must be a dash followed by a letter 
(got: "d") in %sCommandLine.php on line %d
+Fatal error: Uncaught Exception: option "name" short name must be a dash 
followed by a letter (got: "d") in %sCommandLine.php on line %d
--- a/tests/console_commandline_addoption_errors_4.phpt
+++ b/tests/console_commandline_addoption_errors_4.phpt
@@ -11,4 +11,4 @@
 ?>
 --EXPECTF--
 
-Fatal error: option "name" long name must be 2 dashes followed by a word (got: 
"d") in %sCommandLine.php on line %d
+Fatal error: Uncaught Exception: option "name" long name must be 2 dashes 
followed by a word (got: "d") in %sCommandLine.php on line %d
--- a/tests/console_commandline_addoption_errors_5.phpt
+++ b/tests/console_commandline_addoption_errors_5.phpt
@@ -11,4 +11,4 @@
 ?>
 --EXPECTF--
 
-Fatal error: invalid action for option "name". in %sCommandLine.php on line %d
+Fatal error: Uncaught Exception: invalid action for option "name". in 
%sCommandLine.php on line %d
--- a/tests/console_commandline_addoption_errors_6.phpt
+++ b/tests/console_commandline_addoption_errors_6.phpt
@@ -11,4 +11,4 @@
 ?>
 --EXPECTF--
 
-Fatal error: unregistered action "Inexistant" for option "name". in 
%sCommandLine.php on line %d
+Fatal error: Uncaught Exception: unregistered action "Inexistant" for option 
"name". in %sCommandLine.php on line %d
--- a/tests/console_commandline_addoption_errors_7.phpt
+++ b/tests/console_commandline_addoption_errors_7.phpt
@@ -11,4 +11,4 @@
 ?>
 --EXPECTF--
 
-Fatal error: you must provide a valid callback for option "name" in 
%sCommandLine.php on line %d
+Fatal error: Uncaught Exception: you must provide a valid callback for option 
"name" in %sCommandLine.php on line %d
--- a/tests/console_commandline_fromxmlfile_error.phpt
+++ b/tests/console_commandline_fromxmlfile_error.phpt
@@ -16,4 +16,4 @@
 ?>
 --EXPECTF--
 
-Fatal error: XML definition file "%sunexisting.xml" does not exists or is not 
readable in %sCommandLine.php on line %d
+Fatal error: Uncaught Exception: XML definition file "%sunexisting.xml" does 
not exists or is not readable in %sCommandLine.php on line %d
--- a/Console/CommandLine/Argument.php
+++ b/Console/CommandLine/Argument.php
@@ -83,16 +83,14 @@
         // check if the argument name is valid
         if (!preg_match('/^[a-zA-Z_\x7f-\xff]+[a-zA-Z0-9_\x7f-\xff]*$/',
             $this->name)) {
-            Console_CommandLine::triggerError(
+            Console_CommandLine::throwException(
                 'argument_bad_name',
-                E_USER_ERROR,
                 array('{$name}' => $this->name)
             );
         }
         if (!$this->optional && $this->default !== null) {
-            Console_CommandLine::triggerError(
-                'argument_no_default',
-                E_USER_ERROR
+            Console_CommandLine::throwException(
+                'argument_no_default'
             );
         }
         parent::validate();
--- a/Console/CommandLine/XmlParser.php
+++ b/Console/CommandLine/XmlParser.php
@@ -54,8 +54,8 @@
     public static function parse($xmlfile)
     {
         if (!is_readable($xmlfile)) {
-            Console_CommandLine::triggerError('invalid_xml_file',
-                E_USER_ERROR, array('{$file}' => $xmlfile));
+            Console_CommandLine::throwException('invalid_xml_file',
+                array('{$file}' => $xmlfile));
         }
         $doc = new DomDocument();
         $doc->load($xmlfile);
@@ -117,9 +117,9 @@
                 return $doc->relaxNGValidate($path);
             }
         }
-        Console_CommandLine::triggerError(
+        Console_CommandLine::throwException(
             'invalid_xml_file',
-            E_USER_ERROR, array('{$file}' => $rngfile));
+            array('{$file}' => $rngfile));
     }
 
     // }}}
--- a/Console/CommandLine/Option.php
+++ b/Console/CommandLine/Option.php
@@ -275,21 +275,21 @@
         // check if the option name is valid
         if (!preg_match('/^[a-zA-Z_\x7f-\xff]+[a-zA-Z0-9_\x7f-\xff]*$/',
             $this->name)) {
-            Console_CommandLine::triggerError('option_bad_name',
-                E_USER_ERROR, array('{$name}' => $this->name));
+            Console_CommandLine::throwException('option_bad_name',
+                array('{$name}' => $this->name));
         }
         // call the parent validate method
         parent::validate();
         // a short_name or a long_name must be provided
         if ($this->short_name == null && $this->long_name == null) {
-            
Console_CommandLine::triggerError('option_long_and_short_name_missing',
-                E_USER_ERROR, array('{$name}' => $this->name));
+            
Console_CommandLine::throwException('option_long_and_short_name_missing',
+                array('{$name}' => $this->name));
         }
         // check if the option short_name is valid
         if ($this->short_name != null && 
             !(preg_match('/^\-[a-zA-Z]{1}$/', $this->short_name))) {
-            Console_CommandLine::triggerError('option_bad_short_name',
-                E_USER_ERROR, array(
+            Console_CommandLine::throwException('option_bad_short_name',
+                array(
                     '{$name}' => $this->name, 
                     '{$short_name}' => $this->short_name
                 ));
@@ -297,28 +297,28 @@
         // check if the option long_name is valid
         if ($this->long_name != null && 
             !preg_match('/^\-\-[a-zA-Z]+[a-zA-Z0-9_\-]*$/', $this->long_name)) 
{
-            Console_CommandLine::triggerError('option_bad_long_name',
-                E_USER_ERROR, array(
+            Console_CommandLine::throwException('option_bad_long_name',
+                array(
                     '{$name}' => $this->name, 
                     '{$long_name}' => $this->long_name
                 ));
         }
         // check if we have a valid action
         if (!is_string($this->action)) {
-            Console_CommandLine::triggerError('option_bad_action',
-                E_USER_ERROR, array('{$name}' => $this->name));
+            Console_CommandLine::throwException('option_bad_action',
+                array('{$name}' => $this->name));
         }
         if (!isset(Console_CommandLine::$actions[$this->action])) {
-            Console_CommandLine::triggerError('option_unregistered_action',
-                E_USER_ERROR, array(
+            Console_CommandLine::throwException('option_unregistered_action',
+                array(
                     '{$action}' => $this->action,
                     '{$name}' => $this->name
                 ));
         }
         // if the action is a callback, check that we have a valid callback
         if ($this->action == 'Callback' && !is_callable($this->callback)) {
-            Console_CommandLine::triggerError('option_invalid_callback',
-                E_USER_ERROR, array('{$name}' => $this->name));
+            Console_CommandLine::throwException('option_invalid_callback',
+                array('{$name}' => $this->name));
         }
     }


I'm not sure this is actually the best way to deal with this, but the project
seems to be unmaintained upstream:
https://github.com/pear/Console_CommandLine/ was archived.


-- System Information:
Debian Release: trixie/sid
  APT prefers noble-updates
  APT policy: (500, 'noble-updates'), (500, 'noble-security'), (500, 'noble'), 
(100, 'noble-backports')
Architecture: amd64 (x86_64)

Kernel: Linux 6.17.0-14-generic (SMP w/22 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

--- End Message ---
--- Begin Message ---
Source: php-console-commandline
Source-Version: 1.2.6-2
Done: Guilhem Moulin <[email protected]>

We believe that the bug you reported is fixed in the latest version of
php-console-commandline, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Guilhem Moulin <[email protected]> (supplier of updated 
php-console-commandline package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Wed, 25 Feb 2026 08:47:23 +0100
Source: php-console-commandline
Architecture: source
Version: 1.2.6-2
Distribution: unstable
Urgency: medium
Maintainer: Debian PHP PEAR Maintainers <[email protected]>
Changed-By: Guilhem Moulin <[email protected]>
Closes: 1128313
Changes:
 php-console-commandline (1.2.6-2) unstable; urgency=medium
 .
   [ Renan Rodrigo ]
   * Fix FTBFS with PHP8.5. (Closes: #1128313)
 .
   [ Guilhem Moulin ]
   * d/control: Remove `Rules-Requires-Root: no`.
   * Update Standards-Version to 4.7.3.
     + Remove "Priority: optional" which is the current default and spelling it
       out is no longer recommended per Policy.
   * d/watch: Port to Version 5.
Checksums-Sha1:
 48f590e7440fa2a150ff371788f008f585f66f5d 2263 
php-console-commandline_1.2.6-2.dsc
 be1eef03ccc54e957353c937fda058b76f157d72 7224 
php-console-commandline_1.2.6-2.debian.tar.xz
 245cc1110e614b01b01d2ccf083bedaf2bd01a20 5859 
php-console-commandline_1.2.6-2_source.buildinfo
Checksums-Sha256:
 0bf8ad2874717335e3d8c251589a4ec09e9749d4c32157bbe4d5d37f8d342a14 2263 
php-console-commandline_1.2.6-2.dsc
 8a0ad4ccd22611e7b4ab0b87e5c53a544e844556de7ceb231ec929daa07de19f 7224 
php-console-commandline_1.2.6-2.debian.tar.xz
 6b46aacdfca2bbcf9a880fd5c1502ed31f71f744de52d827b4186c28b83d48d8 5859 
php-console-commandline_1.2.6-2_source.buildinfo
Files:
 b44b3f8a098397200ce9cb38c0babae9 2263 php optional 
php-console-commandline_1.2.6-2.dsc
 1a11389566e6d3cb7b5de0db81de974f 7224 php optional 
php-console-commandline_1.2.6-2.debian.tar.xz
 f9c715487ec00ccc4ee6096c78c0c27b 5859 php optional 
php-console-commandline_1.2.6-2_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEERpy6p3b9sfzUdbME05pJnDwhpVIFAmmerJ0ACgkQ05pJnDwh
pVId6g//S+NhZeu4m5mHyQRjcd5qcSK/EWgWQLscCTeXGRoKa+Lg1zxUJQwAWA2+
EflczSP+tjQRh11w5MwTc0ouZrcOT0IOURXRaiX7SvIBdOwYABr3tV1qyqyRMleI
/7P/ezQnHxYVI0FGRSDs10J3ONIFMcYWAR9fR8YEhfUXX6JiITaQH2wxlLRCPs/w
u+hO0Q4wL6AuonZnHEDSmZspLPga4WCcScDyGORmC11DSaNjEiYpr1/mzBFCypUK
EKBZmjLCVMQbGI5IxWzgCmalJjsbFP/KvHY/wiiE5g8shtuCLXJ6Tc3Eigxhbg1t
ouWWIm5kSIqNRRzZ9EaQgI9uRxsubXaSSr0FMxcT0i+HbpCSUM9c/gjJOj6H4ldY
6SvYqNTT5bVx4GCTD5eaPqUFsnxIf5t40cx68UKrVJEn9j+Ab1zEVUhCVZhkjaGP
MPJ1aU/1Kd0s/zoG+/++cFYmqgc5ZH3XCtFv8kzH89xhwLhrBAFHnopbpUvlf9UF
rGsNHmT9ZJ8MCgdzD5ZJ0F6byJsiBS11p8vifFQjLvpB/nj+Hxv3UFsbWK5Jwvgn
XJQC3eKK8w4NQoB5kVJoGcVPqmdQLiWuAjxZOee/ZW40fy0zLdLVnbFDyB52ZJ7m
KxHin6YvNaTPPnEY4L1OfQJ1t1U7Oq+bspQqHGX0STq7tXijHrU=
=H3W8
-----END PGP SIGNATURE-----

Attachment: pgpBvHkKpis5Y.pgp
Description: PGP signature


--- End Message ---

Reply via email to