All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Add support for PHP 8.4
- Dropped support for PHP 7.4 and PHP 8.0
\Art4\Accessable::get()
will addmixed
as a native return type declaration in 2.0.0, do the same in your implementation now to avoid errors.\Art4\Manager::getParam()
will addmixed
as a native return type declaration in 2.0.0, do the same in your implementation now to avoid errors.
- Add support for PHP 8.2 and PHP 8.3
- Providing Argument #1 ($key) in
\Art4\JsonApiClient\Accessable::has()
not asint|string
is deprecated and will throw an Exception in 2.0.0. - Providing Argument #1 ($key) in
\Art4\JsonApiClient\Accessable::get()
not asint|string
is deprecated and will throw an Exception in 2.0.0.
- Added type hints for parameters and return types in internal and final classes
- New tests for improving backward compatibility in interfaces
- Add support for PHP 8.1
- Switched from Travis-CI to Github Actions
\Art4\JsonApiClient\Accessable::has()
will addbool
as a native return type declaration in 2.0.0, do the same in your implementation now to avoid errors.\Art4\JsonApiClient\Accessable::getKeys()
will addarray
as a native return type declaration in 2.0.0, do the same in your implementation now to avoid errors.\Art4\JsonApiClient\Exception\Exception
will extend\Throwable
in 2.0.0, do the same in your implementation now to avoid errors.\Art4\JsonApiClient\Factory::make()
methods first parameter signature will bestring
in 2.0.0.\Art4\JsonApiClient\Factory::make()
will add\Art4\JsonApiClient\Accessable
as a native return type declaration in 2.0.0, do the same in your implementation now to avoid errors.\Art4\JsonApiClient\Input\Input::getAsObject()
will add\stdClass
as a native return type declaration in 2.0.0, do the same in your implementation now to avoid errors.\Art4\JsonApiClient\Manager::parse()
will add\Art4\JsonApiClient\Accessable
as a native return type declaration in 2.0.0, do the same in your implementation now to avoid errors.\Art4\JsonApiClient\Manager::getFactory()
will add\Art4\JsonApiClient\Factory
as a native return type declaration in 2.0.0, do the same in your implementation now to avoid errors.\Art4\JsonApiClient\Manager::getParam()
methods first parameter signature will bestring
in 2.0.0.\Art4\JsonApiClient\Serializer\Serializer::serialize()
will add?array
as a native return type declaration in 2.0.0, do the same in your implementation now to avoid errors.
- Support for PHP 8.0 added
- Support for PHP 5.6, 7.0, 7.1, 7.2 and 7.3 dropped, PHP 7.4 is now required
- BREAKING: Providing the fields
type
orid
in a resource not as a string throws a\Art4\JsonApiClient\Exception\ValidationException
, provide them always as strings instead
- BREAKING:
Art4\JsonApiClient\AccessInterface
removed, useArt4\JsonApiClient\Accessable
instead - BREAKING:
Art4\JsonApiClient\Attributes
removed, useArt4\JsonApiClient\V1\Attributes
instead - BREAKING:
Art4\JsonApiClient\AttributesInterface
removed, useArt4\JsonApiClient\Accessable
instead - BREAKING:
Art4\JsonApiClient\Document
removed, useArt4\JsonApiClient\V1\Document
instead - BREAKING:
Art4\JsonApiClient\DocumentInterface
removed, useArt4\JsonApiClient\Accessable
instead - BREAKING:
Art4\JsonApiClient\DocumentLink
removed, useArt4\JsonApiClient\V1\DocumentLink
instead - BREAKING:
Art4\JsonApiClient\DocumentLinkInterface
removed, useArt4\JsonApiClient\Accessable
instead - BREAKING:
Art4\JsonApiClient\ElementInterface
removed, useArt4\JsonApiClient\Element
instead - BREAKING:
Art4\JsonApiClient\Error
removed, useArt4\JsonApiClient\V1\Error
instead - BREAKING:
Art4\JsonApiClient\ErrorCollection
removed, useArt4\JsonApiClient\V1\ErrorCollection
instead - BREAKING:
Art4\JsonApiClient\ErrorCollectionInterface
removed, useArt4\JsonApiClient\Accessable
instead - BREAKING:
Art4\JsonApiClient\ErrorInterface
removed, useArt4\JsonApiClient\Accessable
instead - BREAKING:
Art4\JsonApiClient\ErrorLink
removed, useArt4\JsonApiClient\V1\ErrorLink
instead - BREAKING:
Art4\JsonApiClient\ErrorLinkInterface
removed, useArt4\JsonApiClient\Accessable
instead - BREAKING:
Art4\JsonApiClient\ErrorSource
removed, useArt4\JsonApiClient\V1\ErrorSource
instead - BREAKING:
Art4\JsonApiClient\ErrorSourceInterface
removed, useArt4\JsonApiClient\Accessable
instead - BREAKING:
Art4\JsonApiClient\Jsonapi
removed, useArt4\JsonApiClient\V1\Jsonapi
instead - BREAKING:
Art4\JsonApiClient\JsonapiInterface
removed, useArt4\JsonApiClient\Accessable
instead - BREAKING:
Art4\JsonApiClient\Link
removed, useArt4\JsonApiClient\V1\Link
instead - BREAKING:
Art4\JsonApiClient\LinkInterface
removed, useArt4\JsonApiClient\Accessable
instead - BREAKING:
Art4\JsonApiClient\Meta
removed, useArt4\JsonApiClient\V1\Meta
instead - BREAKING:
Art4\JsonApiClient\MetaInterface
removed, useArt4\JsonApiClient\Accessable
instead - BREAKING:
Art4\JsonApiClient\Relationship
removed, useArt4\JsonApiClient\V1\Relationship
instead - BREAKING:
Art4\JsonApiClient\RelationshipCollection
removed, useArt4\JsonApiClient\V1\RelationshipCollection
instead - BREAKING:
Art4\JsonApiClient\RelationshipCollectionInterface
removed, useArt4\JsonApiClient\Accessable
instead - BREAKING:
Art4\JsonApiClient\RelationshipInterface
removed, useArt4\JsonApiClient\Accessable
instead - BREAKING:
Art4\JsonApiClient\RelationshipLink
removed, useArt4\JsonApiClient\V1\RelationshipLink
instead - BREAKING:
Art4\JsonApiClient\RelationshipLinkInterface
removed, useArt4\JsonApiClient\Accessable
instead - BREAKING:
Art4\JsonApiClient\ResourceCollection
removed, useArt4\JsonApiClient\V1\ResourceCollection
instead - BREAKING:
Art4\JsonApiClient\ResourceCollectionInterface
removed, useArt4\JsonApiClient\Accessable
instead - BREAKING:
Art4\JsonApiClient\ResourceIdentifier
removed, useArt4\JsonApiClient\V1\ResourceIdentifier
instead - BREAKING:
Art4\JsonApiClient\ResourceIdentifierCollection
removed, useArt4\JsonApiClient\V1\ResourceIdentifierCollection
instead - BREAKING:
Art4\JsonApiClient\ResourceIdentifierCollectionInterface
removed, useArt4\JsonApiClient\Accessable
instead - BREAKING:
Art4\JsonApiClient\ResourceIdentifierInterface
removed, useArt4\JsonApiClient\Accessable
instead - BREAKING:
Art4\JsonApiClient\ResourceItem
removed, useArt4\JsonApiClient\V1\ResourceItem
instead - BREAKING:
Art4\JsonApiClient\ResourceItemInterface
removed, useArt4\JsonApiClient\Accessable
instead - BREAKING:
Art4\JsonApiClient\ResourceItemLink
removed, useArt4\JsonApiClient\V1\ResourceItemLink
instead - BREAKING:
Art4\JsonApiClient\ResourceItemLinkInterface
removed, useArt4\JsonApiClient\Accessable
instead - BREAKING:
Art4\JsonApiClient\ResourceNull
removed, useArt4\JsonApiClient\V1\ResourceNull
instead - BREAKING:
Art4\JsonApiClient\ResourceNullInterface
removed, useArt4\JsonApiClient\Accessable
instead - BREAKING:
Art4\JsonApiClient\Utils\AccessKey
removed - BREAKING:
Art4\JsonApiClient\Utils\AccessTrait
removed - BREAKING:
Art4\JsonApiClient\Utils\DataContainer
removed - BREAKING:
Art4\JsonApiClient\Utils\DataContainerInterface
removed - BREAKING:
Art4\JsonApiClient\Utils\Factory
removed, useArt4\JsonApiClient\V1\Factory
instead - BREAKING:
Art4\JsonApiClient\Utils\FactoryInterface
removed, useArt4\JsonApiClient\Factory
instead - BREAKING:
Art4\JsonApiClient\Utils\FactoryManagerInterface
removed - BREAKING:
Art4\JsonApiClient\Utils\Helper::decodeJson()
removed, useArt4\JsonApiClient\Input\ResponseStringInput::getAsObject()
instead - BREAKING:
Art4\JsonApiClient\Utils\Helper
removed, useArt4\JsonApiClient\Helper\Parser
instead - BREAKING:
Art4\JsonApiClient\Utils\Manager
removed, useArt4\JsonApiClient\Manager\ErrorAbortManager
instead - BREAKING:
Art4\JsonApiClient\Utils\ManagerInterface
removed, useArt4\JsonApiClient\Manager
instead
- Relationship links can be an object
- Providing the fields
type
orid
in a resource not as a string will be throw a ValidationException in v1.0, provide them always as strings instead
- Support for PHP 7.3 added
- New class
Art4\JsonApiClient\Helper\Parser
to parse or validate a JSON API string - New class
Art4\JsonApiClient\Manager\ErrorAbortManager
to parse a JSON API input - New class
Art4\JsonApiClient\Serializer\ArraySerializer
to create an array from anArt4\JsonApiClient\Accessable
- New class
Art4\JsonApiClient\V1\Attributes
to represent an Attributes element - New class
Art4\JsonApiClient\V1\Document
to represent a Document element - New class
Art4\JsonApiClient\V1\DocumentLink
to represent a DocumentLink element - New class
Art4\JsonApiClient\V1\Error
to represent an Error element - New class
Art4\JsonApiClient\V1\ErrorCollection
to represent an ErrorCollection element - New class
Art4\JsonApiClient\V1\ErrorLink
to represent an ErrorLink element - New class
Art4\JsonApiClient\V1\ErrorSource
to represent an ErrorSource element - New class
Art4\JsonApiClient\V1\Jsonapi
to represent a Jsonapi element - New class
Art4\JsonApiClient\V1\Link
to represent a Link element - New class
Art4\JsonApiClient\V1\Meta
to represent a Meta element - New class
Art4\JsonApiClient\V1\Relationship
to represent a Relationship element - New class
Art4\JsonApiClient\V1\RelationshipCollection
to represent a RelationshipCollection element - New class
Art4\JsonApiClient\V1\RelationshipLink
to represent a RelationshipLink element - New class
Art4\JsonApiClient\V1\ResourceCollection
to represent a ResourceCollection element - New class
Art4\JsonApiClient\V1\ResourceIdentifier
to represent a ResourceIdentifier element - New class
Art4\JsonApiClient\V1\ResourceIdentifierCollection
to represent a ResourceIdentifierCollection element - New class
Art4\JsonApiClient\V1\ResourceItem
to represent a ResourceItem element - New class
Art4\JsonApiClient\V1\ResourceItemLink
to represent a ResourceItemLink element - New class
Art4\JsonApiClient\V1\ResourceNull
to represent a ResourceNull element
- Support for PHP 5.5 dropped, PHP >=5.6 is now required
Art4\JsonApiClient\AccessInterface::asArray()
will be removed in v1.0, useArt4\JsonApiClient\Serializer\ArraySerializer::serialize()
insteadArt4\JsonApiClient\AccessInterface
will be removed in v1.0, useArt4\JsonApiClient\Accessable
insteadArt4\JsonApiClient\Attributes
will be removed in v1.0, useArt4\JsonApiClient\V1\Attributes
insteadArt4\JsonApiClient\AttributesInterface
will be removed in v1.0, useArt4\JsonApiClient\Accessable
insteadArt4\JsonApiClient\Document
will be removed in v1.0, useArt4\JsonApiClient\V1\Document
insteadArt4\JsonApiClient\DocumentInterface
will be removed in v1.0, useArt4\JsonApiClient\Accessable
insteadArt4\JsonApiClient\DocumentLink
will be removed in v1.0, useArt4\JsonApiClient\V1\DocumentLink
insteadArt4\JsonApiClient\DocumentLinkInterface
will be removed in v1.0, useArt4\JsonApiClient\Accessable
insteadArt4\JsonApiClient\ElementInterface
will be removed in v1.0, useArt4\JsonApiClient\Element
insteadArt4\JsonApiClient\Error
will be removed in v1.0, useArt4\JsonApiClient\V1\Error
insteadArt4\JsonApiClient\ErrorCollection
will be removed in v1.0, useArt4\JsonApiClient\V1\ErrorCollection
insteadArt4\JsonApiClient\ErrorCollectionInterface
will be removed in v1.0, useArt4\JsonApiClient\Accessable
insteadArt4\JsonApiClient\ErrorInterface
will be removed in v1.0, useArt4\JsonApiClient\Accessable
insteadArt4\JsonApiClient\ErrorLink
will be removed in v1.0, useArt4\JsonApiClient\V1\ErrorLink
insteadArt4\JsonApiClient\ErrorLinkInterface
will be removed in v1.0, useArt4\JsonApiClient\Accessable
insteadArt4\JsonApiClient\ErrorSource
will be removed in v1.0, useArt4\JsonApiClient\V1\ErrorSource
insteadArt4\JsonApiClient\ErrorSourceInterface
will be removed in v1.0, useArt4\JsonApiClient\Accessable
insteadArt4\JsonApiClient\Jsonapi
will be removed in v1.0, useArt4\JsonApiClient\V1\Jsonapi
insteadArt4\JsonApiClient\JsonapiInterface
will be removed in v1.0, useArt4\JsonApiClient\Accessable
insteadArt4\JsonApiClient\Link
will be removed in v1.0, useArt4\JsonApiClient\V1\Link
insteadArt4\JsonApiClient\LinkInterface
will be removed in v1.0, useArt4\JsonApiClient\Accessable
insteadArt4\JsonApiClient\Meta
will be removed in v1.0, useArt4\JsonApiClient\V1\Meta
insteadArt4\JsonApiClient\MetaInterface
will be removed in v1.0, useArt4\JsonApiClient\Accessable
insteadArt4\JsonApiClient\Relationship
will be removed in v1.0, useArt4\JsonApiClient\V1\Relationship
insteadArt4\JsonApiClient\RelationshipCollection
will be removed in v1.0, useArt4\JsonApiClient\V1\RelationshipCollection
insteadArt4\JsonApiClient\RelationshipCollectionInterface
will be removed in v1.0, useArt4\JsonApiClient\Accessable
insteadArt4\JsonApiClient\RelationshipInterface
will be removed in v1.0, useArt4\JsonApiClient\Accessable
insteadArt4\JsonApiClient\RelationshipLink
will be removed in v1.0, useArt4\JsonApiClient\V1\RelationshipLink
insteadArt4\JsonApiClient\RelationshipLinkInterface
will be removed in v1.0, useArt4\JsonApiClient\Accessable
insteadArt4\JsonApiClient\ResourceCollection
will be removed in v1.0, useArt4\JsonApiClient\V1\ResourceCollection
insteadArt4\JsonApiClient\ResourceCollectionInterface
will be removed in v1.0, useArt4\JsonApiClient\Accessable
insteadArt4\JsonApiClient\ResourceIdentifier
will be removed in v1.0, useArt4\JsonApiClient\V1\ResourceIdentifier
insteadArt4\JsonApiClient\ResourceIdentifierCollection
will be removed in v1.0, useArt4\JsonApiClient\V1\ResourceIdentifierCollection
insteadArt4\JsonApiClient\ResourceIdentifierCollectionInterface
will be removed in v1.0, useArt4\JsonApiClient\Accessable
insteadArt4\JsonApiClient\ResourceIdentifierInterface
will be removed in v1.0, useArt4\JsonApiClient\Accessable
insteadArt4\JsonApiClient\ResourceItem
will be removed in v1.0, useArt4\JsonApiClient\V1\ResourceItem
insteadArt4\JsonApiClient\ResourceItemInterface
will be removed in v1.0, useArt4\JsonApiClient\Accessable
insteadArt4\JsonApiClient\ResourceItemLink
will be removed in v1.0, useArt4\JsonApiClient\V1\ResourceItemLink
insteadArt4\JsonApiClient\ResourceItemLinkInterface
will be removed in v1.0, useArt4\JsonApiClient\Accessable
insteadArt4\JsonApiClient\ResourceNull
will be removed in v1.0, useArt4\JsonApiClient\V1\ResourceNull
insteadArt4\JsonApiClient\ResourceNullInterface
will be removed in v1.0, useArt4\JsonApiClient\Accessable
insteadArt4\JsonApiClient\Utils\AccessKey
will be removed in v1.0Art4\JsonApiClient\Utils\AccessTrait
will be removed in v1.0Art4\JsonApiClient\Utils\DataContainer
will be removed in v1.0Art4\JsonApiClient\Utils\DataContainerInterface
will be removed in v1.0Art4\JsonApiClient\Utils\Factory
will be removed in v1.0, useArt4\JsonApiClient\V1\Factory
insteadArt4\JsonApiClient\Utils\FactoryInterface
will be removed in v1.0, useArt4\JsonApiClient\Factory
insteadArt4\JsonApiClient\Utils\FactoryManagerInterface
will be removed in v1.0Art4\JsonApiClient\Utils\Helper::decodeJson()
will be removed in v1.0, useArt4\JsonApiClient\Input\ResponseStringInput::getAsObject()
insteadArt4\JsonApiClient\Utils\Helper
will be removed in v1.0, useArt4\JsonApiClient\Helper\Parser
insteadArt4\JsonApiClient\Utils\Manager
will be removed in v1.0, useArt4\JsonApiClient\Manager\ErrorAbortManager
insteadArt4\JsonApiClient\Utils\ManagerInterface
will be removed in v1.0, useArt4\JsonApiClient\Manager
instead
0.9.1 - 2017-12-21
- Change Code Style to PSR-2
- Tests in Travis for PHP 7.2 and nightly added
0.9 - 2017-06-06
- New method
Utils\Helper::parseResponseBody()
to parse a JSON API response body - New method
Utils\Helper::isValidResponseBody()
to validate a JSON API response body - New method
Utils\Helper::isValidRequestBody()
to validate a JSON API request body with optional item id
Utils\Helper::parse()
will be removed in v1.0, useUtils\Helper::parseResponseBody()
insteadUtils\Helper::isValid()
will be removed in v1.0, useUtils\Helper::isValidResponseBody()
instead
0.8.1 - 2017-06-01
- Fixed a bug in the decission if a
data
attribute is aResourceItem
orResourceIdentifier
0.8 - 2017-05-29
- New method
Utils\Helper::parseRequestBody()
to parse JSON API with optional item id - Run tests with Travis in PHP 7.1
- Drop support for PHP 5.4
- BREAKING: New method
Utils\ManagerInterface::getConfig()
to get a config value - BREAKING: New method
Utils\ManagerInterface::setConfig()
to set a config value
0.7 - 2016-11-24
- Update license to GPLv3
- BREAKING: Introducing the
ElementInterface
to seperate the parsing from the constructor - BREAKING: Rename
Art4\JsonApiClient\Resource\Collection
toArt4\JsonApiClient\ResourceCollection
- BREAKING: Rename
Art4\JsonApiClient\Resource\CollectionInterface
toArt4\JsonApiClient\ResourceCollectionInterface
- BREAKING: Rename
Art4\JsonApiClient\Resource\Identifier
toArt4\JsonApiClient\ResourceIdentifier
- BREAKING: Rename
Art4\JsonApiClient\Resource\IdentifierInterface
toArt4\JsonApiClient\ResourceIdentifierInterface
- BREAKING: Rename
Art4\JsonApiClient\Resource\IdentifierCollection
toArt4\JsonApiClient\ResourceIdentifierCollection
- BREAKING: Rename
Art4\JsonApiClient\Resource\IdentifierCollectionInterface
toArt4\JsonApiClient\ResourceIdentifierCollectionInterface
- BREAKING: Rename
Art4\JsonApiClient\Resource\Item
toArt4\JsonApiClient\ResourceItem
- BREAKING: Rename
Art4\JsonApiClient\Resource\ItemInterface
toArt4\JsonApiClient\ResourceItemInterface
- BREAKING: Rename
Art4\JsonApiClient\Resource\ItemLink
toArt4\JsonApiClient\ResourceItemLink
- BREAKING: Rename
Art4\JsonApiClient\Resource\ItemLinkInterface
toArt4\JsonApiClient\ResourceItemLinkInterface
- BREAKING: Rename
Art4\JsonApiClient\Resource\NullResource
toArt4\JsonApiClient\ResourceNull
- BREAKING: Rename
Art4\JsonApiClient\Resource\NullResourceInterface
toArt4\JsonApiClient\ResourceNullInterface
- BREAKING: Remove the
Resource\ResourceInterface
and its methods
0.6.3 - 2016-04-26
- Prevent PHP bug in json_decode(), if option JSON_BIGINT_AS_STRING is not implemented, see #28
0.6.2 - 2016-04-15
- links in document object can contain objects, see #26
0.6.1 - 2015-12-28
- New
Resource\ItemLink
object; was seperated fromLink
object
- links and pagination are now parsed spec conform, see #23
0.6 - 2015-11-06
Helper::isValid()
checks if a string is valid JSON API
- BREAKING: pagination links moved from
Pagination
toDocumentLink
andRelationshipLink
- BREAKING: object
Pagination
was removed
0.5 - 2015-10-12
- Dot-notation support in
AccessInterface::has()
andAccessInterface::get()
- Every object has now his own interface, eg.
DocumentInterface
,MetaInterface
orResource\ItemInterface
- BREAKING: object
PaginationLink
was renamed toPagination
- BREAKING: nearly all classes was set to
final
and can't be extended anymore. Implement the new interfaces instead. See also #18.
0.4 - 2015-09-01
- Introduce
Utils\Manager
andUtils\Factory
for injecting own classes into the client - Every object inside the document implements
AccessInterface
AccessInterface
supportsasArray()
for transforming an object into an array- A
Resource\IdentifierCollection
that is either empty or holds onlyResource\Identifier
objects
Relationship::get('data')
returns aResource\IdentifierCollection
object instead of an array
0.3 - 2015-08-24
- Better documentation
Document::get('data')
returns always aResourceInterface
objectDocument::get('error')
returns aErrorCollection
objectDocument::get('included')
returns aResource\Collection
object\Art4\JsonApiClient\Exception\ValidationException
will be thrown instead ofInvalidArgumentException
\Art4\JsonApiClient\Exception\AccessException
will be thrown instead ofRuntimeException
0.2 - 2015-08-12
- Documentation, see folder docs/
- Every object has got a
get()
andhas()
method for better value access - Every object can list his own keys with
keyKeys()
- All old getter like
getMeta()
orhasId()
were removed
0.1 - 2015-08-11
- Validator fits nearly 100% specification
- Full test coverage