Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293926

Permit arrays as target attribute values in Drupal\jsonapi\JsonApiResource\Link

$
0
0

Problem/Motivation

I'm creating a proof-of-concept for richer hypermedia using JSON:API in the jsonapi_hypermedia module. I'm unable to create rich target attributes for those hypermedia links because of an assertion in the Link constructor:

    assert(Inspector::assertAll(function ($target_attribute_value) {
      return is_string($target_attribute_value)
        || is_array($target_attribute_value)
        && Inspector::assertAllStrings($target_attribute_value);
    }, array_values($target_attributes)));

Proposed resolution

Remove Inspector::assertAllStrings($target_attribute_value).

Remaining tasks

Review
Commit

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

None.


Viewing all articles
Browse latest Browse all 293926

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>