We're running 8.3.9 (working on upgrading). We installed JSON API 8.x-1.15, and we came across the following error:

PHP Fatal error: Trait 'Drupal\Core\TypedData\ComputedItemListTrait' not found in /mnt/www/html/tektronixdev/docroot/modules/contrib/jsonapi/src/Field/FileDownloadUrl.php on line 17 request_id="v-2b29e062-41c4-11e8-be00-22000a5a02ca"

We found that Drupal\Core\TypedData\ComputedItemListTrait.php doesn't exist until D8.4.3. So the dependency in jsonapi.info.yml should specify that as the minimum version required.

CommentFileSizeAuthor
#4 2961562-4.patch408 bytesgabesullice

Comments

bwinett created an issue. See original summary.

wim leers’s picture

Drupal 8.3 has not been supported for many months. Drupal 8.5 is the only supported version. You're right though that we should've updated

dependencies:
  - drupal:system (>=8.3)

to

dependencies:
  - drupal:system (>=8.4.3)
wim leers’s picture

Assigned: Unassigned » gabesullice

Assigning to Gabe to get his thoughts.

gabesullice’s picture

Status: Active » Needs review
Issue tags: +API-First Initiative
StatusFileSize
new408 bytes

Agreed. Let's do it. We can't support unsupported minors. If updating a core version breaks other things, that's a major problem w/ core, not JSON API.

bwinett’s picture

I tested it against D8.5.2, and it worked fine.

wim leers’s picture

Status: Needs review » Reviewed & tested by the community

I was gonna say that we could copy paste 8.4.3's class into JSON API and use that instead; then this could still work in 8.3.

But … 8.3 is >1 year old at the moment (released April 5, 2017). It no longer gets security updates. You really really should update anyway.

So, let's do this!

wim leers’s picture

Title: incorrect dependency » JSON API 1.15 uses code available in Drupal core >=8.4.3, but requires only >=8.3

  • Wim Leers committed f7d8b16 on 8.x-1.x authored by gabesullice
    Issue #2961562 by gabesullice, Wim Leers, bwinett: JSON API 1.15 uses...
  • Wim Leers committed 8fb6f4d on 8.x-2.x authored by gabesullice
    Issue #2961562 by gabesullice, Wim Leers, bwinett: JSON API 1.15 uses...
wim leers’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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