Compatibility issue with Commerce module

Created on 5 July 2024, 5 months ago

Problem/Motivation

The commerce contrib module β†’ , in the Price submodule, is declaring a "Currency" constraint and providing an "availableCurrencies" option which collides with the change in #3382104 πŸ“Œ Add support for Symfony Currency Constraint Fixed and provoking the following error :

Symfony\Component\Validator\Exception\InvalidOptionsException: The options "availableCurrencies" do not exist in constraint "Drupal\field_validation\Plugin\Validation\Constraint\CurrencyConstraint". in Symfony\Component\Validator\Constraint->normalizeOptions() (line 180 of /app/vendor/symfony/validator/Constraint.php).

Steps to reproduce

  1. Clean D10 install
  2. Install and enable both Commerce Price & Field Validation modules
  3. Add a "price" field to a content type
  4. Create a new content type and try to validate the form

Proposed resolution

Change the "CurrencyConstraint" plugin ID to avoid collisions with Commerce module.

Remaining tasks

Propose patch.
Review patch.

User interface changes

n/a

API changes

n/a

Data model changes

n/a

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡³πŸ‡΄Norway zaporylie

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