Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

zf-hal 1.4.0

Compare
Choose a tag to compare
@weierophinney weierophinney released this 07 Jul 17:54
· 115 commits to master since this release

Added

  • #142 and #145 add support for Zend Framework v3 component releases, retaining support for v2 versions as well; specifically, zend-eventmanager, zend-mvc, zend-stdlib, and zend-servicemanager v3 may now be used with this module.

  • #142 and #145 add support for PHP 7.

  • #99 adds accessors for the $entity and $id properties of ZF\Hal\Entity.

  • #124 adds a new interface ZF\Hal\Link\SelfLinkInjectorInterface and default implementation ZF\Hal\Link\SelfLinkInjector; these are now used as collaborators to the Hal plugin to simplify internal logic, and allow users to provide alternate strategies for generating the self relational link.

  • #125 adds a new service, ZF\Hal\Link\LinkUrlBuilder. This class composes the ServerUrl and Url view helpers in order to provide the functionality required to build a route-based link URL. The Hal plugin now consumes this instead of implementing the logic internally.

    The upshot is: you can replace the URL generation semantics for your application entirely by pointing the service to your own implementation.

  • #125 adds service factories for each of the LinkExtractor and LinkCollectionExtractor, which now allows users to provide substitutions for their functionality. (Extractors pull links and link collections in order to generate the relational links for a HAL-JSON payload.)

  • #139 adds the new method Hal::resetEntityHashStack(); this method can be used when rendering multiple responses and/or payloads within the same request cycle, in order to allow re-using the same entity instances (normally, they would be skipped when discovered on subsequent iterations).

Deprecated

  • #99 deprecates usage of property access on ZF\Hal\Entity to retrieve the identifier and underlying entity instance.
  • #125 deprecates the usage of Hal::setServerUrlHelper() and Hal::setUrlHelper(); these will each now raise an exception indicating the user should use a LinkUrlBuilder for URL generation instead.
  • #125 deprecates passing a ServerUrlHelper and UrlHelper to the constructor of ZF\Hal\Exctractor\LinkExtractor; it now expects a LinkUrlBuilder instance instead. (This class is primarily an internal detail of the Hal plugin.)

Removed

  • #145 removes support for PHP 5.5.

Fixed

  • Nothing.