Skip to content

Commit

Permalink
Merge pull request #94 from campaignmonitor/update-user-agent
Browse files Browse the repository at this point in the history
Update user agent to standard + get TravisCI build green
  • Loading branch information
taledo authored Jul 24, 2019
2 parents d578890 + 0d48d54 commit 3002903
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
21 changes: 14 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
language: php

php:
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0
- hhvm
matrix:
include:
- php: 5.3
dist: precise
- php: 5.4
dist: trusty
- php: 5.5
dist: trusty
- php: 5.6
- php: 7.0
- php: 7.1
- php: 7.2
- php: 7.3
- php: hhvm-3.30

before_script: composer install --dev
script: cd tests && php all_tests.php && cd ..
6 changes: 3 additions & 3 deletions class/base_classes.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require_once dirname(__FILE__).'/transport.php';
require_once dirname(__FILE__).'/log.php';

defined('CS_REST_WRAPPER_VERSION') or define('CS_REST_WRAPPER_VERSION', '6.0.0');
defined('CS_REST_WRAPPER_VERSION') or define('CS_REST_WRAPPER_VERSION', '6.0.1');
defined('CS_HOST') or define('CS_HOST', 'api.createsend.com');
defined('CS_OAUTH_BASE_URI') or define('CS_OAUTH_BASE_URI', 'https://'.CS_HOST.'/oauth');
defined('CS_OAUTH_TOKEN_URI') or define('CS_OAUTH_TOKEN_URI', CS_OAUTH_BASE_URI.'/token');
Expand Down Expand Up @@ -164,7 +164,7 @@ function __construct(

$this->_default_call_options = array (
'authdetails' => $auth_details,
'userAgent' => 'CS_REST_Wrapper v'.CS_REST_WRAPPER_VERSION.
'userAgent' => 'createsend-php v'.CS_REST_WRAPPER_VERSION.
' PHPv'.phpversion().' over '.$transport_type.' with '.$this->_serialiser->get_type(),
'contentType' => 'application/json; charset=utf-8',
'deserialise' => true,
Expand Down Expand Up @@ -257,7 +257,7 @@ function get_request_with_params($route, $params) {
function get_request_paged($route, $page_number, $page_size, $order_field, $order_direction, $include_tracking_pref = NULL,
$join_char = 'deprecated') {
// Stores our query values
$query = [];
$query = array();
// Extract any initial queries in the route into our local query
if(strpos($route, '?') !== false) {
$parts = parse_url($route);
Expand Down
2 changes: 1 addition & 1 deletion tests/csrest_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function set_up_inner() {
function get_call_options($route, $method = 'GET') {
return array (
'authdetails' => $this->auth,
'userAgent' => 'CS_REST_Wrapper v'.CS_REST_WRAPPER_VERSION.
'userAgent' => 'createsend-php v'.CS_REST_WRAPPER_VERSION.
' PHPv'.phpversion().' over '.$this->transport_type.' with '.$this->serialisation_type,
'contentType' => 'application/json; charset=utf-8',
'deserialise' => true,
Expand Down

0 comments on commit 3002903

Please sign in to comment.