Forums | Mahara Community

Developers /
Mahara and PHP 8


Kristina Hoeppner's profile picture
Posts: 4872

02 February 2022, 15:51

Hi everyone,

Organisations are looking into upgrading their operating systems and that will inevitably bring PHP 8 along. I'd like to outline the approach of the Mahara team to achieve PHP 8 compatibility.

We are looking into a phased support for PHP 8.1. Due to the number of changes required to fully support PHP 8 and new ways of programming in PHP 8, yet at the same time keeping Mahara available for organisations that can't yet switch, we are in the process of making changes that can safely be done to support both PHP 7 and PHP 8. Support for PHP 8 will be minimal instead of taking advantage of all the new cool features.

We also depend on the third-party libraries to be PHP 8 ready. Our list indicates that for the most part that won't be a problem. However, there are especially two third-party components that are not PHP 8 ready:

  • OAuth 1 (used in LTI 1.1)
  • Elasticsearch

Changes to these will take longer. Therefore, organisations using these features shouldn't upgrade to PHP 8 until appropriate changes have been made. Also organisations using MNet should be careful about an upgrade to PHP 8 as the XML-RPC PHP plugin is not available directly any more in PHP 8 and will need to be compiled separately.</p

The Mahara team is working through problems we encounter with PHP 8 with the help of PHPStan, which provides good guidance on what should be changed. If you'd like to support these efforts, please get in touch so that work isn't doubled up.

We are already pushing changes for PHP 8 to the future version of Mahara 22.04, but will not have finished that work for the upcoming release in April. Therefore, we are looking into a transitional Mahara version with minimal PHP 8 support for Mahara 22.10, the October 2022 version, with additional changes in subsequent versions to reach full PHP 8 support.

That would mean that PHP 7 will not be supported any more once major changes are made to support PHP 8. This is similar to the change we made from PHP 5.x to PHP 7 a few years ago, though the changes between PHP 7 and PHP 8 are much more comprehensive and far-reaching.

We will have a better understanding of that timeline closer to the release of Mahara 22.10. If you have any questions, please let ask away.

Thank you
Kristina

Klaus Steitz's profile picture
Posts: 18

23 September 2022, 19:16

Hello Kristina,

thanks for that overview regarding PHP 8 in February.

In the meantime Mahara 22.10 is getting closer. Can you please give the current state and plans for PHP8-support?

Is it still correct that there will be NO PHP8-Support for Mahara 22.04, e.g. in 22.04.3?

I am asking because of the PHP 7.4 EOL in November. Problem is the major-Upgrade. We usually are not able to do major-updates during the semester. Solely because of the changes for the uses during the semester, besides of admin-work and downtime for major-upgrade.

We would appreciate a PHP 8.0 support in 22.04.3 !

 

kind regards
Klaus

Kristina Hoeppner's profile picture
Posts: 4872

27 September 2022, 16:50

Hi Klaus,

Thanks for your question. We talked about the PHP 8.1 status in the last developer meeting. At the moment we are looking at achieving basic compatibility to PHP 8.1, allowing organisations to continue on PHP 7.4 as major distributions will still support that until their end of life, e.g. if you are on Ubuntu 20.04, then that is supported until 2025.

We do not yet recommend using a live site with PHP 8.1 but definitely do so for a testing site once Mahara 22.10 is available so that issues can be found and put into the backlog to fix.

Mahara 22.04 or earlier will not be made PHP 8.1 compatible. We are also not looking into PHP 8.0 support but aim for PHP 8.1 as that is in Ubuntu in the LTS, our main operating system that we support.

Our aim is to increase the stability with PHP 8.1 for Mahara 23.04 next April, and the feedback from organisations testing their Mahara instances on dev servers with PHP 8.1 will greatly aid in that and help us identify areas that would require updates besides our systematic walk through changes that are suggested by PHPStan as one of the tools to help with that process.

Cheers

Kristina

Ralf Hilgenstock's profile picture
Posts: 162

03 April 2023, 21:35

Hi Kristina,

are there any news about PHP 8.0 support in 23.04?

 

Ralf

Kristina Hoeppner's profile picture
Posts: 4872

11 April 2023, 8:59

Hi Ralf,

We've been focussing testing with PHP 8.1 and looked into PHP 8.2 as there are no breaking changes. Behat tests are running with PHP 8.1, which is a great way to test many areas manually. If you can test on a non-production site and see if you run into issues that would help. See also our developer meeting notes.

Thank you

Kristina

5 results