Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to PHP 7.1+ #271

Merged
merged 2 commits into from
Jan 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 20 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: 2
jobs:
build:
test-7.3: &test-template
docker:
- image: circleci/php:5.6
- image: circleci/php:7.3

working_directory: ~/intercom-php

Expand All @@ -11,3 +11,21 @@ jobs:
- run: composer install --no-interaction
- run: vendor/bin/phpunit
- run: vendor/bin/phpcs --standard=PSR2 src test

test-7.2:
<<: *test-template
docker:
- image: circleci/php:7.2

test-7.1:
<<: *test-template
docker:
- image: circleci/php:7.1

workflows:
version: 2
test_on_supported_php_versions:
jobs:
- test-7.3
- test-7.2
- test-7.1
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Official PHP bindings to the Intercom API

## Installation

Requires PHP 5.6.
This library supports PHP 7.1 and later

The recommended way to install intercom-php is through [Composer](https://getcomposer.org):

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
}
},
"require": {
"php": ">= 5.6",
"php": ">= 7.1",
"ext-json": "*",
"guzzlehttp/guzzle": "~6.0"
},
"require-dev": {
"phpunit/phpunit": "4.0.*",
"phpunit/phpunit": "^7.0",
"squizlabs/php_codesniffer": "^3.1"
}
}
3 changes: 1 addition & 2 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why have we removed this syntax check?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That argument has been removed from the last versions of PHPUnit, see the answer by PHPUnit author here. I googled all I could and I can't even find what exactly that was doing 😕

stopOnFailure="false">
<testsuites>
<testsuite name="Intercom Test Suite">
<directory suffix=".php">./test/</directory>
Expand Down
4 changes: 2 additions & 2 deletions test/IntercomAdminsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace Intercom\Test;

use Intercom\IntercomAdmins;
use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;

class IntercomAdminsTest extends PHPUnit_Framework_TestCase
class IntercomAdminsTest extends TestCase
{
public function testAdminsList()
{
Expand Down
4 changes: 2 additions & 2 deletions test/IntercomBulkTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace Intercom\Test;

use Intercom\IntercomBulk;
use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;

class IntercomBulkTest extends PHPUnit_Framework_TestCase
class IntercomBulkTest extends TestCase
{
public function testBulkUsers()
{
Expand Down
4 changes: 2 additions & 2 deletions test/IntercomClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
use GuzzleHttp\Psr7\Response;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Middleware;
use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;
use stdClass;

class IntercomClientTest extends PHPUnit_Framework_TestCase
class IntercomClientTest extends TestCase
{
public function testBasicClient()
{
Expand Down
4 changes: 2 additions & 2 deletions test/IntercomCompaniesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace Intercom\Test;

use Intercom\IntercomCompanies;
use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;

class IntercomCompaniesTest extends PHPUnit_Framework_TestCase
class IntercomCompaniesTest extends TestCase
{
public function testCompanyCreate()
{
Expand Down
4 changes: 2 additions & 2 deletions test/IntercomConversationsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace Intercom\Test;

use Intercom\IntercomConversations;
use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;

class IntercomConversationsTest extends PHPUnit_Framework_TestCase
class IntercomConversationsTest extends TestCase
{
public function testConversationsList()
{
Expand Down
4 changes: 2 additions & 2 deletions test/IntercomCountsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace Intercom\Test;

use Intercom\IntercomCounts;
use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;

class IntercomCountsTest extends PHPUnit_Framework_TestCase
class IntercomCountsTest extends TestCase
{
public function testCountsList()
{
Expand Down
4 changes: 2 additions & 2 deletions test/IntercomEventsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace Intercom\Test;

use Intercom\IntercomEvents;
use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;

class IntercomEventsTest extends PHPUnit_Framework_TestCase
class IntercomEventsTest extends TestCase
{
public function testEventCreate()
{
Expand Down
4 changes: 2 additions & 2 deletions test/IntercomLeadsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace Intercom\Test;

use Intercom\IntercomLeads;
use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;

class IntercomLeadsTest extends PHPUnit_Framework_TestCase
class IntercomLeadsTest extends TestCase
{
public function testLeadCreate()
{
Expand Down
4 changes: 2 additions & 2 deletions test/IntercomMessagesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace Intercom\Test;

use Intercom\IntercomMessages;
use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;

class IntercomMessagesTest extends PHPUnit_Framework_TestCase
class IntercomMessagesTest extends TestCase
{
public function testMessageCreate()
{
Expand Down
4 changes: 2 additions & 2 deletions test/IntercomNotesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace Intercom\Test;

use Intercom\IntercomNotes;
use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;

class IntercomNotesTest extends PHPUnit_Framework_TestCase
class IntercomNotesTest extends TestCase
{
public function testNoteCreate()
{
Expand Down
4 changes: 2 additions & 2 deletions test/IntercomSegmentsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace Intercom\Test;

use Intercom\IntercomSegments;
use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;

class IntercomSegmentTest extends PHPUnit_Framework_TestCase
class IntercomSegmentTest extends TestCase
{

public function testSegmentList()
Expand Down
4 changes: 2 additions & 2 deletions test/IntercomTagsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace Intercom\Test;

use Intercom\IntercomTags;
use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;

class IntercomTagsTest extends PHPUnit_Framework_TestCase
class IntercomTagsTest extends TestCase
{
public function testTagUsers()
{
Expand Down
4 changes: 2 additions & 2 deletions test/IntercomUsersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace Intercom\Test;

use Intercom\IntercomUsers;
use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;

class IntercomUsersTest extends PHPUnit_Framework_TestCase
class IntercomUsersTest extends TestCase
{
public function testUserCreate()
{
Expand Down
4 changes: 2 additions & 2 deletions test/IntercomVisitorsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace Intercom\Test;

use Intercom\IntercomVisitors;
use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;

class IntercomVisitorsTest extends PHPUnit_Framework_TestCase
class IntercomVisitorsTest extends TestCase
{

public function testVisitorUpdate()
Expand Down