Skip to content

Commit

Permalink
[4.1] Fixed missing firewall client method (DigitalOceanPHP#274)
Browse files Browse the repository at this point in the history
Co-authored-by: Graham Campbell <[email protected]>
  • Loading branch information
sdwru and GrahamCampbell authored Feb 9, 2021
1 parent 1522832 commit 83b0f75
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ CHANGE LOG
## 4.1.1 (UPCOMING)

* Fixed incorrect floating IP IDs
* Fixed missing firewall client method


## 4.1.0 (25/01/2021)
Expand Down
9 changes: 9 additions & 0 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
use DigitalOceanV2\Api\Domain;
use DigitalOceanV2\Api\DomainRecord;
use DigitalOceanV2\Api\Droplet;
use DigitalOceanV2\Api\Firewall;
use DigitalOceanV2\Api\FloatingIp;
use DigitalOceanV2\Api\Image;
use DigitalOceanV2\Api\Key;
Expand Down Expand Up @@ -173,6 +174,14 @@ public function droplet(): Droplet
return new Droplet($this);
}

/**
* @return Firewall
*/
public function firewall(): Firewall
{
return new Firewall($this);
}

/**
* @return FloatingIp
*/
Expand Down
2 changes: 2 additions & 0 deletions tests/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use DigitalOceanV2\Api\Domain;
use DigitalOceanV2\Api\DomainRecord;
use DigitalOceanV2\Api\Droplet;
use DigitalOceanV2\Api\Firewall;
use DigitalOceanV2\Api\FloatingIp;
use DigitalOceanV2\Api\Image;
use DigitalOceanV2\Api\Key;
Expand Down Expand Up @@ -58,6 +59,7 @@ public function testCreateApis(): void
self::assertInstanceOf(Domain::class, $client->domain());
self::assertInstanceOf(DomainRecord::class, $client->domainRecord());
self::assertInstanceOf(Droplet::class, $client->droplet());
self::assertInstanceOf(Firewall::class, $client->firewall());
self::assertInstanceOf(FloatingIp::class, $client->floatingIp());
self::assertInstanceOf(Image::class, $client->image());
self::assertInstanceOf(Key::class, $client->key());
Expand Down

0 comments on commit 83b0f75

Please sign in to comment.