PHP 8 Compatibility: root dir / misc

Bug #1976408 reported by Gold
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Wishlist
Gold

Bug Description

This is to track patchsets that will bring the codebase up to be compliant with PHP 8.1.

The initial run through will be on a top level directory basis. i.e. the directories below htdocs. It will focus on the results from the PHPStan and Phan static analysis tools.

This bug tracks files in the htdocs directory and other miscellaneous patchsets that don't fit neatly into updates for a specific directory.

Testing will require identifying, from the patchset, where the code is used and then verifying that that area of the site still works in both PHP 7.4 and PHP 8.1.

https://phpstan.org/
https://github.com/phan/phan

Gold (gold.catalyst)
Changed in mahara:
status: New → In Progress
Gold (gold.catalyst)
Changed in mahara:
milestone: none → 22.10.0
importance: Undecided → High
Revision history for this message
Gold (gold.catalyst) wrote :
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/c/mahara/+/12820
Committed: https://git.mahara.org/mahara/mahara/commit/f0609e0727b76e4a21468dfe79877f65fc441cd1
Submitter: "Robert Lyon <email address hidden>"
Branch: main

commit f0609e0727b76e4a21468dfe79877f65fc441cd1
Author: Gold <email address hidden>
Date: Wed May 25 10:19:00 2022 +1200

Bug 1976408: Resolving SQL errors on PHP8.1 during site install

While standing up on an empty DB the PHP8.1 version showed a decent
number of SQL errors while the PHP7.4 version did not. These errors are
due to code talking to the DB before the site is installed and the
absence of the tables throwing the errors.

Note the PHP 7.4 and 8.1 sites are served from the same codebase with
the same config and DB.

I've adjusted the get_config('installed') check to also make sure the
config table exists in the database as well.

Signed-off-by: Gold <email address hidden>
Change-Id: I68efbf9744761fefcf6212b4786190165d271c99

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/c/mahara/+/12787
Committed: https://git.mahara.org/mahara/mahara/commit/9f5d64d3e04b8d96a3f8ffcf2e8333cfac7cd129
Submitter: "Robert Lyon <email address hidden>"
Branch: main

commit 9f5d64d3e04b8d96a3f8ffcf2e8333cfac7cd129
Author: Gold <email address hidden>
Date: Fri May 20 11:54:43 2022 +1200

Bug 1976408: Initial updates for getting behat to work with PHP 8.1.

There are 2 minor code fixes to get behat to run through without
crashing.

I'm including config for phan and phpstan also.

Adding phan and phpstan for local usage to external/composer.json

Signed-off-by: Gold <email address hidden>
Change-Id: I47c7759921892727fae52fcc4727c81905f684a5

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
Changed in mahara:
importance: High → Wishlist
tags: added: newfeature
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.