Skip to content

Commit 7f1fa6f

Browse files
authored
Merge pull request #5 from jtl-software/EA-5554
EA-5554: Update to deps and code to PHP8.2
2 parents 65115ba + 522f005 commit 7f1fa6f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2048
-2684
lines changed

.github/workflows/testing.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: UnitTesting
2+
3+
on: [push]
4+
5+
jobs:
6+
tests:
7+
name: "Tests"
8+
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
php-version:
15+
- "8.2"
16+
17+
steps:
18+
- name: "Install PHP"
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: "${{ matrix.php-version }}"
22+
coverage: xdebug3
23+
24+
- name: "Checkout"
25+
uses: actions/checkout@v2
26+
27+
- name: "Install dependencies"
28+
run: composer install --prefer-dist --no-progress
29+
30+
- name: "Check Code Style"
31+
run: composer phpcs-dry
32+
env:
33+
PHP_CS_FIXER_IGNORE_ENV: 1
34+
35+
- name: "Run PHP Static Analysis Tool"
36+
run: vendor/bin/phpstan
37+
38+
- name: "Run test suite"
39+
run: vendor/bin/phpunit

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@
44
var/
55
build
66
.php_cs.cache
7-
**/.phpunit.result.cache
7+
**/.phpunit.result.cache
8+
/.phpunit.cache
9+
/.php-cs-fixer.cache
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<?php declare(strict_types=1);
22

3+
require_once __DIR__ . '/vendor/autoload.php';
4+
35
$finder = PhpCsFixer\Finder::create();
46
$finder->in(['src', 'tests', 'public']);
57

6-
$config = PhpCsFixer\Config::create();
8+
$config = new PhpCsFixer\Config();
79
$config->setFinder($finder);
8-
$config->setRules(['@PSR2' => true]);
10+
$config->setRules(['@PSR12' => true]);
911

1012
return $config;

.phpunit.result.cache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
C:37:"PHPUnit\Runner\DefaultTestResultCache":4793:{a:2:{s:7:"defects";a:0:{}s:5:"times";a:63:{s:74:"JTL\OpsGenie\Client\Alert\AlertTest::testCanCreateAlertWithDefaultPriority";d:0.002;s:67:"JTL\OpsGenie\Client\Alert\AlertTest::testCanCreateAlertWithPriority";d:0;s:54:"JTL\OpsGenie\Client\Alert\AlertTest::testCanReadEntity";d:0;s:53:"JTL\OpsGenie\Client\Alert\AlertTest::testCanReadAlias";d:0;s:55:"JTL\OpsGenie\Client\Alert\AlertTest::testCanReadMessage";d:0;s:54:"JTL\OpsGenie\Client\Alert\AlertTest::testCanReadSource";d:0;s:62:"JTL\OpsGenie\Client\Alert\AlertTest::testDescriptionIsOptional";d:0;s:58:"JTL\OpsGenie\Client\Alert\AlertTest::testCanSetDescription";d:0;s:60:"JTL\OpsGenie\Client\Alert\AlertTest::testResponderIsOptional";d:0;s:53:"JTL\OpsGenie\Client\Alert\AlertTest::testSetResponder";d:0.003;s:54:"JTL\OpsGenie\Client\Alert\AlertTest::testTagIsOptional";d:0;s:50:"JTL\OpsGenie\Client\Alert\AlertTest::testAppendTag";d:0;s:72:"JTL\OpsGenie\Client\Alert\CloseAlertRequestTest::testCanCreateCorrectUrl";d:0;s:68:"JTL\OpsGenie\Client\Alert\CloseAlertRequestTest::testUrlIsUrlEncoded";d:0;s:66:"JTL\OpsGenie\Client\Alert\CloseAlertRequestTest::testNotIsOptional";d:0;s:63:"JTL\OpsGenie\Client\Alert\CloseAlertRequestTest::testCanSetNote";d:0;s:67:"JTL\OpsGenie\Client\Alert\CloseAlertRequestTest::testUserIsOptional";d:0;s:63:"JTL\OpsGenie\Client\Alert\CloseAlertRequestTest::testCanSetUser";d:0;s:69:"JTL\OpsGenie\Client\Alert\CloseAlertRequestTest::testSourceIsOptional";d:0;s:65:"JTL\OpsGenie\Client\Alert\CloseAlertRequestTest::testCanSetSource";d:0;s:69:"JTL\OpsGenie\Client\Alert\CloseAlertRequestTest::testCanGetHttpMethod";d:0;s:77:"JTL\OpsGenie\Client\Alert\CloseAlertResponseTest::testHttpCode202IsSuccessful";d:0;s:75:"JTL\OpsGenie\Client\Alert\CreateAlertRequestTest::testCanCreateAlertRequest";d:0.001;s:71:"JTL\OpsGenie\Client\Alert\CreateAlertRequestTest::testCanSetDescription";d:0.002;s:72:"JTL\OpsGenie\Client\Alert\CreateAlertRequestTest::testCanAppendResponder";d:0;s:67:"JTL\OpsGenie\Client\Alert\CreateAlertRequestTest::testCanAppendTags";d:0;s:71:"JTL\OpsGenie\Client\Alert\CreateAlertRequestTest::testCanGetRequestBody";d:0.001;s:70:"JTL\OpsGenie\Client\Alert\CreateAlertRequestTest::testHttpMethodIsPost";d:0;s:65:"JTL\OpsGenie\Client\Alert\CreateAlertRequestTest::testUrlIsAlerts";d:0;s:78:"JTL\OpsGenie\Client\Alert\CreateAlertResponseTest::testHttpCode202IsSuccessful";d:0;s:70:"JTL\OpsGenie\Client\Alert\GetAlertRequestTest::testCanCreateCorrectUrl";d:0;s:80:"JTL\OpsGenie\Client\Alert\GetAlertRequestTest::testCanCreateCorrectUrlEncodedUrl";d:0;s:58:"JTL\OpsGenie\Client\Alert\GetAlertRequestTest::testGetBody";d:0;s:64:"JTL\OpsGenie\Client\Alert\GetAlertRequestTest::testGetHttpMethod";d:0;s:64:"JTL\OpsGenie\Client\Alert\GetAlertResponseTest::testIsSuccessful";d:0;s:81:"JTL\OpsGenie\Client\Alert\GetAlertResponseTest::testCanConstructAlertFromResponse";d:0;s:82:"JTL\OpsGenie\Client\Alert\GetAlertResponseTest::testNoAlertIsConstructedWhenNoData";d:0;s:69:"JTL\OpsGenie\Client\AlertApiClientTest::testCanSendCreateAlertRequest";d:0.001;s:66:"JTL\OpsGenie\Client\AlertApiClientTest::testCanSendGetAlertRequest";d:0.001;s:68:"JTL\OpsGenie\Client\AlertApiClientTest::testCanSendCloseAlertRequest";d:0.001;s:58:"JTL\OpsGenie\Client\ErrorResponseTest::testIsNotSuccessful";d:0;s:66:"JTL\OpsGenie\Client\Heartbeat\PingRequestTest::testHttpMethodIsPut";d:0;s:62:"JTL\OpsGenie\Client\Heartbeat\PingRequestTest::testBodyIsEmpty";d:0;s:57:"JTL\OpsGenie\Client\Heartbeat\PingRequestTest::testGetUrl";d:0;s:64:"JTL\OpsGenie\Client\Heartbeat\PingResponseTest::testIsSuccessful";d:0;s:67:"JTL\OpsGenie\Client\Heartbeat\PingResponseTest::testIsNotSuccessful";d:0;s:56:"JTL\OpsGenie\Client\HeartbeatApiClientTest::testSendPing";d:0.001;s:56:"JTL\OpsGenie\Client\OpsGenieResponseTest::testGetMessage";d:0;s:59:"JTL\OpsGenie\Client\OpsGenieResponseTest::testGetStatusCode";d:0;s:58:"JTL\OpsGenie\Client\OpsGenieResponseTest::testGetRequestId";d:0;s:57:"JTL\OpsGenie\Client\OpsGenieResponseTest::testGetFromBody";d:0;s:55:"JTL\OpsGenie\Client\PriorityTest::testCanCreateCritical";d:0;s:51:"JTL\OpsGenie\Client\PriorityTest::testCanCreateHigh";d:0;s:55:"JTL\OpsGenie\Client\PriorityTest::testCanCreateModerate";d:0;s:50:"JTL\OpsGenie\Client\PriorityTest::testCanCreateLow";d:0;s:60:"JTL\OpsGenie\Client\PriorityTest::testCanCreateInformational";d:0;s:53:"JTL\OpsGenie\Client\PriorityTest::testCanCastToString";d:0;s:55:"JTL\OpsGenie\Client\ResponderTest::testCanCreateForTeam";d:0;s:55:"JTL\OpsGenie\Client\ResponderTest::testCanCreateForUser";d:0;s:61:"JTL\OpsGenie\Client\ResponderTest::testCanCreateForEscalation";d:0;s:59:"JTL\OpsGenie\Client\ResponderTest::testCanCreateForSchedule";d:0;s:48:"JTL\OpsGenie\Client\ResponderTest::testCanReadId";d:0;s:50:"JTL\OpsGenie\Client\ResponderTest::testCanReadType";d:0;}}}
1+
{"version":1,"defects":[],"times":{"JTL\\OpsGenie\\Client\\Alert\\AlertTest::testCanCreateAlertWithDefaultPriority":0.002,"JTL\\OpsGenie\\Client\\Alert\\AlertTest::testCanCreateAlertWithPriority":0,"JTL\\OpsGenie\\Client\\Alert\\AlertTest::testCanReadEntity":0,"JTL\\OpsGenie\\Client\\Alert\\AlertTest::testCanReadAlias":0,"JTL\\OpsGenie\\Client\\Alert\\AlertTest::testCanReadMessage":0,"JTL\\OpsGenie\\Client\\Alert\\AlertTest::testCanReadSource":0,"JTL\\OpsGenie\\Client\\Alert\\AlertTest::testDescriptionIsOptional":0,"JTL\\OpsGenie\\Client\\Alert\\AlertTest::testCanSetDescription":0,"JTL\\OpsGenie\\Client\\Alert\\AlertTest::testResponderIsOptional":0,"JTL\\OpsGenie\\Client\\Alert\\AlertTest::testSetResponder":0.003,"JTL\\OpsGenie\\Client\\Alert\\AlertTest::testTagIsOptional":0,"JTL\\OpsGenie\\Client\\Alert\\AlertTest::testAppendTag":0,"JTL\\OpsGenie\\Client\\Alert\\CloseAlertRequestTest::testCanCreateCorrectUrl":0.001,"JTL\\OpsGenie\\Client\\Alert\\CloseAlertRequestTest::testUrlIsUrlEncoded":0,"JTL\\OpsGenie\\Client\\Alert\\CloseAlertRequestTest::testNotIsOptional":0.001,"JTL\\OpsGenie\\Client\\Alert\\CloseAlertRequestTest::testCanSetNote":0,"JTL\\OpsGenie\\Client\\Alert\\CloseAlertRequestTest::testUserIsOptional":0,"JTL\\OpsGenie\\Client\\Alert\\CloseAlertRequestTest::testCanSetUser":0,"JTL\\OpsGenie\\Client\\Alert\\CloseAlertRequestTest::testSourceIsOptional":0,"JTL\\OpsGenie\\Client\\Alert\\CloseAlertRequestTest::testCanSetSource":0,"JTL\\OpsGenie\\Client\\Alert\\CloseAlertRequestTest::testCanGetHttpMethod":0,"JTL\\OpsGenie\\Client\\Alert\\CloseAlertResponseTest::testHttpCode202IsSuccessful":0,"JTL\\OpsGenie\\Client\\Alert\\CreateAlertRequestTest::testCanCreateAlertRequest":0.002,"JTL\\OpsGenie\\Client\\Alert\\CreateAlertRequestTest::testCanSetDescription":0.003,"JTL\\OpsGenie\\Client\\Alert\\CreateAlertRequestTest::testCanAppendResponder":0.001,"JTL\\OpsGenie\\Client\\Alert\\CreateAlertRequestTest::testCanAppendTags":0.001,"JTL\\OpsGenie\\Client\\Alert\\CreateAlertRequestTest::testCanGetRequestBody":0.002,"JTL\\OpsGenie\\Client\\Alert\\CreateAlertRequestTest::testHttpMethodIsPost":0,"JTL\\OpsGenie\\Client\\Alert\\CreateAlertRequestTest::testUrlIsAlerts":0,"JTL\\OpsGenie\\Client\\Alert\\CreateAlertResponseTest::testHttpCode202IsSuccessful":0,"JTL\\OpsGenie\\Client\\Alert\\GetAlertRequestTest::testCanCreateCorrectUrl":0,"JTL\\OpsGenie\\Client\\Alert\\GetAlertRequestTest::testCanCreateCorrectUrlEncodedUrl":0,"JTL\\OpsGenie\\Client\\Alert\\GetAlertRequestTest::testGetBody":0,"JTL\\OpsGenie\\Client\\Alert\\GetAlertRequestTest::testGetHttpMethod":0,"JTL\\OpsGenie\\Client\\Alert\\GetAlertResponseTest::testIsSuccessful":0.001,"JTL\\OpsGenie\\Client\\Alert\\GetAlertResponseTest::testCanConstructAlertFromResponse":0,"JTL\\OpsGenie\\Client\\Alert\\GetAlertResponseTest::testNoAlertIsConstructedWhenNoData":0,"JTL\\OpsGenie\\Client\\AlertApiClientTest::testCanSendCreateAlertRequest":0.003,"JTL\\OpsGenie\\Client\\AlertApiClientTest::testCanSendGetAlertRequest":0.002,"JTL\\OpsGenie\\Client\\AlertApiClientTest::testCanSendCloseAlertRequest":0.002,"JTL\\OpsGenie\\Client\\ErrorResponseTest::testIsNotSuccessful":0,"JTL\\OpsGenie\\Client\\Heartbeat\\PingRequestTest::testHttpMethodIsPut":0,"JTL\\OpsGenie\\Client\\Heartbeat\\PingRequestTest::testBodyIsEmpty":0,"JTL\\OpsGenie\\Client\\Heartbeat\\PingRequestTest::testGetUrl":0,"JTL\\OpsGenie\\Client\\Heartbeat\\PingResponseTest::testIsSuccessful":0,"JTL\\OpsGenie\\Client\\Heartbeat\\PingResponseTest::testIsNotSuccessful":0,"JTL\\OpsGenie\\Client\\HeartbeatApiClientTest::testSendPing":0.002,"JTL\\OpsGenie\\Client\\OpsGenieResponseTest::testGetMessage":0,"JTL\\OpsGenie\\Client\\OpsGenieResponseTest::testGetStatusCode":0,"JTL\\OpsGenie\\Client\\OpsGenieResponseTest::testGetRequestId":0,"JTL\\OpsGenie\\Client\\OpsGenieResponseTest::testGetFromBody":0,"JTL\\OpsGenie\\Client\\PriorityTest::testCanCreateCritical":0,"JTL\\OpsGenie\\Client\\PriorityTest::testCanCreateHigh":0,"JTL\\OpsGenie\\Client\\PriorityTest::testCanCreateModerate":0,"JTL\\OpsGenie\\Client\\PriorityTest::testCanCreateLow":0,"JTL\\OpsGenie\\Client\\PriorityTest::testCanCreateInformational":0,"JTL\\OpsGenie\\Client\\PriorityTest::testCanCastToString":0,"JTL\\OpsGenie\\Client\\ResponderTest::testCanCreateForTeam":0,"JTL\\OpsGenie\\Client\\ResponderTest::testCanCreateForUser":0,"JTL\\OpsGenie\\Client\\ResponderTest::testCanCreateForEscalation":0,"JTL\\OpsGenie\\Client\\ResponderTest::testCanCreateForSchedule":0,"JTL\\OpsGenie\\Client\\ResponderTest::testCanReadId":0,"JTL\\OpsGenie\\Client\\ResponderTest::testCanReadType":0}}

.travis-ci

Whitespace-only changes.

.travis.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

composer

Lines changed: 0 additions & 1 deletion
This file was deleted.

composer.json

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@
99
}
1010
],
1111
"require": {
12-
"php": ">=7.2",
13-
"guzzlehttp/guzzle": "^7.2"
12+
"php": "^8.2",
13+
"guzzlehttp/guzzle": "^7.8"
1414
},
1515
"require-dev": {
16-
"phpunit/phpunit": "^9.0",
17-
"friendsofphp/php-cs-fixer": "^2.12",
18-
"phpstan/phpstan": "^0.10.5"
16+
"phpunit/phpunit": "^10.4.2",
17+
"friendsofphp/php-cs-fixer": "^3.40",
18+
"phpstan/phpstan": "^1.10.46",
19+
"rector/rector": "^0.18.11"
1920
},
2021
"autoload": {
2122
"psr-4": {
@@ -27,14 +28,24 @@
2728
"JTL\\OpsGenie\\Client\\": "tests"
2829
}
2930
},
30-
"config": {
31-
"platform": {
32-
"php": "7.2"
33-
}
34-
},
3531
"scripts": {
32+
"tests": [
33+
"composer phpcs",
34+
"composer phpstan",
35+
"composer phpunit",
36+
"composer infection"
37+
],
38+
"phpunit": [
39+
"vendor/bin/phpunit"
40+
],
41+
"phpstan": [
42+
"vendor/bin/phpstan"
43+
],
3644
"phpcs": [
37-
"./php-cs-fixer fix --config=./.php_cs.dist"
45+
"vendor/bin/php-cs-fixer fix --config=./.php-cs-fixer.dist.php"
46+
],
47+
"phpcs-dry": [
48+
"vendor/bin/php-cs-fixer fix --config=./.php-cs-fixer.dist.php --dry-run"
3849
]
3950
}
4051
}

0 commit comments

Comments
 (0)