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

Update to Guzzle 7 #11

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: PHP Composer

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Validate composer.json and composer.lock
run: composer validate

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-

- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest

- name: Run test suite
run: ./vendor/bin/phpunit
10 changes: 4 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@
"email": "seregazhuk88@gmail.com"
}
],
"minimum-stability": "dev",
"require": {
"php": ">=5.6",
"guzzlehttp/guzzle": "^6.2"
"php": ">=7.2",
"guzzlehttp/guzzle": "^6.2|^7.0"
},
"require-dev": {
"mockery/mockery": "^0.9.5",
"phpunit/phpunit": "~5.7",
"codeclimate/php-test-reporter": "dev-master"
"mockery/mockery": "^1.0",
"phpunit/phpunit": "^9.0"
},
"autoload": {
"psr-4": {
Expand Down
3 changes: 1 addition & 2 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
>
<testsuites>
<testsuite name="Favro PHP API Test Suite">
Expand All @@ -26,4 +25,4 @@
yui="true" highlight="true"
lowUpperBound="50" highLowerBound="80"/>
</logging>
</phpunit>
</phpunit>
2 changes: 1 addition & 1 deletion tests/ApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function it_uses_organization_for_further_requests()
/** @test */
public function it_throws_exception_for_wrong_endpoint()
{
$this->setExpectedException(WrongEndpoint::class);
$this->expectException(WrongEndpoint::class);
$api = $this->makeApi();
$api->test->getAll();
}
Expand Down