APIMatic's PHP SDKs have been refactored to immutable clients and now support PHP 8.0 with updated dependencies. All static analysis and linting issues have been resolved, support for optional and nullable has been added along with a new restructured authorization flow, and much more.
We've updated our SDKs that use OAuth 2 Client Credential Flow to enable automatic re-authorization of the client when the OAuth token is expired.
We have added a new CodeGen setting that allows you to specify a list of words that Code Generation will not split when converting identifiers from API specification to language-specific identifiers. This is useful for declaring brand names such as APIMatic.
E.g. if you provide the words
vmware in your the list,
apimatic_and_vmware, depending on the place of use.
We have added support for adding contact information of the organization maintaining the API in our API editor.
Our Android, .Net, Go, Java, NodeJS, PHP, Python and Ruby SDKs now allow skipping verification of SSL certificates. To do this enable the CodeGen Setting Allow Skipping Certificate Verification and then set the corresponding configuration variable in the respective SDK.
We have added a new CodeGen setting to allow disabling linting in our SDKs. If you would like to benefit from this feature then please enable the setting and generate your SDKs again.
There was a problem in the handling of 'optional' DateTime fields in models. The issue has now been resolved.
Please regenerate your PHP SDKs to get this fix.
We have now added support for multiple datetime formats in our PHP SDKs. The following formats are supported:
- RFC1123 Datetime:
Mon, 15 Jun 2009 20:45:30 GMT
- RFC3339 Datetime:
- Unix Timestamp:
We have recently revamped our support for XML schema. This includes bug fixes (array types and optional properties were not catered in some cases, issues with circular references, etc.) and addition of missing features (Union of simple types, redefinition of schema types, etc.).
Our API editor and Code Generation engine now supports OAuth 2.0 for authentication in the generated SDKs.
OAuth 2 enabled SDKs will help developers in:
- Obtaining consent from user
- Acquiring access token
- Refreshing tokens when they expire
- Making authorized API calls
You can read more about OAuth 2.0 in APIMatic editor and Code Generation engine here.
You can now set Composer Package Name for PHP SDKs being generated.
This will affect the
name generated in the
composer.json file. Leaving it empty will generate the a fallback package name based on your API name.
APIMatic Code Generation engine now supports polymorphic responses with the help of a discriminator field.
- Discriminator is a field that is used to differentiate between a parent model and models that inherit from it.
- The response is deserialized into the parent model or one of its child classes by inspecting the discriminator field's value in the response.
- Using a discriminator field, you can build leaner models by not having to build unions of fields needed by a polymorphic response.
Check out the Discriminator documentation to get started.
There was an issue in code generation for PHP SDKs where the model classes (custom types) had fields with incorrect
PHP typehints. This lead to the
JsonMapper mapping responses incorrectly to models during deserialization. However, this
only occurred when a model had fields that were described as optional in the API description and no default value was provided.
Re-generate your PHP SDK to get the fix.
APIMATIC's PHP SDKs are now compliant with the PSR-2 Coding Style Guide
- PSR-2 compliance means that the PHP code generated is guaranteed to be of high-quality.
- PHP SDKs are written in a industry-standard code style to allow for maximum interoperability.
- PHP SDKs can be tested for code style violation using the PHP Code Sniffer.
Re-generate your PHP SDKs now for the new changes.
A bug in PHP SDKs being generated lead to custom Error Exception Models not being deserialized properly from the response when an API error occurred. This was caused by an error in the
unbox() function in the custom Exception class. It has now been fixed.
If you were using custom Error Exceptions, then please re-generate your PHP SDKs to get the fix.
A logical error in the PHP SDKs being generated lead to a variable,
_httpContext, being undefined in some cases. This resulted in a Fatal error when an
APIException was expected to be thrown.
Please regenerate your PHP SDK to get the bug fix.
You can now use multiple base URLs in your API description using the new Server Configuration. This feature allows you to
- Vary the Base URL between endpoints.
- Create multiple Environments and define different Base URLs for them.
- Templatize Base URL to allow for configuration using parameters in the client.