Skip to content

Releases: netglue/prismic-php-kit

4.3.1 Numbers can be integers too

12 Mar 08:38
c66eb07
Compare
Choose a tag to compare

Add Boolean Fragment Type

12 Mar 15:18
8a0a4fe
Compare
Choose a tag to compare

4.3.0 - 2020-03-12

Added

  • #8 and #9 adds a new fragment type for boolean values, currently in beta at Prismic.

Changed

  • Nothing.

Deprecated

  • Nothing.

Removed

  • Nothing

prismic-php-kit 4.2.2

26 Nov 10:11
4.2.2
2a98f08
Compare
Choose a tag to compare

Added

  • Nothing.

Changed

  • Nothing.

Deprecated

  • Nothing.

Removed

  • #6 removes the \Prismic\Api::reloadApiData() method - whilst
    this is a BC break. It was only introduced in 4.1.0 a couple of weeks ago so it's unlikely that anyone is even aware
    it was there in the first place.

Fixed

  • #6 removes the need to reloadApiData after a cache bust by
    simply not keeping a reference to the Api Data payload in memory.

prismic-php-kit 4.2.1

16 Nov 11:18
9f9874e
Compare
Choose a tag to compare

Added

  • Nothing.

Changed

  • Nothing.

Deprecated

  • Nothing.

Removed

  • Nothing.

Fixed

  • #5 ensures that the preview token is validated before any attempt
    is made to retrieve a ref from the api.

prismic-php-kit 4.2.0

15 Nov 17:51
d242c66
Compare
Choose a tag to compare

Added

  • #4 Adds a new Exception ExpiredPreviewTokenException that is
    thrown during Api::previewSession()

Changed

  • #4 Changes behaviour of Api::previewSession() by throwing an
    ExpiredPreviewTokenException in situations where a preview token has expired.

Deprecated

  • Nothing.

Removed

  • Nothing.

Fixed

  • Nothing.

Allow re-load/re-fetch of Master Api Data

12 Nov 21:33
7991fd9
Compare
Choose a tag to compare

Fixed

  • Nothing

Added

  • Added method void \Prismic\Api::reloadApiData() to forcefully re-fetch the api data from the remote service. You
    would not normally need to call this in a standard web server environment because simply flushing the cache would be
    sufficient. However, in a cli environment handling multiple requests, flushing the cache will not free the
    \Prismic\ApiData instance in memory, so you'd need to call this method during perhaps a web-hook triggered cache
    busting event…

Deprecated

  • Nothing

Removed

  • Nothing

Preserve Line Breaks in Content

18 Jul 11:50
13b29b9
Compare
Choose a tag to compare

HTML serializers for StructuredText now preserve line breaks in content by replacing new lines with
tags

V4

12 Jun 08:52
7d832be
Compare
Choose a tag to compare
V4

Initial release of this fork. There's a lot of breaking changes compared to the 3.x series and due to these significant changes there might be some awkward stuff to come in the future so keep an eye on the changelog…

Initial release highlights include:

  • \Psr\Cache is now used for caching
  • Min version of PHP is now >= 7.1
  • strict_types throughout with scalar type hints and return types
  • Much improved test coverage ~ 95%
  • Introduced document hydration so you can implement concrete content models in code
  • Re-Introduced typed content fragments such as RichText, Date, Embed, GeoPoint etc.
  • Transparent support for both V1 and V2 Apis
  • Default document implementation can retrieve it's own relationships such as alternative translations
  • Guaranteed to throw predictable exceptions all implementing the same interface in the same namespace

Future changes

The LinkResolver as a concept is now pretty much a hard dependency for \Prismic\Api but relies on setter injection. The good thing is that this enables other elements, such as RichText to be serialised to HTML without needing to keep a link resolver handy all the time, i.e. $textFragment->asHtml() instead of $textFragment->asHtml($linkResolver) which can be annoying in views, but the bad thing is that it's a hidden dependency. At some point this needs to be made more friendly…

The same could be said of the Hydrator - The defaults are perfectly acceptable and they are straight-forward to override but it's still a hidden dependency.

In future, I'm considering providing ready to use factories and configuration suitable for Psr\Container - it's good to practice dependency injection and everyone's doing it right?

\Prismic\Api Notable Gotchas

  • Methods getByID, getByIDs, getByUID have been camel-cased to getById, getByIds and getByUid
  • Method previewSession signature has changed. A Link resolver is no longer required: previewSession( string $token, string $defaultUrl) : string
  • Named constructor get() has changed to `Api::get( string $action, string $accessToken, Client $httpClient, \Psr\Cache\CacheItemPoolInterface $cache)

v4 RC 1

31 May 10:10
d166715
Compare
Choose a tag to compare
v4 RC 1 Pre-release
Pre-release

Initial RC for this fork