1.16.2
(feat):
Add documentation for retries and timeout parameters in the README, including examples of how
to configure maxRetries and timeout options at the request level
1.16.1
(feat):
Add exception handling documentation to README with examples of catching and handling API exceptions
1.16.0
(feat):
Introduce initial version of README generation for the PHP SDK with Installation, Usage, and Contributing sections.
1.15.1
(internal):
Update the IR to v58.
0.15.0
(feat):
Support custom package path
0.14.2
(fix):
This updates the PHP generator to better support undiscriminated unions that define one or more optional
types.
With this, the generator unwraps each of the optional types, and includes a |null
variant (e.g. array<string, mixed>|Metadata|null
).
0.14.1
(internal):
Upgrade to IRv57.
0.14.0
(feat):
Support literal types
0.13.7
(fix):
Make constructor private for union types and remove static unknown constructor
0.13.6
(fix):
Fix an issue where the value field of the deserialized discriminated union was null.
0.13.5
(fix):
Change discriminated union method name from ->getvalue()
to ->getValue()
.
0.13.4
(fix):
Flatten test directory structure from tests/package-name/**
to tests/**
so it matches the psr-4 structure defined in composer.json. Without this change, you cannot reference classes within the tests
directory from your tests, for example, a Helpers
class for common test utilities.
0.13.3
(fix):
Fix issue where an empty request would be JSON serialized as an empty array instead of an empty object.
0.13.2
(fix):
Fix a bug where literal global headers could not be overridden in the root client constructor.
0.13.1
(fix):
Render union references as their type references rather than mixed.
0.13.0
(feat):
Add support for configuring a request timeout.
(fix):
Fix a bug where the private pagination method helpers collided with magic methods (e.g. __get
).
0.12.0
(feat):
Add support for discriminated unions.
0.11.0
(feat):
The SDK now supports a bodyProperties
and queryParameters
request option, which can be used to add arbitrary properties to the request. This is useful for interacting with alpha or undocumented functionality.
0.10.0
(feat):
You can now modify the generated composer.json
file by adding a composerJson
property to your generator configuration.
Here’s an example of the generators.yml
file with the composerJson
property:
Which will result in the following composer.json file:
0.7.0
(feat):
The SDK now supports inline path parameters in the generated request class like so:
0.6.0
(feat):
You can now configure the generated class property access to be public
or private
.
- When the access is public, both the getter and setter methods are omitted (default).
- When the access is private, both the getter and setter methods are generated.
You can configure this in your generators.yml
like so:
0.5.2
(fix):
Update the endpoint generator to not require the in-lined request wrapper if it’s only composed of optional properties.
(fix):
Update optional query parameters lists to be generated as an optional array instead of an array of optional values.
0.5.1
(fix):
Catch HTTP request exceptions and rethrow it as a FooApiException.
0.5.0
(feat):
Add the __toString()
magic method to all generated class types.
0.4.0
(feat):
Retry HTTP requests on status codes 408, 429, 5XX. You can configure the maximum number of retries like this:
php $client = new FooClient("token", ['maxRetries' => 3]) $client->bar($request, ['maxRetries' => 5]);
The default for maxRetries
is 2, meaning up to 3 HTTP requests may be sent. Set maxRetries
to 0 to disable retries.
If you create your own HTTP client and pass it to the root client, you must add the desired middlewares yourself. Here’s how you would add the RetryMiddleware
to a custom HTTP client:
php $handlerStack = HandlerStack::create(); $handlerStack->push(RetryMiddleware::create()); $httpClient = new Client(['handler' => $handlerStack]); $client = new FooClient(['client' => $client]);
0.3.2
(internal):
Upgrade to IRv55 to recognize nullable types.
0.3.1
(fix):
Improve multiline parameter docs by writing them above the tag, e.g.