master environment.Atolye15\Delivery\ResourcePool\Standard, which is a lightweight implemention and only caches space, environment and content types, and Atolye15\Delivery\ResourcePool\Extended, which also keeps a reference to entries and assets. The latter class was known as Atolye15\Delivery\ResourcePool, which has now been deprecated and will be removed in version 5.0. The Extended class is the default one, as it is designed to work with regular PHP requests. In order to use the Standard pool, you must enable it through the ClienOptions class:
$options = ClientOptions::create()
->withLowMemoryResourcePool();
$client = new Client($token, $spaceId, $environmentId, $options);
As this resource pool provides no caching (and include values are now skipped, for this reason), it might cause the SDK to make more API calls, so its used is discouraged for regular web applications.locale=*. Now this is fixed, and the entry will use either its current locale, if set, or the the locale=* if no locales are currently configured.LinkResolver::resolveLinkCollection() was changed from string $locale = null to array $parameters = [].ATTENTION: This release contains breaking changes. Please take extra care when updating to this version. See the upgrade guide for more.
Client constructor signature was changed: public function __construct(string $accessToken, string $spaceId, string $environmentId = 'master', \Atolye15\Delivery\ClientOptions $options = null). All options that were previously handled through the remaining parameters or the options array can now be set using the ClientOptions object. See the upgrade guide for a more detailed explanation. [BREAKING]Client object now implements Atolye15\Delivery\Client\ClientInterface. We encourage users to type hint against this interface rather than against the concrete implementation.contentful/core package. We encouraged users to check its changelog and upgrade guide.Query::where() method used to accept a third parameter, which was used to specify the type of search (for instance with operators near or lte). As many users did not know this and appended the operator to the first parameter of where(), now the third parameter was removed. [BREAKING]SystemProperties class with many nullable properties, now every resource type has its own system properties implementation. For instance, the calling Atolye15\Delivery\Resource\Entry::getSystemProperties() will now return an instance of Atolye15\Delivery\SystemProperties\Entry, which contains only the necessary methods. [BREAKING]Entry::has() when checking against a link by default checks if the link can also be resolved. This behavior can be turned off by setting the third parameter to false.Client to a LinkResolver object. The client still provides a convenience resolveLink() method which forwards the call.Client::isPreview() was renamed Client::isPreviewApi(). Its opposite, Client::isDeliveryApi(), was also added. [BREAKING]Atolye15\Delivery\Mapper\BaseMapper::hydrate() was removed. If using a custom mapper, you can use $this->hydrator->hydrate(object|string $target, array $data). [BREAKING]CacheItemPoolFactoryInterface now enforces the return type. [BREAKING]InstanceRepository was renamed ResourcePool, and method Client::getInstanceRepository() was renamed Client::getResourcePool(). [BREAKING]ResourcePool::generateKey() contained the $api parameter, which was removed as a resource pool object is supposed to operate within a single API context. [BREAKING]$preview to $isDeliveryApi, which is the opposite value. However, users should never build the manager themselves, as they should access it through Client::getSyncronizationManager(). [BREAKING]Entry::getSomething() with an invalid field previously resulte in an error being triggered. This behavior was fixed and now a regular InvalidArgumentException is thrown. [BREAKING]getEntries or getAssets, it will intercept calls made with getEntry and getAsset, including those being made when resolving a link from an entry. You can enable this either using the CLI commands with the --cache-content flag, or passing 'cacheContent' => true to the $options array in the client constructor (requires 'autoWarmup' to also be set to true).getSpaceId and getEnvironmentId to the Client.-) as a separator in cache keys. However, some more restrictive PSR-6 implementations do not allow that, so it's been changed to a dot (.) instead.Maintenance release.
has($field) method (with a magic hasX() equivalent) which returns whether an entry has the given field currently loaded.__call method now allow for access also using the actual field name, without get prefix (for instance $entry->title()). This was done to further improve compatibility on edge cases with templating engines such as Twig.ATTENTION: This release contains breaking changes. Please take extra care when updating to this version. See the upgrade guide for more.
ResourceBuilder now supports custom data type matchers so users can create their own custom resource classes.Atolye15\Delivery\Resource\BaseResource, which implements Contentful\Core\Resource\ResourceInterface. You can use these two classes for type hinting.__get ($entry->title) and using the ArrayAccess interface ($field['title']).Unknown, and it will also trigger a silenced error of level E_USER_WARNING (so users can implement some custom logic for handling the issue, without causing any problems to the actual execution). When retrieving the unknown field, it will be returned as it was fetched from the API, so no conversion will be made. This means that dates will be returned as strings, links will be returned as simple arrays, etc. This solution was implemented to prevent the SDK from crashing during those (hopefully) brief moments where the cache is out of sync with Contentful, and it should not be relied upon for actually handling the fields in a proper way.DynamicEntry, Asset, ContentType, ContentTypeField, Space, and Locale, DeletedAsset, 'DeletedEntry', and DeletedContentType classes have been moved to a different namespace. Please check the the upgrade guide for more details. [BREAKING]Atolye15\Delivery namespace have been moved to a separate package called contentful-core.php.baseUri instead of uriOverride, to be more consistent with the one used in Guzzle. [BREAKING]Client::getMessages(), which returns an array of Contentful\Core\Api\Message. [BREAKING]Atolye15\Delivery\InstanceRepository. This class also wraps the PSR-6 cache pool.Client::reviveJson() is now called Client::parseJson() to better reflect its meaning.master environment. When trying to perform sync-related operations on a client which is configured with any other environment, a \RuntimeException will be thrown.locale=*, the locale fallback chain will not be used. The Sync API defaults to using all locales, so it's not affected. [BREAKING]Atolye15\Delivery\EntryInterface no longer exists. Use Atolye15\Delivery\Resource\Entry for type hinting. [BREAKING]Atolye15\JsonHelper was deprecated in 2.2, and has now been removed. [BREAKING]Atolye15\DateHelper was deprecated in 2.2, and has now been removed. [BREAKING]Atolye15\File\UploadFile was deprecated in 2.1, and has now been removed. Use Contentful\Core\File\RemoteUploadFile instead. [BREAKING]ResourceBuilder. [BREAKING]Asset, ContentType, Entry, and DeletedResource classes previously provided shortcut methods for accessing system properties such as revision, createdAt, etc. These shortcut methods have been removed from the main resource, but they're still accessible through a SystemProperties object. See the upgrade guide for more. [BREAKING]Atolye15\Synchronization\Manager class now provides a convenience method called sync($token = null, Query $query = null) which transparently handles a full sync, instead of having to manually call startSync and continueSync. The method returns instances of Atolye15\Synchronization\Result wrapped in a \Generator object.Atolye15\Exception\BadRequestException.Atolye15\Delivery\Query class now has linksToEntry('<entry_id>') and linksToAsset('<entry_id>') methods. For users on older versions of the SDK, the same operators can be emulated by using $query->where('links_to_entry', '<entry_id>') and $query->where('links_to_asset', '<asset_id>'). DynamicEntry also provides a shortcut in the form $entry->getReferences().[@Symfony](https://github.com/Symfony):risky ruleset is currently implemented, but this could be subject to change in the event of possible incompatibilities. The style check is a mandatory part of CI.[@api](https://github.com/api) or [@internal](https://github.com/internal). If a method is public, it's assumed to be part of the API surface of the SDK, and thus any breaking change to that would require a new major version.symfony/console and symfony/filesystem now also allow version ~4.0.DateHelper::formatForJson() is now deprecated and will be removed in version 3. Use Atolye15\format_date_for_json() instead.JsonHelper::encode() and JsonHelper::decode() are now deprecated and will be removed in version 3. Use GuzzleHttp\json_encode() and GuzzleHttp\json_decode() instead.LogEntry now modifies the exception stack trace (if present) to prevent problems during serialization.Client to be overridden. This is done in preparation of the upcoming CMA SDK.$options of the Client::request() method now accepts an optional value with key baseUri. This is in preparation for the CMA SDK.LocalUploadFile now handles asset files which have been uploaded to upload.contentful.com but have yet to be processed. This fixes a possible edge case, and it's also done in preparation for the upcoming CMA SDK.Atolye15\Client now includes a getLogger method, for easy access to the logger currently in use.ResourceBuilder.SynchronizationManager::continueSync().ResourceBuilder now correctly handles locale when building referenced assets.Asset::getFile now uses fallback chain logic to determine the locale to use.ATTENTION: This release contains breaking changes. Please take extra care when updating to this version.
Link implements the JsonSerializable interface. This is done in preparation for the upcoming CMA SDK.UploadFile class now manages files which aren't yet processed (for Preview API) [BREAKING]. Atolye15\Delivery\Asset::getFile now returns Atolye15\Delivery\File\FileInterface instead of one of File|ImageFile. If you were type hinting on either one of those, please now use the interface or add UploadFile to the possible types.ApiException. This class gives access to some additional data like, the request, response and request ID.Client to support a future CMA SDK.contentful script used to warm up/clear the cache was not marked as a binary in composer.json and thus not published to vendor/bin.<info> can't be used as part of an Exception message. (#129)Client::request ignored the timer returned in LoggerInterface::getTimer when timing requests.Atolye15\File [BREAKING].
Atolye15\File to Atolye15\File\FileAtolye15\ImageFile to Atolye15\File\ImageFileAtolye15\ImageOptions to Atolye15\File\ImageOptionsResourceArray::getItems to allow access to the values of a ResourceArray as an actual PHP array.X-Contentful-User-Agent header.DeletedEntry::getContentType() to be used with webhooks. (#101)guzzlehttp/psr7 is now 1.4.ATTENTION: This release contains breaking changes. Please take extra care when updating to this version.
Atolye15\Delivery\Link to Atolye15\LinkAtolye15\Delivery\ImageOptions to Atolye15\ImageOptionsAtolye15\Delivery\File to Atolye15\FileAtolye15\Delivery\ImageFile to Atolye15\ImageFileResourceNotFoundException to NotFoundException to match the names the API uses. [BREAKING]Atolye15\Query into an abstract class to promote separation between CDA and CMA SDKs. [BREAKING]getQueryData() and getQueryString() from the various query classes. [BREAKING]FilesystemCache would try to read cached content types from the wrong file name.CacheWarmer wrote incorrect data for content types.Accept header for API versioning. Previously the Content-Type header was set instead.LogEntry would fail if no response has been set.ATTENTION: This release contains breaking changes. Please take extra care when updating to this version.
webp format in the Images API.RateLimitExceededException, InvalidQueryException and AccessTokenInvalidException for more specific error handling. [BREAKING]Client.'*'' when creating the client. This could look
like: new Client($token, $spaceID, false, null, ['defaultLocale => '*'])select operator can now be specified on queries. Thanks @Haehnchen.all operator and passing arrays as $value in Query::where().Asset and Entry instances. [BREAKING]Atolye15\Delivery\Client. Several options are now in an options array. [BREAKING]composer install --prefer-source.BearerToken to make it easier to inject custom Guzzle instances. Thanks @Haehnchen. [BREAKING]null are now treated like they don't exist. Previously they might have causes a
fatal error. Note: This does not 100% match the behaviour of the Contentful API.Query::setLimit was incorrect.startSync was type hinted to the wrong Query class.Initial release
How can I help you explore Laravel packages today?