Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.8.0-b1
    • Component/s: None
    • Labels:
      None

      Description

      The PHPIDS library was deprecated several years ago and is no longer updated, so it is not compatible with PHP 8.

      When generating a report, it always returns an empty result:.

      IDS_Report Object ( [events:protected] => Array ( ) [tags:protected] => Array ( ) [impact:protected] => 0 [centrifuge:protected] => Array ( ) )
      

      There are a few approaches we can adopt for this plugin:

      • Fork the PHPIDS repository and update it to be compatible with PHP 8.1
      • Replace the PHPIDS library with a drop-in replacement, such as "Expose", however this one has not been updated for quite a while as well.
      • Re-write the plugin using a more up-to-date library, such as "Defence".
      • Deprecate the plugin and remove it in a future version.

      Error:

      preg_replace(): Passing null to parameter #2 ($replacement) of type array|string is deprecated
      

      Affected Files:

      • /plugins/phpids/lib/IDS/Converter.php (Line 334)

      Possible solution:
      Replace null by an empty string on the second parameter of preg_replace().


      Error:

      During inheritance return type should be compatible
      

      Affected Files:

      • /plugins/phpids/lib/IDS/Report.php (Line 214)
      • /plugins/phpids/lib/IDS/Event.php (Line 211)

      Possible solution:
      Add the "#[\ReturnTypeWillChange]" attribute to all the methods of the affected classes.

        Activity

        abdy Abdy Franco created issue -
        abdy Abdy Franco made changes -
        Field Original Value New Value
        Fix Version/s 5.7.0-b1 [ 11737 ]
        abdy Abdy Franco made changes -
        Description The PHPIDS library was deprecated several years ago and is no longer updated, so it is not compatible with PHP 8.

        When generating a report, it always returns an empty result:.
        {code:java}
        IDS_Report Object ( [events:protected] => Array ( ) [tags:protected] => Array ( ) [impact:protected] => 0 [centrifuge:protected] => Array ( ) )
        {code}

        There are a few approaches we can adopt for this plugin:
        * Fork the PHPIDS repository and update it to be compatible with PHP 8.1
        * Replace the PHPIDS library with a drop-in replacement, such as "Expose", however this one has not been updated for quite a while as well.
        * Re-write the plugin using a more up-to-date library, such as "Defence".
        * Deprecate the plugin and remove it in a future version.

        ----

        *Error:*
        {noformat}
        preg_replace(): Passing null to parameter #2 ($replacement) of type array|string is deprecated
        {noformat}

        *Affected Files:*
         - /plugins/phpids/lib/IDS/Converter.php _(Line 334)_

        *Possible solution:*
        Replace null by _an empty string_ on the second parameter of preg_replace().
        The PHPIDS library was deprecated several years ago and is no longer updated, so it is not compatible with PHP 8.

        When generating a report, it always returns an empty result:.
        {code:java}
        IDS_Report Object ( [events:protected] => Array ( ) [tags:protected] => Array ( ) [impact:protected] => 0 [centrifuge:protected] => Array ( ) )
        {code}

        There are a few approaches we can adopt for this plugin:
        * Fork the PHPIDS repository and update it to be compatible with PHP 8.1
        * Replace the PHPIDS library with a drop-in replacement, such as "Expose", however this one has not been updated for quite a while as well.
        * Re-write the plugin using a more up-to-date library, such as "Defence".
        * Deprecate the plugin and remove it in a future version.

        ----

        *Error:*
        {noformat}
        preg_replace(): Passing null to parameter #2 ($replacement) of type array|string is deprecated
        {noformat}

        *Affected Files:*
         - /plugins/phpids/lib/IDS/Converter.php _(Line 334)_

        *Possible solution:*
        Replace null by _an empty string_ on the second parameter of preg_replace().

        ----

        *Error:*
        {noformat}
        During inheritance return type should be compatible
        {noformat}

        *Affected Files:*
         - /plugins/phpids/lib/IDS/Report.php _(Line 214)_
         - /plugins/phpids/lib/IDS/Event.php _(Line 211)_

        *Possible solution:*
        Add the "{{#[\ReturnTypeWillChange]}}" attribute to all the methods of the affected classes.
        admin Paul Phillips made changes -
        Fix Version/s 5.7.0 [ 11800 ]
        Fix Version/s 5.7.0-b1 [ 11737 ]
        admin Paul Phillips made changes -
        Fix Version/s 5.8.0-b1 [ 11742 ]
        Fix Version/s 5.7.0 [ 11800 ]
        jonathan Jonathan Reissmueller made changes -
        Assignee Jonathan Reissmueller [ jonathan ]
        jonathan Jonathan Reissmueller made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        jonathan Jonathan Reissmueller made changes -
        Status In Progress [ 3 ] In Review [ 5 ]
        Resolution Fixed [ 1 ]
        abdy Abdy Franco made changes -
        Remaining Estimate 0 minutes [ 0 ]
        Time Spent 15 minutes [ 900 ]
        Worklog Id 16450 [ 16450 ]
        abdy Abdy Franco made changes -
        Status In Review [ 5 ] Closed [ 6 ]
        abdy Abdy Franco made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        jonathan Jonathan Reissmueller made changes -
        Status Reopened [ 4 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            jonathan Jonathan Reissmueller
            Reporter:
            abdy Abdy Franco
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              4/Aug/23

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 15 minutes
              15m

                Agile