View Issue Details

IDProjectCategoryView StatusLast Update
0025956mantisbtinstallationpublic2023-10-31 16:32
Reporterdregad Assigned Todregad  
PrioritynormalSeveritymajorReproducibilityN/A
Status closedResolutionfixed 
Product Version2.0.0 
Target Version2.26.0Fixed in Version2.26.0 
Summary0025956: Drop support for PHP 5.x
Description

Since MantisBT 2.0.0 we officially support PHP 5.5.9 and later, aligned with Ubuntu14.04 LTS "Trusty Tahr" release (as per discussion in 0021841).

PHP 5.5 is EOL since 21 Jul 2016, and PHP 5.6 support ended 31 Dec 2018 so I think it's finally time to put 5.x behind us.

Continuing our strategy to align requirements with Ubuntu LTS releases, the oldest one as of this writing is 16.04 Xenial Xerus, which comes bundled with PHP 7.0 by default. Note: 7.0 is also EOL since 10 Jan 2019.

Additional Information

Maintaining compatibility with PHP 5.x is becoming increasingly difficult, as more and more libraries and tools are dropping support for it (e.g. PHPUnit, and many others).

Travis CI is defaulting to Xenial for builds since May 2019 [1], and PHP 5.5 is not available at all under this distribution (see #25955). We can force use of Trusty for now to keep things working, but we need to make the switch at some point.

TagsPHP 7, TravisCI

Relationships

related to 0021841 closeddregad mantisbt Minimum requirements for 2.x releases 
related to 0024128 closedatrol mantisbt Unable to start system check or installation with wrong PHP version 
related to 0023378 closedatrol mantisbt Installation fails when using old but still allowed PHP version 5.3 
related to 0027840 closeddregad mantisbt Increase minimum PHP requirement to 7.2.5 
related to 0028830 closeddregad mantisbt Remove PHP < 5.4 compatibility code from user_get_all_accessible_projects() 
related to 0027793 closeddregad mantisbt Admin Guide lists incorrect/incomplete/obsolete required PHP extensions 
related to 0032797 closeddregad mantisbt Increase minimum PHP requirement to 7.2 

Activities

cproensa

cproensa

2019-08-03 09:45

developer   ~0062498

I'm ok with this.

atrol

atrol

2019-08-03 10:14

developer   ~0062499

I am also ok with this when speaking about my own installations.

But keep in mind that I introduced a hard check for minimum PHP version in version 2.13.0 to fix 0024128.
So upgrading from 2.x 2.20.0 would stop some (maybe even quite a lot) of installations.

The general problem is, that we don't offer some kind of LTS version.

dregad

dregad

2019-08-03 11:05

developer   ~0062500

keep in mind that I introduced a hard check for minimum PHP version

Well if we require a minimum version, then I think it's normal that the software should fail with a message when the requirement is not met.

Even if technically, MantisBT would still work with older PHP versions, we can always instruct users who get stuck because they can't upgrade PHP on their server for whatever reason, to try - at their own risk of course - to change value of PHP_MIN_VERSION in their config.

atrol

atrol

2019-08-03 11:43

developer   ~0062501

to change value of PHP_MIN_VERSION in their config

Not possible at the moment. The check is done before config_inc.php is included. There was a good reason to check it in a very early state.
See also discussion on the PR https://github.com/mantisbt/mantisbt/pull/1318

vboctor

vboctor

2019-08-25 16:42

manager   ~0062655

I always assumed that 2.0.0 we had PHP 7 as the target version, and support for PHP 5.x was best effort. Given that all 5.x are out of support, I think we should make PHP 7 a hard requirement and move on.

Kyle_Katarn

Kyle_Katarn

2020-03-13 17:35

reporter   ~0063758

Please do not underestimate the impact on users... and make this change very explicit.
I've found this ticket "by chance"... and i'm currently preparing my whole site to be PHP7 capable in order to upgrade to PHP7 before it gets released.... which takes me a lot of code rewritting, in particular to move from mysql to mysqli extension...

Kyle_Katarn

Kyle_Katarn

2020-03-16 10:48

reporter   ~0063766

https://www.mantisbt.org/docs/master/en-US/Admin_Guide/html-desktop/#admin.install.requirements

to be updated

atrol

atrol

2020-03-16 10:57

developer   ~0063767

@Kyle_Katarn what has to be updated?

Kyle_Katarn

Kyle_Katarn

2020-03-16 12:24

reporter   ~0063768

The above mentionned web page, once PHP 7 becomes required.

dregad

dregad

2020-08-17 05:03

developer   ~0064265

Based on the general consensus, I'm planning to implement this in the next release (2.25.0).

Note: Xenial will enter extended support maintenance mode in April 2021, at which point the oldest LTS release with standard support will be 18.04 "Bionic Beaver" which is on PHP 7.2 [1] so we might go through this again in a few months.

rogueresearch

rogueresearch

2020-12-05 19:37

reporter   ~0064748

And now PHP 8 is out. Does Mantis support PHP 8? If not, such support would probably be easier dropping 5.x support.

dregad

dregad

2021-01-03 18:48

developer   ~0064921

Does Mantis support PHP 8?

I've been running Mantis on PHP 8 for a few weeks now, so I would say yes.

So far I've mainly encountered a few fairly minor issues (e.g. depreprecation, system notices, etc), with the exception of 0027806 (which has been fixed in 2.24.4, along with most of the aforementioned issues).

Check issues tagged with PHP 8 for details.

atrol

atrol

2021-01-05 06:14

developer   ~0064929

@dregad to give users a chance to prepare the upgrade of their ennvironment, I would prefer if we

  • cut 2.25.0 ASAP
  • announce that 2.25.x will be the last version that supports PHP < 7
dregad

dregad

2021-01-05 18:08

developer   ~0064934

announce that 2.25.x will be the last version that supports PHP < 7

The announcement is out

dregad

dregad

2021-02-20 19:12

developer   ~0065146

PR https://github.com/mantisbt/mantisbt/pull/1742

dregad

dregad

2023-08-02 04:49

developer   ~0067960

2 years have passed and 2.26.0 could not be released as planned.

Targeting PHP 7.0 as minimum supported version does not make much sense in 2023, so as discussed with the team, we'll set PHP 7.2 as minimum supported version for MantisBT 2.26.0; 0032797 was opened to track this.

This issue's summary was changed to Drop support for PHP 5.x, so both issues can coexist on the Changelog without bringing confusion.

Related Changesets

MantisBT: master 960d141b

2019-08-03 07:14

dregad


Details Diff
Update minimum PHP version to 7.0

Note: PHP version is now specified with `^` operator instead of `>=`,
so we need to add major PHP versions by ORing them into the constraint.

This makes supporting new PHP versions an explicit act.

Fixes 0025956
Affected Issues
0025956
mod - composer.json Diff File
mod - core/constant_inc.php Diff File
mod - docbook/Admin_Guide/en-US/Installation.xml Diff File

MantisBT: master a1b5e2d0

2021-03-15 13:19

atrol


Details Diff
Update minimum PHP requirement in readme.md

Issue 0025956
Affected Issues
0025956
mod - readme.md Diff File