Releases: woohoolabs/yang
Releases · woohoolabs/yang
1.0.1
ADDED:
ResourceObject::idAndAttributes()
method
1.0.0
ADDED:
- Support for custom serialization
- Ability to configure the
JsonDeserializer
CHANGED:
- Increased minimum PHP version requirement to 7.0
- Renamed
DefaultDeserializer
toJsonDeserializer
- Moved
JsonApiClient
andJsonApiAsyncClient
into theJsonApi\Client
namespace - Moved deserializers into the
JsonApi\Serializer
namespace along with serializers
0.9.0
ADDED:
- Better support for "about" links
CHANGED:
Error::createFromArray()
performs more type checks before instantiating anError
object- Renamed
ErrorSource::fromArray()
toErrorSource::createFromArray()
ErrorSource::createFromArray()
performs more type checks before instantiating anErrorSource
object- Added
Relationships::createFromArray()
instead of the constructor - Renamed
Relationship::resourceLink
toRelationship::firstResourceLink
FIXED:
- Representing error status as string as per the spec
0.8.0
CHANGED:
Link::createFromArray()
performs type checks before instantiating aLink
object- Added a
ResourceObject::createFromArray()
instead of the constructor ResourceObject::createFromArray()
performs more type checks before instantiating aResourceObject
- The "jsonapi" member is always present when using
Document::toArray()
- The "links" member won't be present in a relationship when it is empty when using
ResourceObject::toArray()
REMOVED:
Links::hasLinks()
methodJsonApi::hasJsonApi()
method
FIXED:
- The "jsonapi" member was incorrectly recognized as
jsonApi
- If the "jsonapi" member doesn't define the
version
, "1.0" will be the default now as per the spec - Invocation of
Links::hasLink()
and thusLinks::hasSelf()
etc. methods resulted in an infinite loop Relationship::toArray()
showed the "data" member incorrectly for to-one relationships
0.7.0
ADDED:
- Added
JsonApiResource::setRelationship()
- Unit tests
- Docker support to run tests
Links::hasAnyLinks()
method
CHANGED:
- Added
JsonApiResource::setToOneRelationship()
instead ofJsonApiResource::setToOneResourceIdentifier()
- Added
JsonApiResource::setToManyRelationship()
instead ofJsonApiResource::addToManyResourceIdentifier()
- A
Links
member won't be present in thedata
member when it is empty when usingDocument::toArray()
- Renamed several methods of
ResourceObjects
(removedget
prefixes) - Renamed
JsonApiRelationshipInterface
class toRelationshipInterface
- Renamed
JsonApiResource
class toResourceObject
- Renamed
JsonApiToManyRelationship
class toToManyRelationship
- Renamed
JsonApiToOneRelationship
class toToOneRelationship
FIXED:
JsonApiResource
didn't add relationships to the request- The
type
constructor argument became required forJsonApiResource
JsonApiRequestBuilder::setPort()
didn't do anythingJsonApiRequestBuilder::setJsonApi*()
methods didn't work as intendedJsonApiRequestBuilder::update()
will now set the request method to "PATCH" instead of "UPDATE"- Error objects are correctly listed under the
errors
member when usingDocument::toArray()
- Correctly transforming
included
member when usingDocument::toArray()
ResourceObjects::isSingleResourceDocument()
Document::isResourceDocument()
returned wrong value Whendata
member was nullResourceObjects::hasAnyPrimaryResources()
returned wrong value Whendata
member was null
0.6.0
CHANGED:
- Renamed
JsonApiAsyncClient::requestConcurrent()
toJsonApiAsyncClient::sendConcurrentAsyncRequests()
- Renamed
Document::hasPrimaryResources()
toDocment::hasAnyPrimaryResources()
- Renamed
Document::hasIncludedResources()
toDocment::hasAnyIncludedResources()
- Renamed almost all methods in
JsonApiRequestBuilder
- Do not sort included resources by type and id
- Improved documentation
0.5.0
ADDED:
- Support for custom deserialization
CHANGED:
- Updated minimum PHP version requirement to 5.6
- Renamed
Resource
toResourceObject
andResources
toResourceObjects
0.4.0
ADDED:
- Support for HTTPlug library to abstract the HTTP client away
JsonApiResource::setAttributes()
method
CHANGED:
- Moved asyncronous functionalities of
JsonApiClient
intoJsonApiAsyncClient
JsonApiClient::request()
method was renamed toJsonApiClient::sendRequest()
JsonApiAsyncClient::requestAsync()
method was renamed toJsonApiAsyncClient::sendAsyncRequest()
FIXED:
- Error when serialized response body is apparently empty even though it contains data
0.3.0
ADDED:
- Ability to define options for
JsonApiClient
Document::error($number)
utility method to retrieve only one errorResponse::isSuccessful()
to determine if the response was successfulResponse::isSuccessful()
to determine if the response was successful and contains a document- Support for PHPUnit 5.0
CHANGED:
- Improved performance
FIXED:
- PHP version constraint in composer.json
- If the response didn't contain a valid JSON,
Response::document()
could have raised a fatal error - The type and id weren't included in the request body
- Empty responses weren't considered successful by
JsonApiResponse::isSuccessful()
- Empty relationship data can now be discovered
- Sorting does not happen on resource ID
0.2.0
ADDED:
- Ability to send multiple async requests concurrently
- Ability to determine the type of documents and relationships
CHANGED:
- Shortened getter names (removed the "get" prefix)