Skip to content

Commit 4b46fbe

Browse files
authored
Changes for v2.0.4 (#132)
* Add Accept-Encoding gzip,deflate to RequestHandler #131 * Test PHP v7.2 #130 * Declare arrays to remove warning on non-countable types in PHP 7.2 - http://php.net/manual/en/migration72.incompatible.php#migration72.incompatible.warn-on-non-countable-types * Add ext-mbstring requirement to composer.json * Bump User-Agent to 2.0.4
1 parent 496a9cb commit 4b46fbe

31 files changed

+44
-49
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ language: php
33
php:
44
- 7.0
55
- 7.1
6+
- 7.2
67

78
before_script:
89
- composer self-update

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
],
1212
"require": {
1313
"php": ">=7.0",
14+
"ext-mbstring": "*",
1415
"guzzlehttp/guzzle": "^6.2.3",
1516
"ramsey/uuid": "^3.6.1",
1617
"psr/log": "~1.0"

src/Intacct/Functions/AccountsPayable/AbstractApAdjustment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ abstract class AbstractApAdjustment extends AbstractFunction
7878
protected $adjustmentNumber;
7979

8080
/** @var AbstractApAdjustmentLine[] */
81-
protected $lines;
81+
protected $lines = [];
8282

8383
/**
8484
* Get record number

src/Intacct/Functions/AccountsPayable/AbstractApPaymentRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ abstract class AbstractApPaymentRequest extends AbstractFunction
8484
protected $notificationContactName;
8585

8686
/** @var ApPaymentRequestItem[] */
87-
protected $applyToTransactions;
87+
protected $applyToTransactions = [];
8888

8989
/**
9090
* Get record number

src/Intacct/Functions/AccountsPayable/AbstractBill.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ abstract class AbstractBill extends AbstractFunction
9393
protected $attachmentsId;
9494

9595
/** @var AbstractBillLine[] */
96-
protected $lines;
96+
protected $lines = [];
9797

9898
/**
9999
* Get record number

src/Intacct/Functions/AccountsPayable/AbstractVendor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,10 @@ abstract class AbstractVendor extends AbstractFunction
227227
protected $restrictionType;
228228

229229
/** @var array */
230-
protected $restrictedLocations;
230+
protected $restrictedLocations = [];
231231

232232
/** @var array */
233-
protected $restrictedDepartments;
233+
protected $restrictedDepartments = [];
234234

235235
/**
236236
* Get vendor ID

src/Intacct/Functions/AccountsReceivable/AbstractArAdjustment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ abstract class AbstractArAdjustment extends AbstractFunction
7474
protected $adjustmentNumber;
7575

7676
/** @var AbstractArAdjustmentLine[] */
77-
protected $lines;
77+
protected $lines = [];
7878

7979
/**
8080
* Get record number

src/Intacct/Functions/AccountsReceivable/AbstractArPayment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ abstract class AbstractArPayment extends AbstractFunction
110110
protected $referenceNumber;
111111

112112
/** @var ArPaymentItem[] */
113-
protected $applyToTransactions;
113+
protected $applyToTransactions = [];
114114

115115
/**
116116
* Get record number

src/Intacct/Functions/AccountsReceivable/AbstractCustomer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,10 @@ abstract class AbstractCustomer extends AbstractFunction
215215
protected $restrictionType;
216216

217217
/** @var array */
218-
protected $restrictedLocations;
218+
protected $restrictedLocations = [];
219219

220220
/** @var array */
221-
protected $restrictedDepartments;
221+
protected $restrictedDepartments = [];
222222

223223
/**
224224
* Get customer ID

src/Intacct/Functions/AccountsReceivable/AbstractInvoice.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ abstract class AbstractInvoice extends AbstractFunction
9393
protected $attachmentsId;
9494

9595
/** @var AbstractInvoiceLine[] */
96-
protected $lines;
96+
protected $lines = [];
9797

9898
/**
9999
* Get record number

src/Intacct/Functions/CashManagement/AbstractChargeCardTransaction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ abstract class AbstractChargeCardTransaction extends AbstractFunction
5959
protected $exchangeRateType;
6060

6161
/** @var AbstractChargeCardTransactionLine[] */
62-
protected $lines;
62+
protected $lines = [];
6363

6464
/**
6565
* Get record number

src/Intacct/Functions/CashManagement/AbstractDeposit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ abstract class AbstractDeposit extends AbstractFunction
4141
protected $attachmentsId;
4242

4343
/** @var int[] */
44-
protected $transactionsKeysToDeposit;
44+
protected $transactionsKeysToDeposit = [];
4545

4646
/**
4747
* Get bank account ID

src/Intacct/Functions/CashManagement/AbstractOtherReceipt.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ abstract class AbstractOtherReceipt extends AbstractFunction
6868
protected $exchangeRateType;
6969

7070
/** @var AbstractOtherReceiptLine[] */
71-
protected $lines;
71+
protected $lines = [];
7272

7373
/**
7474
* Get receipt date

src/Intacct/Functions/Company/AbstractAllocation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ abstract class AbstractAllocation extends AbstractFunction
4747
private $active;
4848

4949
/** @var AbstractAllocationLine[] */
50-
private $lines;
50+
private $lines = [];
5151

5252
/**
5353
* Get allocation ID

src/Intacct/Functions/Company/AbstractAttachments.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ abstract class AbstractAttachments extends AbstractFunction
3535
protected $description;
3636

3737
/** @var AttachmentInterface[] */
38-
protected $files;
38+
protected $files = [];
3939

4040
/**
4141
* Get attachments ID

src/Intacct/Functions/Company/AbstractUser.php

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ abstract class AbstractUser extends AbstractFunction
5858
/** @var bool */
5959
protected $webServicesOnly;
6060

61-
/** @var array */
62-
protected $restrictedEntities;
61+
/** @var string[] */
62+
protected $restrictedEntities = [];
6363

64-
/** @var array */
65-
protected $restrictedDepartments;
64+
/** @var string[] */
65+
protected $restrictedDepartments = [];
6666

6767
/** @var bool */
6868
protected $ssoEnabled;
@@ -171,39 +171,31 @@ public function setWebServicesOnly($webServicesOnly)
171171
}
172172

173173
/**
174-
* Get restricted entities
175-
*
176-
* @return array
174+
* @return string[]
177175
*/
178176
public function getRestrictedEntities()
179177
{
180178
return $this->restrictedEntities;
181179
}
182180

183181
/**
184-
* Set restricted entities
185-
*
186-
* @param array $restrictedEntities
182+
* @param string[] $restrictedEntities
187183
*/
188184
public function setRestrictedEntities($restrictedEntities)
189185
{
190186
$this->restrictedEntities = $restrictedEntities;
191187
}
192188

193189
/**
194-
* Get restricted departments
195-
*
196-
* @return array
190+
* @return string[]
197191
*/
198192
public function getRestrictedDepartments()
199193
{
200194
return $this->restrictedDepartments;
201195
}
202196

203197
/**
204-
* Set restricted departments
205-
*
206-
* @param array $restrictedDepartments
198+
* @param string[] $restrictedDepartments
207199
*/
208200
public function setRestrictedDepartments($restrictedDepartments)
209201
{

src/Intacct/Functions/EmployeeExpense/AbstractExpenseAdjustment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ abstract class AbstractExpenseAdjustment extends AbstractFunction
7171
protected $memo;
7272

7373
/** @var AbstractExpenseAdjustmentLine[] */
74-
protected $lines;
74+
protected $lines = [];
7575

7676
/**
7777
* @return int|string

src/Intacct/Functions/EmployeeExpense/AbstractExpenseReport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ abstract class AbstractExpenseReport extends AbstractFunction
6868
protected $memo;
6969

7070
/** @var AbstractExpenseReportLine[] */
71-
protected $lines;
71+
protected $lines = [];
7272

7373
/**
7474
* @return int|string

src/Intacct/Functions/EmployeeExpense/AbstractReimbursementRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ abstract class AbstractReimbursementRequest extends AbstractFunction
7171
protected $notificationContactName;
7272

7373
/** @var ReimbursementRequestItem[] */
74-
protected $applyToTransactions;
74+
protected $applyToTransactions = [];
7575

7676
/**
7777
* @return int|string

src/Intacct/Functions/GeneralLedger/AbstractGlBatch.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ abstract class AbstractGlBatch extends AbstractFunction
5353
protected $action;
5454

5555
/** @var AbstractGlEntry[] */
56-
protected $lines;
56+
protected $lines = [];
5757

5858
/**
5959
* @return int|string

src/Intacct/Functions/GeneralLedger/AbstractGlEntry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ abstract class AbstractGlEntry
6868
protected $warehouseId;
6969

7070
/** @var CustomAllocationSplit[] */
71-
protected $customAllocationSplits;
71+
protected $customAllocationSplits = [];
7272

7373
/**
7474
* @return string

src/Intacct/Functions/GlobalConsolidations/AbstractConsolidation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ abstract class AbstractConsolidation extends AbstractFunction
4242
protected $reportingPeriodName;
4343

4444
/** @var ConsolidationEntity[] */
45-
protected $entities;
45+
protected $entities = [];
4646

4747
/**
4848
* @return string

src/Intacct/Functions/InventoryControl/AbstractInventoryTransaction.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ abstract class AbstractInventoryTransaction extends AbstractFunction
6565
protected $state;
6666

6767
/** @var AbstractTransactionSubtotal[] */
68-
protected $subtotals;
68+
protected $subtotals = [];
6969

7070
/** @var AbstractInventoryTransactionLine[] */
71-
protected $lines;
71+
protected $lines = [];
7272

7373
/**
7474
* @return string

src/Intacct/Functions/InventoryControl/AbstractInventoryTransactionLine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ abstract class AbstractInventoryTransactionLine
4444
protected $cost;
4545

4646
/** @var AbstractTransactionItemDetail[] */
47-
protected $itemDetails;
47+
protected $itemDetails = [];
4848

4949
/** @var string */
5050
protected $departmentId;

src/Intacct/Functions/OrderEntry/AbstractOrderEntryTransaction.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ abstract class AbstractOrderEntryTransaction extends AbstractFunction
111111
protected $projectId;
112112

113113
/** @var AbstractTransactionSubtotal[] */
114-
protected $subtotals;
114+
protected $subtotals = [];
115115

116116
/** @var AbstractOrderEntryTransactionLine[] */
117-
protected $lines;
117+
protected $lines = [];
118118

119119
/**
120120
* @return string

src/Intacct/Functions/OrderEntry/AbstractOrderEntryTransactionLine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ abstract class AbstractOrderEntryTransactionLine
8181
protected $billingTemplate;
8282

8383
/** @var AbstractTransactionItemDetail[] */
84-
protected $itemDetails;
84+
protected $itemDetails = [];
8585

8686
/** @var string */
8787
protected $departmentId;

src/Intacct/Functions/Projects/AbstractTimesheet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ abstract class AbstractTimesheet extends AbstractFunction
4444
protected $action;
4545

4646
/** @var AbstractTimesheetEntry[] */
47-
protected $entries;
47+
protected $entries = [];
4848

4949
/**
5050
* @return int|string

src/Intacct/Functions/Purchasing/AbstractPurchasingTransaction.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ abstract class AbstractPurchasingTransaction extends AbstractFunction
114114
protected $projectId;
115115

116116
/** @var AbstractTransactionSubtotal[] */
117-
protected $subtotals;
117+
protected $subtotals = [];
118118

119119
/** @var AbstractPurchasingTransactionLine[] */
120-
protected $lines;
120+
protected $lines = [];
121121

122122
/**
123123
* @return string

src/Intacct/Functions/Purchasing/AbstractPurchasingTransactionLine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ abstract class AbstractPurchasingTransactionLine
6363
protected $billable;
6464

6565
/** @var AbstractTransactionItemDetail[] */
66-
protected $itemDetails;
66+
protected $itemDetails = [];
6767

6868
/** @var string */
6969
protected $departmentId;

src/Intacct/Xml/Request/OperationBlock.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function setAuthentication(AuthenticationInterface $authentication)
6666
}
6767

6868
/** @var FunctionInterface[] */
69-
private $content;
69+
private $content = [];
7070

7171
/**
7272
* @return FunctionInterface[]

src/Intacct/Xml/RequestHandler.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class RequestHandler
3232
{
3333

3434
/** @var string */
35-
const VERSION = '2.0';
35+
const VERSION = '2.0.4';
3636

3737
/** @var ClientConfig */
3838
private $clientConfig;
@@ -251,6 +251,7 @@ private function execute(\XMLWriter $xml): ResponseInterface
251251
'body' => $xml->flush(),
252252
'headers' => [
253253
'content-type' => 'application/xml',
254+
'Accept-Encoding' => 'gzip,deflate',
254255
'User-Agent' => "intacct-sdk-php-client/" . static::VERSION,
255256
],
256257
'timeout' => $this->requestConfig->getMaxTimeout()

0 commit comments

Comments
 (0)