Skip to content

Commit

Permalink
Remove PHP 7.3 support (#16)
Browse files Browse the repository at this point in the history
* Remove PHP 7.3 support
  • Loading branch information
glenn1001 authored Apr 22, 2022
1 parent 3327cbb commit 379f30a
Show file tree
Hide file tree
Showing 29 changed files with 132 additions and 276 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.3', '7.4', '8.0']
php-versions: ['7.4', '8.0']

name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
steps:
Expand Down
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
],
"require": {
"php": "^7.3|^7.4|^8.0",
"php": "^7.4|^8.0",
"ext-json": "*",
"guzzlehttp/guzzle": "^6.2.0|^7.0.1",
"jms/serializer": "^3.17",
Expand All @@ -45,7 +45,10 @@
}
},
"config": {
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"phpstan/extension-installer": true
}
},
"scripts": {
"phpcs-fix": "vendor/bin/php-cs-fixer fix",
Expand Down
20 changes: 4 additions & 16 deletions src/AcronisClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,13 @@

final class AcronisClient
{
/**
* @var TenantClient
*/
private $tenantClient;
private TenantClient $tenantClient;

/**
* @var UserClient
*/
private $userClient;
private UserClient $userClient;

/**
* @var OfferingClient
*/
private $offeringClient;
private OfferingClient $offeringClient;

/**
* @var SearchClient
*/
private $searchClient;
private SearchClient $searchClient;

public function __construct(RestClientInterface $restClient)
{
Expand Down
20 changes: 4 additions & 16 deletions src/BearerTokenMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,13 @@

class BearerTokenMiddleware
{
/**
* @var string|null
*/
private $bearerToken;
private ?string $bearerToken;

/**
* @var string
*/
private $url;
private string $url;

/**
* @var string
*/
private $clientId;
private string $clientId;

/**
* @var string
*/
private $clientSecret;
private string $clientSecret;

public function __construct(string $url, string $clientId, string $clientSecret)
{
Expand Down
5 changes: 1 addition & 4 deletions src/Client/OfferingClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ final class OfferingClient
{
private const OFFERING_ITEMS = 'tenants/%s/offering_items';

/**
* @var RestClientInterface
*/
private $client;
private RestClientInterface $client;

public function __construct(RestClientInterface $client)
{
Expand Down
15 changes: 2 additions & 13 deletions src/Client/RestClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,9 @@ final class RestClient implements RestClientInterface
{
private const REQUEST_TIMEOUT = 5;

/**
* @var ClientInterface
*/
private $client;
private ClientInterface $client;

/**
* @var SerializerInterface
*/
private $serializer;
private SerializerInterface $serializer;

public function __construct(ClientInterface $client, SerializerInterface $serializer)
{
Expand All @@ -65,11 +59,6 @@ public function getEntity(string $url, string $returnType): object
return $this->serializer->deserialize($json, $returnType, 'json');
}

/**
* @param string $url
*
* @return string
*/
public function getRawData(string $url): string
{
return $this->get($url);
Expand Down
5 changes: 1 addition & 4 deletions src/Client/SearchClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ final class SearchClient
{
private const SEARCH = 'search?tenant=%s&text=%s&limit=%d';

/**
* @var RestClientInterface
*/
private $client;
private RestClientInterface $client;

public function __construct(RestClientInterface $client)
{
Expand Down
5 changes: 1 addition & 4 deletions src/Client/TenantClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ final class TenantClient
private const TENANT_EDITION = 'tenants/%s/edition';
private const TENANT_PRICING = 'tenants/%s/pricing';

/**
* @var RestClientInterface
*/
private $client;
private RestClientInterface $client;

public function __construct(RestClientInterface $client)
{
Expand Down
5 changes: 1 addition & 4 deletions src/Client/UserClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ final class UserClient
private const PASSWORD_UPDATE = 'users/%s/password';
private const ACCESS_POLICIES = 'users/%s/access_policies';

/**
* @var RestClientInterface
*/
private $client;
private RestClientInterface $client;

public function __construct(RestClientInterface $client)
{
Expand Down
21 changes: 7 additions & 14 deletions src/Entity/AccessPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,60 +9,53 @@
class AccessPolicy
{
/**
* @var string|null
* @Serializer\SerializedName("id")
* @Serializer\Type("string")
* @Serializer\Groups({"update_data"})
*/
private $id;
private ?string $id;

/**
* @var string
* @Serializer\SerializedName("issuer_id")
* @Serializer\Type("string")
* @Serializer\Groups({"update_data"})
*/
private $issuerId;
private string $issuerId;

/**
* @var string
* @Serializer\SerializedName("role_id")
* @Serializer\Type("string")
* @Serializer\Groups({"update_data"})
*/
private $roleId;
private string $roleId;

/**
* @var string
* @Serializer\SerializedName("tenant_id")
* @Serializer\Type("string")
* @Serializer\Groups({"update_data"})
*/
private $tenantId;
private string $tenantId;

/**
* @var string
* @Serializer\SerializedName("trustee_id")
* @Serializer\Type("string")
* @Serializer\Groups({"update_data"})
*/
private $trusteeId;
private string $trusteeId;

/**
* @var string
* @Serializer\SerializedName("trustee_type")
* @Serializer\Type("string")
* @Serializer\Groups({"update_data"})
*/
private $trusteeType;
private string $trusteeType;

/**
* @var int
* @Serializer\SerializedName("version")
* @Serializer\Type("integer")
* @Serializer\Groups({"create_data","update_data"})
*/
private $version;
private int $version;

public function __construct(
?string $id,
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/AccessPolicyCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AccessPolicyCollection
* @Serializer\SerializedName("items")
* @Serializer\Groups({"update_data"})
*/
private $items;
private array $items;

/**
* @param AccessPolicy[] $items
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/ApplicationUuidCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ApplicationUuidCollection
* @Serializer\Type("array<string>")
* @Serializer\SerializedName("items")
*/
private $items;
private array $items;

/**
* @return string[]
Expand Down
44 changes: 15 additions & 29 deletions src/Entity/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,122 +10,108 @@
class Contact
{
/**
* @var string|null
* @Serializer\SerializedName("id")
* @Serializer\Type("string")
* @Serializer\Groups({"update_data"})
*/
private $id;
private ?string $id = null;

/**
* @var string|null
* @Serializer\SerializedName("aan")
* @Serializer\Type("string")
* @Serializer\Groups({"create_data","update_data"})
*/
private $acronisAccountNumber;
private ?string $acronisAccountNumber = null;

/**
* @var string[]
* @Serializer\SerializedName("types")
* @Serializer\Type("array<string>")
* @Serializer\Groups({"create_data","update_data"})
*/
private $types;
private array $types;

/**
* @var string
* @Serializer\SerializedName("firstname")
* @Serializer\Type("string")
* @Serializer\Groups({"create_data","update_data"})
*/
private $firstname;
private string $firstname;

/**
* @var string
* @Serializer\SerializedName("lastname")
* @Serializer\Type("string")
* @Serializer\Groups({"create_data","update_data"})
*/
private $lastname;
private string $lastname;

/**
* @var string
* @Serializer\SerializedName("email")
* @Serializer\Type("string")
* @Serializer\Groups({"create_data","update_data"})
*/
private $email;
private string $email;

/**
* @var string|null
* @Serializer\SerializedName("address1")
* @Serializer\Type("string")
* @Serializer\Groups({"create_data","update_data"})
*/
private $address1;
private ?string $address1 = null;

/**
* @var string|null
* @Serializer\SerializedName("address2")
* @Serializer\Type("string")
* @Serializer\Groups({"create_data","update_data"})
*/
private $address2;
private ?string $address2 = null;

/**
* @var string|null
* @Serializer\SerializedName("country")
* @Serializer\Type("string")
* @Serializer\Groups({"create_data","update_data"})
*/
private $country;
private ?string $country = null;

/**
* @var string|null
* @Serializer\SerializedName("state")
* @Serializer\Type("string")
* @Serializer\Groups({"create_data","update_data"})
*/
private $state;
private ?string $state = null;

/**
* @var string|null
* @Serializer\SerializedName("zipcode")
* @Serializer\Type("string")
* @Serializer\Groups({"create_data","update_data"})
*/
private $zipcode;
private ?string $zipcode = null;

/**
* @var string|null
* @Serializer\SerializedName("city")
* @Serializer\Type("string")
* @Serializer\Groups({"create_data","update_data"})
*/
private $city;
private ?string $city = null;

/**
* @var string|null
* @Serializer\SerializedName("phone")
* @Serializer\Type("string")
* @Serializer\Groups({"create_data","update_data"})
*/
private $phone;
private ?string $phone = null;

/**
* @var DateTimeImmutable
* @Serializer\SerializedName("created_at")
* @Serializer\Type("DateTimeImmutable<'Y-m-d H:i:s', '', ['Y-m-d\TH:i:sP', 'Y-m-d\TH:i:s']>")
*/
private $createdAt;
private DateTimeImmutable $createdAt;

/**
* @var DateTimeImmutable
* @Serializer\SerializedName("updated_at")
* @Serializer\Type("DateTimeImmutable<'Y-m-d H:i:s', '', ['Y-m-d\TH:i:sP', 'Y-m-d\TH:i:s']>")
*/
private $updatedAt;
private DateTimeImmutable $updatedAt;

/**
* @param string[] $types
Expand Down
Loading

0 comments on commit 379f30a

Please sign in to comment.