Diff module has added type hinting to a bunch of their methods which is breaking a few modules that are extending those methods.

Comments

porchlight created an issue. See original summary.

porchlight’s picture

StatusFileSize
new561 bytes

8x.-1.x patch

bojanz’s picture

This is for compatibility with Diff 2.0.x, right? Diff 8.x-1.x still works?

porchlight’s picture

Yes! Sorry, I guess I should have stated that.

evgen’s picture

It fixes this problem as well!
Fatal error: Declaration of Drupal\address\Plugin\diff\Field\AddressFieldBuilder::build(Drupal\Core\Field\FieldItemListInterface $field_items) must be compatible with Drupal\diff\Plugin\diff\Field\CoreFieldBuilder::build(Drupal\Core\Field\FieldItemListInterface $field_items): array in /project/docroot/modules/contrib/address/src/Plugin/diff/Field/AddressFieldBuilder.php on line 24

Thanks!

maxilein’s picture

Thanks!
I can confirm it solved my problem:

PHP Fatal error: Declaration of Drupal\\address\\Plugin\\diff\\Field\\AddressFieldBuilder::build(Drupal\\Core\\Field\\FieldItemListInterface $field_items) must be compatible with Drupal\\diff\\Plugin\\diff\\Field\\CoreFieldBuilder::build(Drupal\\Core\\Field\\FieldItemListInterface $f<h2></h2>ield_items): array in /.../.../modules/contrib/address/src/Plugin/diff/Field/AddressFieldBuilder.php on line 24

D 10.3.6 php 8.3, diff 2.0.0-beta3

pearls’s picture

+1 for RTBC

bojanz’s picture

Title: AddressFieldBuilder::build no longer compatible with diff's CoreFieldBuilder::build » AddressFieldBuilder::build is not compatible with diff 2.0.x's CoreFieldBuilder::build
Version: 2.0.x-dev » 2.1.x-dev
Status: Active » Reviewed & tested by the community

Let's do this.

  • bojanz committed 2cab0da6 on 2.1.x
    Issue #3460590 by porchlight: AddressFieldBuilder::build is not...
bojanz’s picture

Status: Reviewed & tested by the community » Fixed

  • bojanz committed 58550636 on 2.x
    Issue #3460590 by porchlight: AddressFieldBuilder::build is not...

Status: Fixed » Closed (fixed)

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

kevinquillen’s picture

Would it be possible to get this fix out into a stable release?

acbramley’s picture

Seconding #13 it looks like it was committed to 2.x but not 2.0.x so it didn't make it into 2.0.4 which was just released last month

sagesolutions’s picture

+1 for a new stable release with this included.

dww’s picture

Per #3537066: Disparity between 2.x and 2.0.x, I cherry-pick'ed this and pushed to 2.0.x. Not sure why that's not automatically showing up here. But it's at:

https://git.drupalcode.org/project/address/-/commit/ba10f2ea735dc6f64e50...

So this will go out in the 2.0.5 release, whenever that happens.

dww’s picture

p.s. I should note for the record that I tested this locally with a 10.5.x site, installed diff 8.x-1.9 and address 2.0.x, created a node type with an address field, made some edits / revisions, and was safely able to view the diffs between the revisions without trouble. I then upgraded diff to 2.0.0-beta4, and diff all kept working fine.

joegl’s picture

It would be great to get a release out for this. New issues are popping up as duplicates and the fix has been around 2 years.

yovince’s picture