Skip to content

Releases: netglue/prismic-client

prismic-client 0.4.0

22 Jun 14:54
0.4.0
e2aa8a7
Compare
Choose a tag to compare

Added

  • BC Break: Prismic\ResultSet\ResultSetFactory declares a new method withJsonObject that is now used to construct Result Sets internally. This is due to implementing caching in the library - keeping BC would have required the provision of a Response factory, or, including a response implementation in order to rehydrate http responses from the cache - this would have added bloat and additional dependencies.

Changed

  • The constructor Api::get() now accepts a Psr\Cache\CacheItemPool as the final argument so that the client can cache response bodies internally. It's not how I wanted things to go, but experience with trying to cache with the HTTP client alone have proven less than ideal in a number of scenarios with several approaches.

Deprecated

  • Nothing.

Removed

  • Nothing.

Fixed

  • Nothing.

prismic-client 0.3.7

18 Jun 15:53
0.3.7
9d3fd18
Compare
Choose a tag to compare

Added

  • Extra $flags parameter to \Prismic\Json::encode() to allow passing standard Json extension options to json_encode.

Changed

  • Nothing.

Deprecated

  • Nothing.

Removed

  • Nothing.

Fixed

  • Encoding of predicate values. Turns out that escaping forward slashes in the query is unacceptable to the api.

prismic-client 0.3.6

18 Jun 13:32
0.3.6
87a7fa4
Compare
Choose a tag to compare

Added

  • Added public constant EXPECTED_ERROR_MESSAGE to PreviewTokenExpired exception so that it's easy to change the expected value if the API changes its response in this scenario.

Changed

  • Added some doc comments to Predicate::similar() and altered the threshold argument name to more clearly communicate its behaviour.
  • Minor change to CS requires a space between different types of use statement.
  • Allow doctrine coding standard 7.0 || 8.0 with updated local overrides.

Deprecated

  • Nothing.

Removed

  • Removed hidden dependency on Psr17 URI Factory Discovery in \Prismic\Query

Fixed

  • Incorrect serialisation of Predicate values, a hangover from the official api client, means that simple operations such as providing a quoted string in a fulltext search, i.e. Predicate::fulltext('document', 'A "Quoted" string') would yield 400 errors from the API. This is now fixed and new tests added prove it.

prismic-client 0.3.5

16 Jun 07:55
0.3.5
7fc5c3e
Compare
Choose a tag to compare

Added

  • Nothing.

Changed

  • Nothing.

Deprecated

  • Nothing.

Removed

  • Nothing.

Fixed

  • Fixed #5 Predicate::hasTag() is now correctly implemented.

prismic-client 0.3.4

15 Jun 14:52
0.3.4
efa2ae2
Compare
Choose a tag to compare

Added

  • Primsic\Predicate::hasTag() which is a helpful shortcut to find documents that are tagged with a specific value. This avoids a very common problem of forgetting that document.tags must be given an array when you use the at predicate.

Changed

Deprecated

  • Nothing.

Removed

  • Nothing.

Fixed

  • Nothing.

prismic-client 0.3.3

15 Jun 12:50
0.3.3
60226e2
Compare
Choose a tag to compare

Added

  • Added count() method to TypicalResultSetBehaviour`.

Changed

  • ResultSet interface now extends countable ensuring that result sets are countable.

Deprecated

  • Nothing.

Removed

  • Nothing.

Fixed

  • Nothing.

prismic-client 0.3.2

12 Jun 10:48
0.3.2
2361449
Compare
Choose a tag to compare

Added

  • Prismic\Exception\PreviewTokenExpired to indicate that the given preview token is considered expired by the remote api.

Changed

  • Documented Api::previewSession() with additional exception information.

Deprecated

  • Nothing.

Removed

  • Nothing.

Fixed

  • Nothing.

prismic-client 0.3.1

12 Jun 09:56
0.3.1
67b0d19
Compare
Choose a tag to compare

Added

  • Nothing.

Changed

  • Changed and documented the exception type thrown in Api::previewSession() to InvalidPreviewToken and also made sure a completely invalid url also throws the same type when for example a token causes an exception in the underlying uri factory.

Deprecated

  • Nothing.

Removed

  • Nothing.

Fixed

  • Nothing.

prismic-client 0.3.0

12 Jun 08:07
0.3.0
76c43bc
Compare
Choose a tag to compare

Added

  • Nothing.

Changed

  • Changed the Api::get() method so that it wraps exceptions caused by failures to locate HTTP related dependencies in Prismic\Exception\PrismicError exceptions. This allows library consumers to simplify exception handling.
  • Predicates can now be safely rehydrated in a round trip using eval and var_export which is useful if you want to store predicates as configuration.

Deprecated

  • Nothing.

Removed

  • Nothing.

Fixed

  • Nothing.

prismic-client 0.2.0

04 Jun 19:52
0.2.0
951549b
Compare
Choose a tag to compare

Added

  • #4 Adds the Prismic\ApiClient interface. Whilst there's only 1 implementation here, it makes it easier to stub the api out in tests if consumers have an interface to type hint on rather than an implementation.

Changed

  • Nothing.

Deprecated

  • Nothing.

Removed

  • #3 \Prismic\Document::slugs(), \Prismic\Document::slug() and references and methods elsewhere to "slugs". The feature is deprecated and replaced with UIDs so there is little point in keeping support for them hanging around in this lib.

Fixed

  • Nothing.