Be notified of new releases
Create your free GitHub account today to subscribe to this repository for new releases and build software alongside 28 million developers.Sign up
This is our second maintenance release of Apigility, fixing a number of issues, and providing significant improvements for file upload capabilities.
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.
While upload support is the major feature of this release, we fixed many other issues.
- All repositories have updated
composer.jsonfiles that properly define the two branch aliases for the
- All repositories have updated
README.mdfiles that provide a "Requirements" section linking to the
- 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.
- Fixes HTTP status code for POST operations, to now display
201as a potential status.
- Adds composer.phar to the skeleton, since it should have always been there!
- Ensures file upload data is passed to validation, which allows validating file uploads.
- 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\Entityinstance, and thus causing listeners on
renderEntityet. al. to receive data that could never be matched.
- Pass all OAuth2 adapter options to oauth2-server-php, enabling the ability to turn on refresh token re-issue, among other things.
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.