-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from fw4-bvba/feature/feat_new_api_implementation
Setle API Update
- Loading branch information
Showing
27 changed files
with
388 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
name: "Tests" | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
phpunit-7: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
php: [7.1, 7.4] | ||
dependency-version: [prefer-lowest, prefer-stable] | ||
|
||
name: PHPUnit ${{ matrix.php }} - ${{ matrix.dependency-version }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.composer/cache/files | ||
key: php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
coverage: none | ||
tools: composer:v1, phpunit:7.5 | ||
|
||
- name: Install dependencies | ||
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-progress | ||
|
||
- name: Execute tests | ||
run: phpunit | ||
phpunit-8: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
php: [8.0, 8.1] | ||
dependency-version: [prefer-lowest, prefer-stable] | ||
|
||
name: PHPUnit ${{ matrix.php }} - ${{ matrix.dependency-version }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.composer/cache/files | ||
key: php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
coverage: none | ||
tools: phpunit:9.5 | ||
|
||
- name: Install dependencies | ||
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-progress | ||
|
||
- name: Execute tests | ||
run: phpunit | ||
phpcs: | ||
runs-on: ubuntu-latest | ||
|
||
name: PHP CodeSniffer | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.composer/cache/files | ||
key: php-8.1-composer-${{ hashFiles('composer.json') }} | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.1 | ||
extensions: mbstring, dom, curl, libxml, zip, pcntl, intl, exif, iconv | ||
coverage: none | ||
|
||
- name: Install dependencies | ||
run: composer update --prefer-stable --prefer-dist --no-interaction --no-progress | ||
|
||
- name: Execute PHPCS | ||
run: vendor/bin/phpcs | ||
|
||
phpstan: | ||
runs-on: ubuntu-latest | ||
|
||
name: PHPStan | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.composer/cache/files | ||
key: php-8.1-composer-${{ hashFiles('composer.json') }} | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.1 | ||
extensions: mbstring, dom, curl, libxml, zip, pcntl, intl, exif, iconv | ||
coverage: none | ||
|
||
- name: Install dependencies | ||
run: composer update --prefer-stable --prefer-dist --no-interaction --no-progress | ||
|
||
- name: Execute PHPStan | ||
run: vendor/bin/phpstan |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
/composer.lock | ||
/coverage | ||
/vendor | ||
/.phpunit.result.cache | ||
/.phpunit.result.cache | ||
/.phpcs-cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0"?> | ||
<ruleset> | ||
<arg name="basepath" value="."/> | ||
<arg name="extensions" value="php"/> | ||
<arg name="cache" value=".phpcs-cache"/> | ||
<arg name="colors"/> | ||
|
||
<arg value="nps"/> | ||
|
||
<file>src</file> | ||
<file>tests</file> | ||
|
||
<rule ref="PSR12"/> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
parameters: | ||
level: 8 | ||
paths: | ||
- src | ||
- tests | ||
universalObjectCratesClasses: | ||
- Setle\Response\ResponseObject | ||
ignoreErrors: | ||
- | ||
message: '#^Argument of an invalid type iterable\|object supplied for foreach, only iterables are supported\.$#' | ||
path: src/Response/ResponseObject.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,4 @@ | |
|
||
class ApiException extends \Exception | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,4 @@ | |
|
||
class AuthException extends \Exception | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the fw4/setle-api library | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Setle\Exception; | ||
|
||
class FailedJsonEncodingException extends \Exception | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,4 @@ | |
|
||
class InvalidPropertyException extends \Exception | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,4 @@ | |
|
||
class NotFoundException extends \Exception | ||
{ | ||
|
||
} |
Oops, something went wrong.