- Minimum PHP version is now 8.2.
- Removed dependency
illuminate/collections- Replaced allcollect()usages with native PHP array functions. - Method
delete()now returns?APIResponseinstead ofboolacross all models. - Changed various method signatures to use native PHP types and improved type hinting.
- Improved support for Managed Certificates.
- Improved support for Firewall label selectors.
- Improved support for Primary IPs.
- Improved support for Placement Groups.
- Improved support for Load Balancers.
- General code cleanup and modernization.
- Upgrade to GitHub-native Dependabot by @dependabot-preview in #73
- Fixed error on firewall rule when no port is present by @stefangeorgescu in #72
- change test classes prefix namespace to LKDev\Tests by @masoudniki in #74
- Adding "type" const by @ThomasLandauer in #78
- Implement
Model::setHttpClient()by @mutec in #80 - Fixing docblock by @ThomasLandauer in #76
- Keep Hetzner's snake_case for properties by @ThomasLandauer in #75
- [FEATURE] Add firewalls parameter for server by @ayacoo in #82
- fixes nullable port by @jprangenbergde in #81
- Add support for Firewalls
- Add support for creating Certificates
- Add support for creating resources with labels
- Allow setting of "null"
$dnsPtrvalue onchangeReverseDNSof FloatingIP & Server, this resets the DNS PTR to the default value - Support PHP 8.0
- Improve Creating Floating IPs
Bugfixes:
- Wrong Import Path on src/Models/Actions/ActionRequestOpts.php
- Server->createImage did not work correctly when specifying not label
Notes:
- Improved code quality with phpstan
- Make package requirements less strict
- Bugfix: getByName functions had a wrong return type and failed when a resource was not found by name #50
- Feature: Allow specifying labels on
createImage - Feature: Allow creation of Servers with Networks
- Bugfix: The name of ISOs is not set on private ISOs, use the ID instead
- Bugfix: Fix wrong Guzzle Client Type on Server, Volume and FloatingIp Model.
- Feature: Allow overriding of Guzzle Client configuration on
LKDev\HetznerCloud\Clients\GuzzleClient
- Bugfix: Floating IP description which can be null #36
-
The
all-Method on the Models return now every entity of the requested resource. For the old behavior seelist-Method -
Added
list-Method which allows a better control over getting many entities -
Added Request Opts for
SSHKey,Location,Datacenter,ImageandAction -
Added
ResourcesInterface to all Root Resource Clients likeNetworksand implemented all methods -
Added
ResourceInterface to all specific resource clients likeServerand implemented all methods -
Removed deprecated functions:
Server->changeName()
- Fix wrong pagination Parameter (#29)
- Fix labels translation from json to array in
Image,Network,SSHKeyandVolume
- Add ability to get
Datacenters,FloatingIPs,Images,LocationsandServerTypesper name (getByName) - Add
namesupport to Floating IPs
- Add missing
networks()- method onHetznerAPIClient
- Add
Networkssupport (LKDev\HetznerCloud\Models\Networks\Networks&LKDev\HetznerCloud\Models\Networks\Network) - Add
networkZoneproperty toLKDev\HetznerCloud\Models\Locations\Location
- Add
volumesandautomountparameters toLKDev\HetznerCloud\Models\Servers\Servers-createInDatacenterandcreateInLocation - Add
createdproperty toLKDev\HetznerCloud\Models\Servers\Server
- Add
automountandformatparameters toLKDev\HetznerCloud\Models\Volumes\Volumes-create - Add
createdproperty toLKDev\HetznerCloud\Models\FloatingIps\FloatingIp - Improve test coverage
- Add
root_passwortto response ofLKDev\HetznerCloud\Models\Servers\Server-rebuildFromImage(#17)
- Setting the UserAgent is now possible with
LKDev\HetznerCloud\HetznerAPIClient-setUserAgent() - Setting the Base URL is now possible with
LKDev\HetznerCloud\HetznerAPIClient-setBaseUrl()
- Fix a bug on the
LKDev\HetznerCloud\RequestOpts-buildQuery()method
- Implement
getByNamemethod onLKDev\HetznerCloud\Models\Servers\ServersandLKDev\HetznerCloud\Models\Volumes\Volumes. - Implement
waitUntilCompletedmethod onLKDev\HetznerCloud\Models\Actions\Action - Add
LKDev\HetznerCloud\Models\Servers\ServerRequestOptsfor better control over theall-Method onLKDev\HetznerCloud\Models\Servers\Servers - Add
LKDev\HetznerCloud\Models\Volumes\VolumeRequestOptsfor better control over theall-Method onLKDev\HetznerCloud\Models\Volumes\Volumes
- Implement
metricsmethod onLKDev\HetznerCloud\Models\Servers\Server(@paulus7, #10)
- Fix a error on the update methods.
- Add Volumes support (
LKDev\HetznerCloud\Models\Volumes\Volumes&LKDev\HetznerCloud\Models\Volumes\Volume) - Add all API Response headers to every
LKDev\HetznerCloud\APIResponse
- Deprecate and ignore the
$backup_windowparameter onLKDev\HetznerCloud\Models\Server\Server::enableBackups
- Add
httpClient-Method toLKDev\HetznerCloud\HetznerAPIClient - Add
labels-Property toLKDev\HetznerCloud\Models\FloatingIp\FloatingIP - Add
labels-Property toLKDev\HetznerCloud\Models\Server\Server - Add
labels-Property toLKDev\HetznerCloud\Models\Image\Image - Add
labels-Property toLKDev\HetznerCloud\Models\SSHKey\SSHKey - Add
update-Method to\LKDev\HetznerCloud\Models\FloatingIp\FloatingIp-Model for easily updateing the server meta data$floatingIP->update(['description' => 'my-updated-floating-description','labels' => ['Key' => 'value]);
- Add
update-Method to\LKDev\HetznerCloud\Models\SSHKey\SSHKey-Model for easily updateing the server meta data$floatingIP->update(['name' => 'my-updated-sshkey-name','labels' => ['Key' => 'value]);
- You can now use the
labels-Key on everyupdate-Method, for easily updating the Labels - Add
LKDev\HetznerCloud\RequestOpts- Class for easily customize the request opts. Could be used for filtering with the label selector. - Add the parameter
$requestOptsto allall-Methods
- Add
update-Method to\LKDev\HetznerCloud\Models\Servers\Server-Model for easily updateing the server meta data$server->update(['name' => 'my-updated-server-name']);
- Soft Deprecating the
changeName-Method on\LKDev\HetznerCloud\Models\Servers\Server-Model, please use theupdate-Method now. As of Version 1.5.0 this method will trigger aDeprecated - Rename
ApiResponseto `APIResponse
-
Servers Class The
createmethod was split into two different methodscreateInLocationfor creating a server in a location andcreateInDatacenterfor creating a server in a datacenter -
All "action" like
Server::powerOn()methods now return an instance ofLKDev\HetznerCloud\ApiResponseinstead an instance ofLKDev\HetznerCloud\Models\Actions\Action. If you want to the the underlying action object just use the value action as parameter of thegetResponseParton theLKDev\HetznerCloud\ApiResponseobject. Of course you could use server or wss_url as parameter like in the official Hetzner Cloud documentation -
All resource object constructors now require an instance of the internal GuzzleHttpClient
LKDev\HetznerCloud\Clients\GuzzleClientif you use the shortcut methods this is done for you.
The HetznerApiClient- object has now a method for every resource, for easily accessing the underlying object.
Instead of
// < v1.0.0
$apiKey = '{InsertApiTokenHere}';
$hetznerClient = new \LKDev\HetznerCloud\HetznerAPIClient($apiKey);
$serverEndpoint = new \LKDev\HetznerCloud\Models\Servers\Servers();
$serverEndpoint->all();you could now do simply
// >= v1.0.0
$apiKey = '{InsertApiTokenHere}';
$hetznerClient = new \LKDev\HetznerCloud\HetznerAPIClient($apiKey);
$hetznerClient->servers()->all();