Skip to content

PHP 8.2 deprecation for \TinCan\Statement::__construct #114

Description

@bob-hinrichs

Deprecated function: Use of "parent" in callables is deprecated in TinCan\Statement->__construct() (line 44 of /code/vendor/opigno/tincan/src/Statement.php).

Current:
public function __construct() {
call_user_func_array('parent::__construct', func_get_args());

Should be:
parent::__construct(...func_get_args());

For your patch file:

diff --git a/vendor/opigno/tincan/src/Statement.php b/vendor/opigno/tincan/src/Statement.php
--- a/vendor/opigno/tincan/src/Statement.php
+++ b/vendor/opigno/tincan/src/Statement.php	(date 1718710606000)
@@ -41,7 +41,7 @@
     protected $attachments;

     public function __construct() {
-        call_user_func_array('parent::__construct', func_get_args());
+        parent::__construct(...func_get_args();

         if (func_num_args() == 1) {
             $arg = func_get_arg(0);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions