View Issue Details

IDProjectCategoryView StatusLast Update
0036540mantisbtbugtrackerpublic2025-11-15 10:21
Reporterdregad Assigned Todregad  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Target Version2.27.2Fixed in Version2.27.2 
Summary0036540: Introduce a maximum PHP version
Description

Currently, we only define a minimum PHP version (PHP_MIN_VERSION constant) and enforce it in core.php so MantisBT does not run if the server runs a PHP version lower than supported.

It would be useful to also be able to set a maximum PHP version, ideally with 2 "levels":

  • maximum supported, to indicate the most recent version that MantisBT has been tested with, any higher PHP version may work but there could be compatibility issues. This should be detected via an Admin Check.
  • strict maximum, defined when there are known compatibility issues with a PHP version, that have not yet or cannot be fixed in the current release. This should be enforced in core.php as we do with PHP_MIN_VERSION.

With that, we would avoid reports such as 0036525.

Additional Information

I'm targeting 2.27.2 because we have a known compatibility issue with PHP 8.4 in that branch that can't be fixed until 2.28.0.

TagsNo tags attached.

Relationships

related to 0036525 closeddregad upgrade from 2.26.4 fails 
related to 0035216 assigneddregad PHP 8.4 compatibility 

Related Changesets

MantisBT: master-2.27 a3226bfb

2025-10-26 06:58

dregad


Details Diff
Add Admin check for max PHP version

Fixes 0036540
Affected Issues
0036540
mod - admin/check/check_php_inc.php Diff File

MantisBT: master-2.27 4bd78321

2025-10-26 06:59

dregad


Details Diff
Set PHP_MAX_VERSION to 8.4.0

Fixes 0036540
Affected Issues
0036540
mod - core/constant_inc.php Diff File

MantisBT: master-2.27 1401d2dc

2025-10-26 12:17

dregad


Details Diff
Differentiate "max" and "max supported" PHP versions

Introduce a new PHP_SUPPORTED_VERSION constant and add a comment block
to explain usage of the 3 PHP-version-related constants.

Enforce PHP_MAX_VERSION in core.php, like we do for PHP_MIN_VERSION.

Adapt the Admin Check to use PHP_SUPPORTED_VERSION; check is downgraded
to warning since the hard fail is already taken care of.

PHP_SUPPORTED_VERSION should be defined with 2 numbers (X.Y) to cover
all versions including pre-releases.

Fixes 0036540
Affected Issues
0036540
mod - admin/check/check_php_inc.php Diff File
mod - core.php Diff File
mod - core/constant_inc.php Diff File

MantisBT: master-2.27 5f76868b

2025-10-26 19:43

dregad


Details Diff
Add missing project_id param in report URL

Fixes 0036540
Affected Issues
0036540
mod - admin/check/check_php_inc.php Diff File

MantisBT: master-2.27 a91753e8

2025-10-26 20:02

dregad


Details Diff
Add MantisBT version to error message

Issue 0036540
Affected Issues
0036540
mod - core.php Diff File