Convert AtvCommonTrait to a class

Created on 4 February 2025, 25 days ago

Problem/Motivation

On newer versions of PHP we get an e notice that calling static methods directly from a trait will be deprecated.

Deprecated: Calling static trait method Drupal\alt_text_validation\AtvCommonTrait::getAuditTableName is deprecated, it should only be called on a class using the trait in /builds/project/alt_text_validation/alt_text_validation.install on line 15

Proposed resolution

  1. convert the trait to a class. AtvCommonTrait.php to AtvCommon.php
  2. all methods should be public static.
  3. convert methods that "get" just return a value to class constants
  4. convert any calls to the trait in the codebase to use the new class.
πŸ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States swirt Florida

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024