All notable changes to this project will be documented in this file.
This project tries to follow Semantic Versioning since the beginning.
This document mainly describes API changes important to users of this library.
- Dropped PHP 7.x Support: Now requires PHP ^8.0.
- Updated Dependencies: Upgraded guzzlehttp/psr7 and limited firebase/php-jwt to ^6.0 due to security concerns.
- CI Workflow Adjustments: Removed PHP 7.3 and 7.4 from test matrix.
- New Feature: Added
addAutodescription
method in Image class for automatic image descriptions in multiple languages. - Code Simplifications: Streamlined error handling and minor code improvements for better efficiency and clarity.
- Remove support for PHP 7.2
- Add
\Rokka\Client\Core\StackCollection::getCursor()
to get the cursor of a stack collection for paging
- Add support for locked sourceimages via
\Rokka\Client\Image::setProtected
. See the API Docs for details
- Allow firebase/php-jwt 5.0
- Add mimetype attribute to SourceImage object.
- Remove support for PHP 7.1
- Add support for PHP 8.1
- Add support for API Tokens. See the Authentication Guide for details
- Add support for adding/deleting Api Keys of the current User See the Rotate your Api Key Chapter
- Add support for version 2.1 of
guzzlehttp/psr7
- Added
render_base_url
config option to\Rokka\Client\Factory::getImageClient
- Enable MP4 video uploads in TemplateHelper
- Drop PHP 7.0 support. It's ancient.
- Allow deletedDate as search field (some special case here):
- Fix dependency on rokka/utils and make it use "^1.0"
- Added
\Rokka\Client\UriHelper::signUrl($url, $key, $until, $roundDateUpTo)
for easy signing of private images. See Protected Images and Stacks for details. - Added
\Rokka\Client\User::setOrganizationOption()
- Added
\Rokka\Client\Core\Organization::getOptions()
and\Rokka\Client\Core\Organization::getSigningKeys()
- Added support for making SourceImages protected (via
\Rokka\Client\Image::uploadSourceImage()
or\Rokka\Client\Image::setProtected()
) - Added support for adding variables with non-url-supported characters. URLs then contain a
v
query parameter. - Upgraded
guzzlehttp/psr7
minimum requirement to 1.7
- Added support for Guzzle 7 and Symfony Var_Dumper 5
- Added percentage parameter to subject area (thanks to @mms-uret)
- Fixed some phpstan warnings (thanks to @Tobion)
- Replaced Sami by Doctum (thanks to @williamdes )
- Fixed validation of search fields for dynamic and static fields
- Added
\Rokka\Client\TemplateHelper::getSrcSetUrl
for getting a srcset compatible string with responsive urls - Remove support for PHP 5.6 in composer.json
- removed HHVM support on travis tests, therefore HHVM isn't officially supported anymore.
- Added stack variables and expressions support. See the documentation for more details.
- Added optional 3rd boolean parameter to
\Rokka\Client\UriHelper::addOptionsToUriString
and related methods to return short versions foroptions
(o
) andvariables
(v
) - Added optional 3rd boolean parameter to
\Rokka\Client\TemplateHelper::getSrcAttributes
to set the stack operation optionwidth
forresize
. If false, you should add that via the$sizes
parameter, eggetSrcAttributes(['2x' => 'v-w-500]
(if you want to set the width via a stack variable)
- added public
\Rokka\Client\Image::copySourceImages($hashes, $destinationOrg, $overwrite = true, $sourceOrg = '')
to copy multiple images at once (max 100). Improves performance a lot.
- Fixed search for integer user metadata. #62 thanks to @pascalvb
- Added an object for the new dynamic metadata "version". See https://rokka.io//documentation/references/dynamic-metadata.html#version for details
- $option in
\Rokka\Client\Image::uploadSourceImage
and\Rokka\Client\Image::setDynamicMetadata
now takes either a single DynamicMetaData Object or an array with the needed fields. Or an array thereof for multiple new sets.
- Added new membership methods to
\Rokka\Client\User
. It's not totally backwards compatible, but the methods changed were not working as documented. See documentation about users and memberships for details.\Rokka\Client\Factory::getUserClient
takes an organisation and apikey as 1st and 2nd parameter now.\Rokka\Client\Core\Membership
returns now an array withroles
instead of a string withrole
, since a Membership can now multiple roles.- Added
\Rokka\Client\User::getCurrentUserId()
. Returns the user_id for the logged in user. - Added
\Rokka\Client\User::createUserAndMembership()
. - Added
\Rokka\Client\User::listMemberships()
. - Changed parameter order of
\Rokka\Client\User::createMembership()
. Wasn't working before at all. - Changed parameter order of
\Rokka\Client\User::getMembership()
. Wasn't working before at all.
- Added possibility to add a proxy and other guzzle options also to TemplateHelper. See README.md for details.
- Added possibility to add a proxy and other guzzle options to a client. See README.md for details.
- Added
\Rokka\Client\Image::uploadSourceImageByUrl($url, $organization = '', $options = null)
for using an URL instead of the image content for adding new images into rokka. - Added
optimize_source
support for uploading images. See documentation about source images for details. - Refactored
createFromJsonResponse($data, $isArray = false)
tocreateFromJsonResponse($data)
andcreateFromDecodedJsonResponse($data)
- Fix PHP 5.6 compatibility for
\Rokka\Client\Core\Stack::createFromConfig
- Make
\Rokka\Client\TemplateHelper::getImageObject
public.
- Added
\Rokka\Client\Image::restoreSourceImage($hash, $organization)
for restoring deleted images. See documentation about source images for details. - Added
\Rokka\Client\Image::copySourceImage($hash, $destination, $overwrite, $organization)
for copying an image to another organization. See documentation about source images for details. - Added
\Rokka\Client\TemplateHelper
class with many methods for making life easier with template and integration into frameworks and CMS. - Added
\Rokka\Client\Core\DynamicMetadata\MultiAreas
and\Rokka\Client\Core\DynamicMetadata\CropArea
. See documentation about dynamic metadata for details. - Renamed
\Rokka\Client\Core\StackAbstract
to\Rokka\Client\Core\AbstractStack
. Deprecated\Rokka\Client\Core\StackAbstract
(still here for BC reasons)
- Remove 3rd parameter $apiSecret from
\Rokka\Client\Factory::getImageClient()
. 3rd parameter is now the optional $baseUrl. Backwards compatibility is kept, but you're advised to adjust your clients. - Add
Stack::getDynamicUriString()
- Add the
StackUri
and 'UriComponents
classes. - Add
UriHelper::composeUri(array|UriComponents $components): UriInterface
andUriHelper::decomposeUri(UriInterface $uri): UriComponents
- Add
UriHelper::getSrcSetUrl(UriInterface $uri, string $size, null|string $custom = null)
andUriHelper::getSrcSetUrlString(string $uri, string $size, null|string $custom = null)
- Implement
Iterator
interface forOperationCollection
,SourceImageCollection
andStackCollection
. - Rokka PHP Client API docs are automatically generated and published at https://rokka.io/client-php-api/master/
- Add support for the new
short_hash
property on SourceImage. - Client supports the new rokka Stack Expression in the
Stack
Object. - Add
Rokka\Client\Image::saveStack(Stack $stack, array $requestConfig)
. SupersedesRokka\Client\Image::createStack()
, which is marked as deprecated for now. See docs for more info. - Add static method
Stack::createFromConfig(string $stackName, array $config, string $organization = null): Stack
. - Add setters and getters to the Stack class.
- Officially deprecated
Rokka\Client\Image::listSourceImages
, useRokka\Client\Image::searchSourceImages
instead - For your info: Deprecated methods will work fine until the next major release (2.0), when they may be removed.
- No more beta.
- DateTime object is correctly converted in metadata uploading.
- Supports static metadata from the rokka API and face detection.
- Add $options to
\Rokka\Client\Image::uploadSourceImage($contents, $fileName, $organization = '', $options = null)
for directly adding meta data while uploading
- Add
\Rokka\Client\UriHelper::addOptionsToUriString(string $url, $options)
and\Rokka\Client\UriHelper::addOptionsToUri(UriInterface $url, $options)
for easily adding stack options to an existing URL. - Drop support for PHP 5.5.
- Add overwrite parameter to
Rokka\Client\Image::createStack($stackName, $stackOperations, $organization = '', $stackOptions = [], $overwrite = false)
. If set to true, a stack will be overwritten, if it already exists.
- BC break! Change
Rokka\Client\Image::getSourceImage($hash, $binaryHash = false, $organization = '')
toRokka\Client\Image::getSourceImage($hash, $organization = '')
. - Add
Rokka\Client\Image::deleteSourceImagesWithBinaryHash($binaryHash, $organization = '')
. - Add
Rokka\Client\Image::getSourceImagesWithBinaryHash($binaryHash, $organization = '')
. - Add options parameter to
Rokka\Client\Image::setDynamicMetadata(DynamicMetadataInterface $dynamicMetadata, $hash, $organization = '', $options = [])
. Only option right now is['deletePrevious' => true]
, defaults tofalse
. - Add options parameter to
Rokka\Client\Image::deleteDynamicMetadata(DynamicMetadataInterface $dynamicMetadata, $hash, $organization = '', $options = [])
. Only option right now is['deletePrevious' => true]
, defaults tofalse
.