Bug #18496
openPHP 8+ Compatibility
Added by Raymond Hoh over 1 year ago. Updated 20 days ago.
0%
Description
We're currently running PHP 7.4 in our PHPCS set up and on the GC server, but some of us are using PHP 8+ in our development environments. (For example, #16948.)
This will be a catch-all ticket to address deprecated notices, fatal errors and the like.
Also, just to note that PHP 7.4 reached end-of-life back in November 2022. Upgrading to PHP 8.2 is probably good to think about when we decide to move hosts. PHP 8.2 is supported until December 2025, while PHP 8.0 will reach end-of-life in November 2023.
Related issues
Updated by Raymond Hoh over 1 year ago
I've added a commit to address the implicit conversion from float to int notice for the cac_get_default_avatar()
function here - https://github.com/cuny-academic-commons/cac/commit/0ffc3b8ae2166981eb5564bbbad780df241768ef .
bp-groupblog
and invite-anyone
also needed some changes to fix some deprecated notices, but I wasn't aware that the upstream versions already fixed them. I've backported those changes in the following commits - https://github.com/cuny-academic-commons/cac/commit/cb10f022b627315f2d0c01fb8d3980a629f9c005 , https://github.com/cuny-academic-commons/cac/commit/d481ae990c8a53ebe14fd0ade0afb6013781fed2 . Boone, are there any major changes between the upstream versions and our CAC version?
Updated by Boone Gorges over 1 year ago
Boone, are there any major changes between the upstream versions and our CAC version?
No, I don't think so. I'll likely be performing updates to both plugins as part of the upcoming Commons In A Box release (~mid August), after which point the new versions will be on wordpress.org and will trickle down to the Commons. In the meantime, I don't see any harm in backporting some or all of the fixes to CAC.
Updated by Boone Gorges over 1 year ago
- Target version changed from 2.1.11 to 2.1.12
Updated by Boone Gorges over 1 year ago
- Target version changed from 2.1.12 to 2.1.13
Updated by Boone Gorges over 1 year ago
- Target version changed from 2.1.13 to 2.1.14
Updated by Boone Gorges about 1 year ago
- Target version changed from 2.1.14 to 2.1.15
Updated by Boone Gorges about 1 year ago
- Target version changed from 2.1.15 to 2.1.16
Updated by Jeremy Felt about 1 year ago
I think related to PHP 8 compat. :)
I have a branch open from master (test/improve-php8-scan
) that uses dev-develop
on the PHPCompatibility library. The PHPCompatibility library itself hasn't had a version release since 2019, and there are quite a few improvements pending. I landed on this config for quite a few other projects after seeing Juliette's guidance. The tests still pass as expected, so there is no real change other than (hopefully) increased reliability.
Updated by Boone Gorges about 1 year ago
Thanks so much for looking at this, Jeremy! These updates look good. I've merged them into the mainline 2.1.x branch.
Updated by Boone Gorges about 1 year ago
- Target version changed from 2.1.16 to 2.2.1
Updated by Boone Gorges about 1 year ago
- Target version changed from 2.2.1 to 2.2.2
Updated by Boone Gorges about 1 year ago
- Target version changed from 2.2.2 to 2.2.3
Updated by Boone Gorges 12 months ago
- Target version changed from 2.2.3 to 2.2.4
Updated by Jeremy Felt 12 months ago
I'm seeing a PHP warning (previously a notice) via CAC Courses when on PHP 8.2 in this line: https://github.com/cuny-academic-commons/cac-courses/blob/1f4bbb093e2b89760d9b1ba436ebd119e070ecb2/src/API.php#L44
I've adjusted this locally to be
$user = new \WP_User( $user['id'] );
return $user->user_login;
But I'm not sure what that may be impacting other than removing the warning for me. :)
Updated by Boone Gorges 12 months ago
I'm not sure the root of the issue, but I don't see any harm in the change https://github.com/cuny-academic-commons/cac-courses/commit/4ff624fa1288a969aa12623aba72ceb157f21679
Updated by Boone Gorges 12 months ago
- Target version changed from 2.2.4 to 2.2.5
Updated by Boone Gorges 11 months ago
- Target version changed from 2.2.5 to 2.2.6
Updated by Boone Gorges 11 months ago
- Target version changed from 2.2.6 to 2.3.1
Updated by Boone Gorges 10 months ago
- Target version changed from 2.3.1 to 2.3.2
Updated by Boone Gorges 9 months ago
- Target version changed from 2.3.2 to 2.4.0
Updated by Boone Gorges 5 months ago
- Target version changed from 2.4.0 to 2.5.0
Updated by Boone Gorges 20 days ago
- Related to Feature #21381: Upgrade to PHP 8.1.x as part of Reclaim migration added
Updated by Boone Gorges 20 days ago
- Target version changed from 2.5.0 to Migration to Reclaim