Apigility Version 1.0.2
This is our second maintenance release of Apigility, fixing a number of issues, and providing significant improvements for file upload capabilities.
Upload Support
Uploads were possible before this release, but were difficult to properly enable. Additionally, PATCH and PUT requests required manually handling the file uploads, as PHP does not natively support file uploads for those request methods; the Zend Framework 2 InputFilter component, because it utilizes PHP's native support for validating that an upload completed and for moving an upload file to a new location, also could not deal with these methods.
This release makes the following changes in order to facilitate file uploads via your Apigility API:
- Content validation was altered to merge file upload data, when present, with the submitted API fields.
- The Admin UI now allows you to mark a field as representing a file upload; this ensures that content validation will work properly, as content validation differs for file uploads.
- The content negotiation module now provides emulation for PHP's file upload support when receiving PATCH and PUT requests, ensuring that the files are uploaded in the same manner, cleaned up post-request, and passed to validation properly. You should notice no difference between POST, PUT, or PATCH requests when performing file uploads, whether a single or multiple files are provided.
File uploads are only done using the multipart/form-data
media type. You will need to add that media type to the content negotiation whitelist if you plan to perform file uploads.
If you have further questions, you can consult the documentation.
Changelog
While upload support is the major feature of this release, we fixed many other issues.
General
- All repositories have updated
composer.json
files that properly define the two branch aliases for themaster
anddevelop
branches. - All repositories have updated
README.md
files that provide a "Requirements" section linking to thecomposer.json
file.
zf-apigility-admin
- Fixes for the "Encrypt" and "Compress" filter adapters, ensuring that these filters can be properly created and configured.
- Ability to specify file upload fields. A field can now be marked as representing a file upload, ensuring it can then be validated correctly. - Fix for unclosed link in authentication screen, which was preventing edits and saves of authentication details.
- Remove charset option for Postgres adapters, as that adapter does not support setting the character set.
- Added DSN to DB adapter input filter, so that edits to an existing DB adapter will save when the DSN is provided.
- Fixes to the DB-Connected service model, to ensure that update data is saved properly.
zf-apigility-documentation
- Fixes HTTP status code for POST operations, to now display
201
as a potential status.
zf-apigility-skeleton
- Adds composer.phar to the skeleton, since it should have always been there!
zf-content-negotiation
- Implements file uploads via request body streaming for PUT and PATCH requests.
zf-content-validation
- Ensures file upload data is passed to validation, which allows validating file uploads.
zf-deploy
zf-hal
- Always store the original entity within ZF\Hal\Entity, fixing an issue where REST controllers cast entities to arrays prior to creating the
ZF\Hal\Entity
instance, and thus causing listeners onrenderEntity
et. al. to receive data that could never be matched.
zf-oauth2
- Pass all OAuth2 adapter options to oauth2-server-php, enabling the ability to turn on refresh token re-issue, among other things.
Roadmap
Many thanks for all the great issue reports and discussions on the mailing list and the various issue trackers!
We will do additional maintenance releases on an as-needed basis. The next feature release, 1.1, is in development, and includes:
- Doctrine-Connected REST services
- Database Autodiscovery for REST services (think of this as DB-Connected that finds all your tables and proposes field configuration for you!)
- Mongo-Connected REST services
- HTTP Caching
We would appreciate any feedback you can provide, either in the mailing lists, in issues, or via comments on associated pull requests.
Stay tuned!