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_requirements function to from /includes/helpers.inc to varbase_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

Rajab Natshah created an issue. See original summary.

rajab natshah’s picture

Issue summary: View changes

rajab natshah’s picture

Assigned: rajab natshah » Unassigned
Status: Active » Needs review
Issue tags: +PHP 8.2, +varbase-9.0.18, +varbase_media-9.0.41, +varbase-9.1.1, +varbase_media-9.1.5, +varbase-10.0.0-rc2, +varbase_media-10.0.0-rc1
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes

✅ Released varbase_media-9.1.5

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Status: Needs review » Fixed
rajab natshah’s picture

Issue summary: View changes
Issue tags: -varbase-10.0.0-rc2 +varbase-10.0.0
rajab natshah’s picture

Issue summary: View changes

✅ Released varbase-9.0.18

rajab natshah’s picture

Issue summary: View changes

✅ Released Varbase 9.1.1

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

rajab natshah’s picture

rajab natshah’s picture

Issue summary: View changes

✅ Released varbase-10.0.0-rc2