Problem/Motivation
Having the following in PHP 8.1
in the varbase_media.install
// Include all helpers and updates.
include_once __DIR__ . '/includes/helpers.inc';
include_once __DIR__ . '/includes/updates.inc';
and in the varbase_media.module
// Include all helpers.
include_once __DIR__ . '/includes/helpers.inc';
// Include Varbase Media global tokens.
include_once __DIR__ . '/varbase_media.tokens.inc';
When updating to PHP 8.3
and when installing with Drush ~12
[Mon Jan 08 14:21:07.510983 2024] [php:error] [pid 108041] [client 10.50.111.41:54342] PHP Fatal error: Cannot redeclare varbase_media_requirements() (previously declared in /var/www/html/products/varbase_media/includes/helpers.inc:16) in /var/www/html/dev/varbase10c1/docroot/modules/contrib/varbase_media/includes/helpers.inc on line 40
Proposed resolution
- Move the
varbase_media_requirementsfunction to from/includes/helpers.inctovarbase_media.install
Remaining tasks
- ✅ File an issue about this project
- ✅ Addition/Change/Update/Fix to this project
- ✅ Testing to ensure no regression
- ➖ Automated unit/functional testing coverage
- ➖ Developer Documentation support on feature change/addition
- ➖ User Guide Documentation support on feature change/addition
- ➖ UX/UI designer responsibilities
- ➖ Accessibility and Readability
- ✅ Code review from 1 Varbase core team member
- ✅ Full testing and approval
- ✅ Credit contributors
- ✅ Review with the product owner
- ✅ Update Release Notes and Update Helper on new feature change/addition
- ✅ Release varbase-10.0.0-rc2, varbase-9.0.18, varbase_media-9.0.41, Varbase 9.1.1, varbase_media-9.1.5, varbase_media-10.0.0-rc1
Varbase update type
- ✅ No Update
- ➖ Optional Update
- ➖ Forced Update
- ➖ Forced Update if Unchanged
User interface changes
- N/A
API changes
- N/A
Data model changes
- N/A
Release notes snippet
- Issue #3413168: Fixed PHP Fatal error: Cannot redeclare varbase_media_requirements() previously declared when installed with Drush ~12 and PHP 8.3
Comments
Comment #2
rajab natshahComment #6
rajab natshahComment #7
rajab natshahComment #8
rajab natshah✅ Released varbase_media-9.0.41
Comment #9
rajab natshah✅ Released varbase_media-9.1.5
Comment #10
rajab natshah✅ Released varbase_media-10.0.0-rc1
Comment #11
rajab natshahComment #12
rajab natshahComment #13
rajab natshah✅ Released varbase-9.0.18
Comment #14
rajab natshah✅ Released Varbase 9.1.1
Comment #16
rajab natshahComment #17
rajab natshah✅ Released varbase-10.0.0-rc2