Skip to content

Commit

Permalink
Merge pull request #48 from taxjar/updates-test-assertions
Browse files Browse the repository at this point in the history
Updates minimum PHP version support and deprecated test assertions
  • Loading branch information
sethobey authored Oct 1, 2022
2 parents 337b46e + adb6ef0 commit d170a1f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
language: php

php:
- 7.2
- 7.3
- 7.4
- 8.0
- 8.1.0

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Official PHP client for Sales Tax API v2. For the REST documentation, please vis

## Requirements

- PHP 5.5.0 and later.
- PHP 8.0 and later.
- [Guzzle](https://github.com/guzzle/guzzle) (included via Composer).

## Installation
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "taxjar/taxjar-php",
"description": "Sales Tax API Client for PHP 5.5+",
"description": "Sales Tax API Client for PHP 8.0+",
"keywords": [
"taxjar",
"sales tax",
Expand All @@ -14,12 +14,12 @@
}
],
"require": {
"php": "^7.2|^8.0",
"php": "^8.0",
"ext-json": "*",
"guzzlehttp/guzzle": "^6.0.2|^7.0.1"
"guzzlehttp/guzzle": "^7.2"
},
"require-dev": {
"phpunit/phpunit": "^8.5"
"phpunit/phpunit": "^9.3"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions test/specs/ConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function testGetCustomHeaders()

$this->assertEquals($headers['Authorization'], 'Bearer test');
$this->assertEquals($headers['Content-Type'], 'application/json');
$this->assertRegExp('/TaxJar\/PHP \(.*\) taxjar-php\/\d+\.\d+\.\d+/', $headers['User-Agent']);
$this->assertMatchesRegularExpression('/TaxJar\/PHP \(.*\) taxjar-php\/\d+\.\d+\.\d+/', $headers['User-Agent']);
}

public function testSetCustomHeaders()
Expand All @@ -48,6 +48,6 @@ public function testSetCustomHeaders()
$this->assertEquals($headers['Authorization'], 'Bearer test');
$this->assertEquals($headers['Content-Type'], 'application/json');
$this->assertEquals($headers['X-TJ-Expected-Response'], 422);
$this->assertRegExp('/TaxJar\/PHP \(.*\) taxjar-php\/\d+\.\d+\.\d+/', $headers['User-Agent']);
$this->assertMatchesRegularExpression('/TaxJar\/PHP \(.*\) taxjar-php\/\d+\.\d+\.\d+/', $headers['User-Agent']);
}
}

0 comments on commit d170a1f

Please sign in to comment.