PHP 8 : PHPCompatibility issue

Created on 19 April 2023, about 1 year ago

Problem/Motivation

FILE: /home/hari/project/drupal/doorking/web/sites/all/modules/contrib/ubercart/payment/uc_cybersource/uc_cybersource.module
----------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------
 651 | WARNING | Function each() is deprecated since PHP 7.2; Use a foreach loop instead
----------------------------------------------------------------------------------------------------------------------------


FILE: ...me/hari/project/drupal/doorking/web/sites/all/modules/contrib/ubercart/payment/uc_google_checkout/uc_google_checkout.module
---------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------
 1 | WARNING | No PHP code was found in this file and short open tags are not allowed by this install of PHP. This file may be
   |         | using short open tags but PHP does not allow them.
---------------------------------------------------------------------------------------------------------------------------------

Steps to reproduce

phpcs -p . --standard=PHPCompatibility --extensions=module/php,inc/php,install/php,php/php --runtime-set testVersion 8.1
🐛 Bug report
Status

Needs work

Version

3.0

Component

Code

Created by

🇮🇳India harivansh

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

Comments & Activities

  • Issue created by @harivansh
  • Open in Jenkins → Open on Drupal.org →
    Core: 7.x + Environment: PHP 5.3 & MySQL 5.5
    last update about 1 year ago
    125 pass
  • Status changed to Needs review about 1 year ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 7.x + Environment: PHP 8.1 & MySQL 5.7
    last update about 1 year ago
    122 pass, 5 fail
  • Status changed to Needs work about 1 year ago
  • 🇺🇸United States TR Cascadia

    Before posting in any module's issue queue, please check that issue queue for existing issues.

    We already have an issue for making D7 Ubercart compatible with PHP 8. It is here: #3276887: [meta] Make D7 Ubercart compatible with PHP 8

    You have identified 1 new problem not covered there, which is the uc_cybersource problem with each(). Please edit this issue title and issue summary to describe that problem, and please add the above meta issue as a parent of this one so we can keep track of these PHP 8 issues.

    The phpcs output about uc_google_checkout is a false positive and won't be fixed. Drupal core requires the .module file to exist in D7. That requirement was removed in D8. But the .module file does not need to contain anything at all and should not contain anything at all, because even a space in that file could cause errors in the Drupal output.

Production build 0.69.0 2024