Releases: netglue/prismic-client
Releases · netglue/prismic-client
prismic-client 0.4.0
Added
- BC Break:
Prismic\ResultSet\ResultSetFactory
declares a new methodwithJsonObject
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 aPsr\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
Added
- Extra
$flags
parameter to\Prismic\Json::encode()
to allow passing standard Json extension options tojson_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
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
Added
- Nothing.
Changed
- Nothing.
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- Fixed #5
Predicate::hasTag()
is now correctly implemented.
prismic-client 0.3.4
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 thatdocument.tags
must be given an array when you use theat
predicate.
Changed
- Require version 1.8 for HTTP Plug discovery lib, altering API unit test to not use reflection to retrieve default strategies.
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- Nothing.
prismic-client 0.3.3
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
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
Added
- Nothing.
Changed
- Changed and documented the exception type thrown in
Api::previewSession()
toInvalidPreviewToken
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
Added
- Nothing.
Changed
- Changed the
Api::get()
method so that it wraps exceptions caused by failures to locate HTTP related dependencies inPrismic\Exception\PrismicError
exceptions. This allows library consumers to simplify exception handling. - Predicates can now be safely rehydrated in a round trip using
eval
andvar_export
which is useful if you want to store predicates as configuration.
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- Nothing.
prismic-client 0.2.0
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.