Skip to content

[5.4] Pre-Update Check: Show correct php_minimum required version#45911

Merged
muhme merged 3 commits intojoomla:5.4-devfrom
brianteeman:phpmin
Aug 15, 2025
Merged

[5.4] Pre-Update Check: Show correct php_minimum required version#45911
muhme merged 3 commits intojoomla:5.4-devfrom
brianteeman:phpmin

Conversation

@brianteeman
Copy link
Contributor

@brianteeman brianteeman commented Aug 14, 2025

Pull Request for Issue #45907 .

Summary of Changes

To return the value of php_minimum from the updateInformation['object'], you need to access the php_minimum property correctly. Since php_minimum is a protected property of the Update object, you cannot access it directly using $updateInformation['object']->php_minimum. Instead, you need to use the get() method provided by the Update class.

So basically the code was always returning the hard coded php_minimum for the current joomla version and not getting the information for the next version in the xml

Testing Instructions

To see this you need to set the update server url to https://update.joomla.org/core/nightlies/next_major_list.xml

Code reviewers - not my code so please check it carefully

Actual result BEFORE applying this Pull Request

image

Expected result AFTER applying this Pull Request

image

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

To return the value of php_minimum from the updateInformation['object'], you need to access the php_minimum property correctly. Since php_minimum is a protected property of the Update object, you cannot access it directly using $updateInformation['object']->php_minimum. Instead, you need to use the get() method provided by the Update class.

Signed-off-by: BrianTeeman <brian@teeman.net>
@heelc29
Copy link
Contributor

heelc29 commented Aug 14, 2025

Since php_minimum is a protected property of the Update object, you cannot access it directly using $updateInformation['object']->php_minimum.

Related #41118 and #41364

@richard67
Copy link
Member

Code reviewers - not my code so please check it carefully

@brianteeman We would also check it carefully if it WAS your code 😛

@richard67
Copy link
Member

I have tested this item ✅ successfully on a0a067b


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45911.

@richard67
Copy link
Member

I have not tested this item.

Hmm, download failed, but without the patch it worked. Resetting my test result until I have checked if it's related or not.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45911.

@richard67
Copy link
Member

I have tested this item ✅ successfully on 638a858


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45911.

@exlemor
Copy link

exlemor commented Aug 14, 2025

I have tested this item ✅ successfully on 638a858

I have successfully tested this. :) Thanks again @brianteeman!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45911.

@LadySolveig
Copy link
Contributor

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45911.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Aug 14, 2025
@muhme
Copy link
Contributor

muhme commented Aug 15, 2025

Final Test before merge, JBT recrate/php/graft

  • Before this PR with 5.4-dev branch and with PHP 8.3: wrong Requirement PHP Version >= 8.1.0 is shown in Pre-Update check for Joomla 6.0
  • ✅ With this PR and PHP 8.3: correct Requirement PHP Version >= 8.3.0 is shown in Pre-Update check for Joomla 6.0
  • ✅ With this PR and PHP 8.1: Installation Joomla 6.0 with custom URL is not possible, correct warning 'Your PHP version "8.1.33" is lower than "8.3.0"' shown and update is not possible

Notes:

  • If you use developer manual update to Joomla 6.0 with file upload, installation with PHP 8.1 is possible and ends in non-operational administrator and site with red 'Sorry, your PHP version is not supported' without any warning before
  • Already before this PR and with PHP 8.1: Installation Joomla 6.0 with custom URL is not possible, correct warning 'Your PHP version "8.1.33" is lower than "8.3.0"' and update is not possible

@muhme muhme changed the title [5.4] php_minimum [5.4] Pre-Update Check: Show correct php_minimum required version Aug 15, 2025
@muhme muhme merged commit 99ea162 into joomla:5.4-dev Aug 15, 2025
40 checks passed
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Aug 15, 2025
@muhme muhme added this to the Joomla! 5.4.0 milestone Aug 15, 2025
@muhme
Copy link
Contributor

muhme commented Aug 15, 2025

Thank you @brianteeman for your contribution. Thank you @heelc29 for your support. Thank you @exlemor and @richard67 for testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants