PR-4.4-dev Pending

User tests: Successful: Unsuccessful:

avatar SniperSister
SniperSister
3 Feb 2025

Summary of Changes

Backport of the 5.x fix to the 4.x branch, see #44789

The creation of the namespace map file fails on PHP 8.4 as the content is implicitly provided to File::write as reference, causing this message:

Joomla\Filesystem \File: write: Argument #2 ($buffer) could not be passed by reference

Testing Instructions

  • Enable PHP 8.4
  • Remove the namespace map file autoload_psr4.php in the cache folder
  • Refresh the backend

Actual result BEFORE applying this Pull Request

  • Error message shown

Expected result AFTER applying this Pull Request

  • File created

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar SniperSister SniperSister - open - 3 Feb 2025
avatar SniperSister SniperSister - change - 3 Feb 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 3 Feb 2025
Category Libraries
avatar richard67
richard67 - comment - 3 Feb 2025

@wilsonge Sure we need this for 4.4? It is in security only support mode, and with PHP 8.4 we have other deprecations in 4.4 which we don't fix (and which should not be a problem when people set error reporting to none or default. For me it's ok to use this PR, but as you were the one who initiated it I thought I better ask if you were aware of the security only support.

avatar wilsonge
wilsonge - comment - 3 Feb 2025

I'm aware of security only support but David said this physically stopped the file from being generated rather than being a deprecation warning. And we have historically fixed things that are outright broken in PHP upgrades (as long as deprecated messages are hidden)

avatar SniperSister
SniperSister - comment - 3 Feb 2025

David said this physically stopped the file from being generated

Indeed! The map is not generated, the instance if left broken and unusable.

avatar laoneo laoneo - change - 3 Feb 2025
Labels Added: PR-4.4-dev
avatar richard67
richard67 - comment - 3 Feb 2025

By review I can successfully test this PR, it is the same as the one which I had tested for 5.2-dev with a real test.

Not sure though if I could manage to get a 4.4-dev running with PHP 8.4 as that has other issues, too.

Does it need a real test here?

avatar laoneo
laoneo - comment - 3 Feb 2025

In DPDocker I'v applied the same fix during the 4.4 installation to actually make 4.4 work. So pr is valid and therefor I'm going to merge it as it absolutely makes sense to have 4.4 in PHP 8.4 running for systems which can't upgrade for various reasons.

avatar laoneo laoneo - change - 3 Feb 2025
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2025-02-03 15:20:32
Closed_By laoneo
avatar laoneo laoneo - close - 3 Feb 2025
avatar laoneo laoneo - merge - 3 Feb 2025

Add a Comment

Login with GitHub to post a comment