Skip to content

Commit

Permalink
php 7.3 support
Browse files Browse the repository at this point in the history
  • Loading branch information
lanlin committed Sep 7, 2020
1 parent 4218ff5 commit c91c5df
Show file tree
Hide file tree
Showing 30 changed files with 47 additions and 46 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codequality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup PHP Action
uses: shivammathur/[email protected]
with:
php-version: '7.4'
php-version: '7.3'
tools: php-cs-fixer:2.16.4

- name: Code Reformatting...
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup PHP Action
uses: shivammathur/[email protected]
with:
php-version: '7.4'
php-version: '7.3'
coverage: pcov

- name: Validate composer.json and composer.lock
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Last check at the point: [Service Accounts Now Supported for EWS Mail](https://c
</div>


## Installation (PHP 7.4 required since version 4.0)
## Installation (version 3.x for php 7.3)

This library is available on https://packagist.org/packages/lanlin/nylas-php</br>
You can install it by running
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lanlin/nylas-php",
"description": "Nylas PHP SDK (api version 2.0)",
"description": "Nylas PHP SDK (api version 2.1)",
"license": "MIT",
"authors" : [
{
Expand All @@ -9,7 +9,8 @@
}
],
"require": {
"php": ">=7.4",
"php": ">=7.3",
"ext-json": "*",
"guzzlehttp/guzzle": ">=6.5",
"respect/validation": "^2.0",
"zbateson/mail-mime-parser": "^1.2"
Expand Down
2 changes: 1 addition & 1 deletion src/Accounts/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Account
/**
* @var \Nylas\Utilities\Options
*/
private Options $options;
private $options;

// ------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/Accounts/Manage.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Manage
/**
* @var \Nylas\Utilities\Options
*/
private Options $options;
private $options;

// ------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/Authentication/Hosted.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Hosted
/**
* @var \Nylas\Utilities\Options
*/
private Options $options;
private $options;

// ------------------------------------------------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions src/Authentication/Native.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Native
/**
* @var array
*/
private array $providers =
private $providers =
[
'gmail', 'yahoo', 'exchange', 'outlook', 'imap', 'icloud', 'hotmail', 'aol',
];
Expand All @@ -31,7 +31,7 @@ class Native
/**
* @var \Nylas\Utilities\Options
*/
private Options $options;
private $options;

// ------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/Calendars/Calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Calendar
/**
* @var \Nylas\Utilities\Options
*/
private Options $options;
private $options;

// ------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Client
/**
* @var Options
*/
private Options $options;
private $options;

// ------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/Contacts/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Contact
/**
* @var \Nylas\Utilities\Options
*/
private Options $options;
private $options;

// ------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/Deltas/Delta.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Delta
/**
* @var \Nylas\Utilities\Options
*/
private Options $options;
private $options;

// ------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/Drafts/Draft.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Draft
/**
* @var \Nylas\Utilities\Options
*/
private Options $options;
private $options;

// ------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/Drafts/Sending.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function sendDraft(array $params): array
// ------------------------------------------------------------------------------

/**
* get rules for draf
* get rules for draft
*
* @return \Nylas\Utilities\Validator
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Events/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Event
/**
* @var \Nylas\Utilities\Options
*/
private Options $options;
private $options;

// ------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/Files/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class File
/**
* @var \Nylas\Utilities\Options
*/
private Options $options;
private $options;

// ------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/Folders/Folder.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Folder
/**
* @var \Nylas\Utilities\Options
*/
private Options $options;
private $options;

// ------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/Labels/Label.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Label
/**
* @var \Nylas\Utilities\Options
*/
private Options $options;
private $options;

// ------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/Messages/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Message
/**
* @var \Nylas\Utilities\Options
*/
private Options $options;
private $options;

// ------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/Messages/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Search
/**
* @var \Nylas\Utilities\Options
*/
private Options $options;
private $options;

// ------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/Messages/Sending.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Sending
/**
* @var \Nylas\Utilities\Options
*/
private Options $options;
private $options;

// ------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/Messages/Smart.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Smart
/**
* @var \Nylas\Utilities\Options
*/
private Options $options;
private $options;

// ------------------------------------------------------------------------------

Expand Down
20 changes: 10 additions & 10 deletions src/Request/AbsBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ trait AbsBase
/**
* @var \GuzzleHttp\Client
*/
private Client $guzzle;
private $guzzle;

// ------------------------------------------------------------------------------

private array $formFiles = [];
private array $pathParams = [];
private array $jsonParams = [];
private array $queryParams = [];
private array $headerParams = [];
private array $bodyContents = [];
private array $onHeadersFunc = [];
private $formFiles = [];
private $pathParams = [];
private $jsonParams = [];
private $queryParams = [];
private $headerParams = [];
private $bodyContents = [];
private $onHeadersFunc = [];

// ------------------------------------------------------------------------------

Expand Down Expand Up @@ -220,7 +220,7 @@ private function concatOptions(bool $httpErrors = false) : array
$temp =
[
'debug' => $this->debug,
'on_headers' => $this->onHeadersFuncions(),
'on_headers' => $this->onHeadersFunctions(),
'http_errors' => $httpErrors
];

Expand All @@ -239,7 +239,7 @@ private function concatOptions(bool $httpErrors = false) : array
/**
* check http status code before response body
*/
private function onHeadersFuncions() : callable
private function onHeadersFunctions() : callable
{
$request = $this;
$excpArr = Errors::StatusExceptions;
Expand Down
2 changes: 1 addition & 1 deletion src/Threads/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Search
/**
* @var \Nylas\Utilities\Options
*/
private Options $options;
private $options;

// ------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/Threads/Smart.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Smart
/**
* @var \Nylas\Utilities\Options
*/
private Options $options;
private $options;

// ------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/Threads/Thread.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Thread
/**
* @var \Nylas\Utilities\Options
*/
private Options $options;
private $options;

// ------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/Utilities/Abs.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ trait Abs
/**
* @var Options
*/
private Options $options;
private $options;

// ------------------------------------------------------------------------------

Expand Down
12 changes: 6 additions & 6 deletions src/Utilities/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,32 +27,32 @@ class Options
/**
* @var bool
*/
private bool $debug = false;
private $debug = false;

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

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

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

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

/**
* @var array
*/
private array $accountInfo;
private $accountInfo;

// ------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/Webhooks/Webhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Webhook
/**
* @var \Nylas\Utilities\Options
*/
private Options $options;
private $options;

// ------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion tests/AbsCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class AbsCase extends TestCase
/**
* @var Client
*/
protected Client $client;
protected $client;

// ------------------------------------------------------------------------------

Expand Down

0 comments on commit c91c5df

Please sign in to comment.