Problem/Motivation

The commerceguys/intl v2 library now specifies parameter types and return types for methods.
Drupal Commerce is going to require the v2 (See #3345682: Require commerceguys/intl version 2).

Commerce itself is decorating the physical class, therefore we need to align with the changes in Physical too.

CommentFileSizeAuthor
#2 3345698-2.patch5.55 KBjsacksick

Issue fork physical-3345698

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jsacksick created an issue. See original summary.

jsacksick’s picture

Status: Active » Needs review
StatusFileSize
new5.55 KB
jsacksick’s picture

Status: Needs review » Fixed

Committed!

  • jsacksick committed 3bda141c on 8.x-1.x
    Issue #3345698 by jsacksick: Align with the commerceguys/intl changes.
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

berdir’s picture

This is a BC break, no, shouldn't this go into a new major release?

Also, without explicit dependency/conflict declarations between this, commerce and commerceguys/intl, it is possible to update to incompatible combinations of these packages. A project I updated somehow only updated physical and not commerce/intl, so I had the latest version of physical and commerceguys/intl 1.x, resulting in this very confusing error:

Fatal error: Declaration of CommerceGuys\Intl\Formatter\NumberFormatter::format($number, array $options = []) must be compatible with Drupal\physical\NumberFormatterInterface::format(string $number, array $options = []): string in vendor/commerceguys/intl/src/Formatter/NumberFormatter.php on line 68

(confusing because that physical interface is only implemented in the commerce subclass that isn't mentioned here)

janv made their first commit to this issue’s fork.

luksak’s picture

I have the same issue as described in #6. I would be nice to have a fix for this soon...

berdir’s picture

There won't be a fix. Either downgrade physical back to 1.2, which is OK as this is the only change in that release or upgrade commerce. The conflict should have been added to the 1.3 release, but nothing can be done about that now.

jsacksick’s picture

Apologize for this, I thought about adding the conflict in Commerce, but forgot to do the same here.

giorgosk’s picture

For anyone still looking temp solution is

composer require drupal/physical:1.2