Drupal 10 compatibility

Created on 13 July 2023, over 1 year ago
Updated 18 June 2024, 6 months ago

Problem/Motivation

The module is not compatible with the latest Drupal.

Upgrade Status module shows these messages when checking compatibility. I wonder why does it throw errors for this module.



<!-- THEME DEBUG -->
<!-- THEME HOOK: 'upgrade_status_ascii_export' -->
<!-- BEGIN OUTPUT from 'modules/contrib/upgrade_status/templates/upgrade-status-ascii-export.html.twig' -->

CONTRIBUTED PROJECTS
--------------------------------------------------------------------------------
Commerce User Points 9.0.1
Scanned on Thu, 07/13/2023 - 09:48.

2 warnings found.

web/PHPStan failed:
ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
ā”‚  STATUS  ā”‚ LINE ā”‚                           MESSAGE                            ā”‚
ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤
ā”‚ Check    ā”‚ 0    ā”‚ <h6>PHPStan command failed:</h6> <p>/usr/local/bin/php       ā”‚
ā”‚ manually ā”‚      ā”‚ /app/vendor/bin/phpstan analyse --memory-limit=1500M         ā”‚
ā”‚          ā”‚      ā”‚ --error-format=json                                          ā”‚
ā”‚          ā”‚      ā”‚ --configuration=/tmp/upgrade_status/deprecation_testing.neon ā”‚
ā”‚          ā”‚      ā”‚ /app/web/modules/contrib/commerceuserpoints</p> <h6>Command  ā”‚
ā”‚          ā”‚      ā”‚ output:</h6> <p>Empty.</p> <h6>Command error:</h6> <p>PHP    ā”‚
ā”‚          ā”‚      ā”‚ Fatal error: Trait                                           ā”‚
ā”‚          ā”‚      ā”‚ "Symfony\Bridge\PhpUnit\Legacy\PolyfillAssertTrait" not      ā”‚
ā”‚          ā”‚      ā”‚ found in /app/web/sites/simpletest/Assert.php on line 92     ā”‚
ā”‚          ā”‚      ā”‚ Fatal error: Trait                                           ā”‚
ā”‚          ā”‚      ā”‚ "Symfony\Bridge\PhpUnit\Legacy\PolyfillAssertTrait" not      ā”‚
ā”‚          ā”‚      ā”‚ found in /app/web/sites/simpletest/Assert.php on line        ā”‚
ā”‚          ā”‚      ā”‚ 92</p>                                                       ā”‚
ā”‚          ā”‚      ā”‚                                                              ā”‚
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜

web/modules/contrib/commerceuserpoints/commerce_user_points.info.yml:
ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
ā”‚  STATUS  ā”‚ LINE ā”‚                          MESSAGE                           ā”‚
ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤
ā”‚ Check    ā”‚ 0    ā”‚ Value of core_version_requirement: ^8.8.0 || ^9.0 is not   ā”‚
ā”‚ manually ā”‚      ā”‚ compatible with the next major version of Drupal core. See ā”‚
ā”‚          ā”‚      ā”‚ https://drupal.org/node/3070687.                           ā”‚
ā”‚          ā”‚      ā”‚                                                            ā”‚
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜




<!-- END OUTPUT from 'modules/contrib/upgrade_status/templates/upgrade-status-ascii-export.html.twig' -->

jQuery.once() is deprecated in Drupal 9.3.0 and will be removed in Drupal 10.0.0

+ Plus, during dealing with dependency problem mentioned at šŸ› custom.js dependencies are not set in commerce_user_points.libraries.yml Needs review I discovered that this module still uses the deprecated core/jquery.once library in js/custom.js, just doesn't state it anywhere. This also needs to be updated to core/once (help about that here: https://www.drupal.org/node/3158256 ā†’ ) and please consider even dropping jQuery from the JS code and just use vanilla ES6 JS.

+ Also, another thing that will throw errors on Drupal 10: šŸ› Access checking must be explicitly specified on content entity queries Closed: duplicate

There is no accessCheck() specified in the query in CommerceUserPoints::calculateUsablePoints().
See its requirement since Drupal 9.2: https://www.drupal.org/node/3201242 ā†’

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

šŸ“Œ Task
Status

Closed: outdated

Version

9.0

Component

Code

Created by

šŸ‡øšŸ‡°Slovakia kaszarobert

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

Comments & Activities

Production build 0.71.5 2024