Releases: google/php-photoslibrary
v1.7.0
Supported PHP versions
This client library now supports PHP 7.3 and 8.0 and above.
Updated retry configuration
This release changes the default retry configuration for certain calls. For most integrations, the new default configuration will be more robust and lead to an improved application behaviour.
However, if you have relied on default settings and specific retry behaviour, please check the new retry configuration and customize it as needed. The defaults are configured in the file photos_library_client_config.json
. Refer to the new retry configuration section in the README on how to customize these settings.
In particular, API calls that modify the user's library are no longer automatically attempted again.
Sorting date filter based searches
This release includes support to sort date filter based searches. See the Google Photos Library API developer guide for more details about this functionality.
- New parameter for
PhotosLibraryClient::searchMediaItems(..)
that takes inorderBy
as a parameter to sort returned results. - New class
OrderBy
that contains supported sort options - Included sorting as an option in the filter demo application.
See the Google Photos Library API release notes, the PHPDoc reference documentation and the development guides for further details.
v1.6.3
Improvements to the composer, loader and phpunit configurations.
The native requirement for the bcmath
extension is now also included explicitly in the composer configuration.
Thanks to @SignpostMarv for the pull request!
v1.6.2
Add support for filtering by non-app created data to FiltersBuilder
.
This release adds a the new method setExcludeNonAppCreatedData
in FiltersBuilder
. This fixes issue https://issuetracker.google.com/163124694 .
See the PHPDoc reference documentation and the apply filter development guide for further details.
v1.6.1: Bugfix for failing uploads
This is a small bug fix release to address an error when using PhotosLibraryResourceFactory
to create a NewMediaItem
during file upload.
Fixes:
- Issue #19 where uploads failed because the file name could not be set correctly.
v1.6.0
This release includes support to update albums (titles and cover photos), media items (descriptions) and new sharing options.
- Support for updating albums. The album must have been created by the developer via the API and must be owned by the user.
- New call
PhotosLibraryClient->updateAlbumTitle(..)
to update the title of an album. - New call
PhotosLibraryClient->updateAlbumCoverPhoto(..)
to update the cover photo of an album.
- New call
- Support for updating media items. The media item must have been created by the developer via the API and must be owned by the user:
- New call
PhotosLibraryClient->updateMediaItemDescription(..)
to update the description of a media item.
- New call
- New property
is_joinable
added toShareInfo
to indicate whether a user can join the album. See the updated sharing guide in the Library API developer documentation.
See the Google Photos Library API release notes, the PHPDoc reference documentation and the development guides for further details.
v1.5.0
This release changes how filenames and mime types can be specified for uploads.
- New recommended parameter to specify the mime type during upload, see new parameter
mimeType
for callPhotosLibraryClient->upload(...)
. - New parameter to specify the filename for
NewMediaItem
objects, see the new helper functionPhotosLibraryResourceFactory::newMediaItemWithDescriptionAndFileName(..)
. - Deprecated setting the filename during the upload request, instead, set the file name in the
NewMediaItem
when callingbatchCreate(..)
.
See the PHPDoc reference documentation and the development guides for further details.
v1.4.0
This release includes a new property to distinguish ownership of shared albums.
- New property
is_owned
added toShareInfo
to identify if the user is the owner of the shared album.
See the PHPDoc reference documentation and the development guides for further details.
v1.3.0
This release includes a new filter to find media items the user has marked as favorite and new content categories:
- New
FeatureFilter
that can be set inside theFilters
forPhotosLibraryClient->searchMediaItems(...)
call. Use theFAVORITES
feature to select favorites from the user's library. - New
ContentCategories
:ARTS
,CRAFTS
,FASHION
,HOUSES
,GARDENS
,FLOWERS
,HOLIDAYS
See the PHPDoc reference documentation and the development guides for further details.
v1.2.0
This release includes new calls for adding and removing media items from an album:
- New call
batchAddMediaItemsToAlbum(albumId, mediaItemIds)
to add existing media items to an album - New call
batchRemoveMediaItemsFromAlbum(albumId, mediaItemIds)
to remove media items from an album
For both calls, the media items and albums must have been created by your application.
Breaking changes:
- The basic types
Album
,MediaItem
,DateRange
and all associated properties (ContributorInfo
,MediaMetadata
,Photo
,ShareInfo
andVideo
) have moved to the new namespaceGoogle.Photos.Types
. Their functionality has not changed, only their location in this client library. Please update your references to continue using this library. See the reference documentation for more details.
v1.1.1: Bugfix release
Fix: Filename was ignored when uploading media items: https://issuetracker.google.com/119977003