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

Follow-up to #3036285: Deprecate JsonApiDocumentTopLevel::__construct in favor of two dedicated factory methods for data and error documents.

$
0
0

Problem/Motivation

Suggested by @larowlan in #3036285-55: Add a \JsonApiResource\Relationship object to carry relationship data, metadata and a link collection., JsonApiDocumentTopLevel::__construct is complicated by the fact that it takes a different set of arguments depending on whether it's the response is an error response or not. We could clean this up by deprecating the constructor in favor of two new factory methods that take arguments specific to each document type.

User interface changes

None.

API changes

Deprecated value object constructor, additional factory methods.

Data model changes

None.

Release notes snippet

TBD.


Viewing all articles
Browse latest Browse all 292926

Trending Articles



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