Drupal 10 compatibility

Created on 13 July 2023, almost 2 years ago
Updated 18 June 2024, 10 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