Unit/System Tests PHP 8.x bug PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar heelc29
heelc29
1 Oct 2025

Summary of Changes

The “Make reflection setAccessible() no-op” RFC in PHP 8.1 made the Reflection*::setAccessible() methods a noop. However it did not deprecate the methods to simplify cross-version compatibility.

https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_reflectionsetaccessible

Testing Instructions

Run a scheduled task

  • enable max error reporting
  • use php 8.5 (latest pre-version 8.5.0rc1)
    Run unit tests

Actual result BEFORE applying this Pull Request

Task status: Terminated
deprecation message (possibly further)
image

Expected result AFTER applying this Pull Request

Task status: Completed
no deprecation message about setAccessible() (from files of joomla-cms repository)

Link to documentations

  • No documentation changes for docs.joomla.org needed
  • No documentation changes for manual.joomla.org needed
avatar heelc29 heelc29 - open - 1 Oct 2025
avatar heelc29 heelc29 - change - 1 Oct 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 1 Oct 2025
Category Administration Unit Tests
avatar muhme muhme - change - 16 Oct 2025
Labels Added: Unit/System Tests PHP 8.x bug PR-5.4-dev
avatar muhme
muhme - comment - 16 Oct 2025

✅ Tested with JBT php8.5-rc

  • Before patch: Unit tests show 97 setAccessible deprecations and scheduled task failed with JSON.parse: unexpected character
  • PR with Patchtester applied (to be able to run unit tests again)
    • ⚠️ Unit tests setAccessible deprecations are reduced to 40 with the following two unique places
      Deprecated: Method ReflectionMethod::setAccessible() is deprecated since 8.5, as it has no effect in /var/www/html/libraries/vendor/joomla/test/src/TestHelper.php on line 77
      Deprecated: Method ReflectionProperty::setAccessible() is deprecated since 8.5, as it has no effect in /var/www/html/libraries/vendor/joomla/test/src/TestHelper.php on line 40
      
    • Scheduled tasks are running without error
  • Switched to php8.1 and tested scheduled tasks are running without error
avatar muhme muhme - change - 16 Oct 2025
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2025-10-16 16:36:05
Closed_By muhme
avatar muhme muhme - close - 16 Oct 2025
avatar muhme muhme - merge - 16 Oct 2025
avatar muhme
muhme - comment - 16 Oct 2025

Thank you @heelc29 for your contribution. If it has not yet been fixed, could you please check the two remaining places? Thank you @HLeithner for review.

avatar heelc29
heelc29 - comment - 16 Oct 2025

could you please check the two remaining places?

@muhme There is already a PR for this at the test framework package joomla-framework/test#19

Add a Comment

Login with GitHub to post a comment