ADDED:
CHANGED:
JsonApiClient implements PSR-18's ClientInterfacePsr\Http\Client\ClientInterface as typeREMOVED:
CHANGED:
Psr\Http\Client\ClientInterface as typeREMOVED:
ADDED:
JsonApiClient implements PSR-18's ClientInterfaceCHANGED:
REMOVED:
ADDED:
filter query parameter directlyADDED:
CHANGED:
AttributeHydratorInterfaceFIXED:
ClassDocumentHydrator::hydrateSingleResource() returns an object instead of stdClassADDED:
AbstractClassDocumentHydrator as a base class for custom hydratorsCHANGED:
ClassDocumentHydrator is no longer a final classADDED:
DocumentHydratorInterface and ClassDocumentHydrator in order to fix some issues with the HydratorInterface and ClassHydratorWoohooLabs\Yang\JsonApi\Request\ResourceObject: id(), setId(), type(), setType(),
attributes(), relationships()DEPRECATED:
HydratorInterface: use the DocumentHydratorInterface insteadClassHydrator: use the ClassDocumentHydrator insteadCHANGED:
ADDED:
type links in errorsDocument::errorCount() to easily count errors in the documentResourceObject::attribute() methodCHANGED:
null return values (BREAKING CHANGE):
JsonApiResponse::document() throws an exception instead of returning null if the response doesn't contain a document.Document::primaryResources() throws an exception if the document is a single-resource or error documentDocument::primaryResource() throws an exception if the document is a collection or error document or the primary resource is missingDocument::resource() throws an exception instead of returning null if the requested resource is missingDocument::error() throws an exception instead of returning null if the document does not contain the requested errorRelationship::resources() throws an exception instead of returning an empty array if the relationship is a to-oneRelationship::resource() throws an exception instead of returning null if the relationship is a to-many or emptyRelationship::resourceBy() throws an exception instead of returning null if the requested resource is missingResourceObject::relationship() throws an exception instead of returning null if the requested relationship is missingWoohooLabs\Yang\JsonApi\Schema\Error to WoohooLabs\Yang\JsonApi\Schema\Error\ErrorWoohooLabs\Yang\JsonApi\Schema\ErrorSource to WoohooLabs\Yang\JsonApi\Schema\Error\ErrorSourceWoohooLabs\Yang\JsonApi\Schema\Link to WoohooLabs\Yang\JsonApi\Schema\Link\LinkWoohooLabs\Yang\JsonApi\Schema\ResourceObjects to WoohooLabs\Yang\JsonApi\Schema\Resource\ResourceObjectsWoohooLabs\Yang\JsonApi\Schema\ResourceObject to WoohooLabs\Yang\JsonApi\Schema\Resource\ResourceObjectLinks for the different types of links (BREAKING CHANGE):
DocumentLinks when using Document::links()ResourceLinks when using ResourceObject::links()RelationshipLinks when using Relationship::links()ErrorLinks when using Error::links()JsonSerializer::serialize() will throw a RequestException instead of LogicException if the body is of invalid type (BREAKING CHANGE)JsonApi to JsonApiObject (BREAKING CHANGE)REMOVED:
Link class (BREAKING CHANGE)FIXED:
ADDED:
type links in errorsDocument::errorCount() to easily count errors in the documentResourceObject::attribute() methodCHANGED:
null return values (BREAKING CHANGE):
JsonApiResponse::document() throws an exception instead of returning null if the response doesn't contain a documentDocument::primaryResources() throws an exception if the document is a single-resource or error documentDocument::primaryResource() throws an exception if the document is a collection or error document or the primary resource is missingDocument::resource() throws an exception instead of returning null if the requested resource is missingDocument::error() throws an exception instead of returning null if the document does not contain the requested errorRelationship::resources() throws an exception instead of returning an empty array if the relationship is a to-oneRelationship::resource() throws an exception instead of returning null if the relationship is a to-many or emptyRelationship::resourceBy() throws an exception instead of returning null if the requested resource is missingResourceObject::relationship() throws an exception instead of returning null if the requested relationship is missingWoohooLabs\Yang\JsonApi\Schema\Error to WoohooLabs\Yang\JsonApi\Schema\Error\ErrorWoohooLabs\Yang\JsonApi\Schema\ErrorSource to WoohooLabs\Yang\JsonApi\Schema\Error\ErrorSourceWoohooLabs\Yang\JsonApi\Schema\Link to WoohooLabs\Yang\JsonApi\Schema\Link\LinkWoohooLabs\Yang\JsonApi\Schema\ResourceObjects to WoohooLabs\Yang\JsonApi\Schema\Resource\ResourceObjectsWoohooLabs\Yang\JsonApi\Schema\ResourceObject to WoohooLabs\Yang\JsonApi\Schema\Resource\ResourceObjectLinks for the different types of links (BREAKING CHANGE):
DocumentLinks when using Document::links()ResourceLinks when using ResourceObject::links()RelationshipLinks when using Relationship::links()ErrorLinks when using Error::links()JsonSerializer::serialize() will throw a RequestException instead of LogicException if the body is of invalid type (BREAKING CHANGE)JsonApi to JsonApiObject (BREAKING CHANGE)REMOVED:
Link class (BREAKING CHANGE)FIXED:
ADDED:
CHANGED:
ADDED:
ClassHydrator::hydrateObject() methodADDED:
HydratorInterface::hydrateCollection()FIXED:
ClassHydratorResourceObject::toString() and JsonApiRequestBuilder::toString()FIXED:
CHANGED:
ADDED:
ClassHydratorResourceObject::getRelationships()ADDED:
CHANGED:
ToManyRelationship::addResourceIdentifier() uses fluent interfaceADDED:
ResourceObject::idAndAttributes() methodADDED:
JsonDeserializerCHANGED:
DefaultDeserializer to JsonDeserializerJsonApiClient and JsonApiAsyncClient into the JsonApi\Client namespaceJsonApi\Serializer namespace along with serializersADDED:
CHANGED:
Error::createFromArray() performs more type checks before instantiating an Error objectErrorSource::fromArray() to ErrorSource::createFromArray()ErrorSource::createFromArray() performs more type checks before instantiating an ErrorSource objectRelationships::createFromArray() instead of the constructorRelationship::resourceLink to Relationship::firstResourceLinkFIXED:
CHANGED:
Link::createFromArray() performs type checks before instantiating a Link objectResourceObject::createFromArray() instead of the constructorResourceObject::createFromArray() performs more type checks before instantiating a ResourceObjectDocument::toArray()ResourceObject::toArray()REMOVED:
Links::hasLinks() methodJsonApi::hasJsonApi() methodFIXED:
version, "1.0" will be the default now as per the specLinks::hasLink() and thus Links::hasSelf() etc. methods resulted in an infinite loopRelationship::toArray() showed the "data" member incorrectly for to-one relationshipsADDED:
JsonApiResource::setRelationship() methodLinks::hasAnyLinks() methodCHANGED:
JsonApiResource::setToOneRelationship() instead of JsonApiResource::setToOneResourceIdentifier()JsonApiResource::setToManyRelationship() instead of JsonApiResource::addToManyResourceIdentifier()Document::toArray()ResourceObjects (removed get prefixes)JsonApiRelationshipInterface class to RelationshipInterfaceJsonApiResource class to ResourceObjectJsonApiToManyRelationship class to ToManyRelationshipJsonApiToOneRelationship class to ToOneRelationshipFIXED:
JsonApiResource didn't add relationships to the requesttype constructor argument became required for JsonApiResourceJsonApiRequestBuilder::setPort() didn't do anythingJsonApiRequestBuilder::setJsonApi*() methods didn't work as intendedJsonApiRequestBuilder::update() will now set the request method to "PATCH" instead of "UPDATE"Document::toArray()Document::toArray()ResourceObjects::isSingleResourceDocument() Document::isResourceDocument() returned wrong value when "data" member was nullResourceObjects::hasAnyPrimaryResources() returned wrong value when "data" member was nullCHANGED:
JsonApiAsyncClient::requestConcurrent() to JsonApiAsyncClient::sendConcurrentAsyncRequests()Document::hasPrimaryResources() to Docment::hasAnyPrimaryResources()Document::hasIncludedResources() to Docment::hasAnyIncludedResources()JsonApiRequestBuilderADDED:
CHANGED:
Resource to ResourceObject and Resources to ResourceObjectsADDED:
JsonApiResource::setAttributes() methodCHANGED:
JsonApiClient into JsonApiAsyncClientJsonApiClient::request() method was renamed to JsonApiClient::sendRequest()JsonApiAsyncClient::requestAsync() method was renamed to JsonApiAsyncClient::sendAsyncRequest()FIXED:
ADDED:
JsonApiClientDocument::error($number) utility method to retrieve only one errorResponse::isSuccessful() to determine if the response was successfulResponse::isSuccessfulDocument() to determine if the response was successful and contains a documentCHANGED:
FIXED:
Response::document() could have raised a fatal errorJsonApiResponse::isSuccessful()ADDED:
CHANGED:
How can I help you explore Laravel packages today?