Skip to content

Commit 74aa3c5

Browse files
added support for php8.4 and php8.5
1 parent d0e0abf commit 74aa3c5

41 files changed

Lines changed: 86 additions & 84 deletions

Some content is hidden

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

.github/workflows/php-test-workflow.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ jobs:
1919
dependencies-preference: " "
2020
- php: '8.3'
2121
dependencies-preference: "--prefer-lowest"
22+
- php: '8.4'
23+
dependencies-preference: " "
24+
- php: '8.4'
25+
dependencies-preference: "--prefer-lowest"
26+
- php: '8.5'
27+
dependencies-preference: " "
28+
- php: '8.5'
29+
dependencies-preference: "--prefer-lowest"
2230
fail-fast: false
2331
steps:
2432
- uses: actions/checkout@v4

composer.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"homepage": "http://github.com/apigee/apigee-client-php",
1414
"license": "Apache-2.0",
1515
"require": {
16-
"php": "~8.2 || ~8.3",
16+
"php": "~8.2 || ~8.3 || ~8.4 || ~8.5",
1717
"ext-json": "*",
1818
"ext-openssl": "*",
1919
"ext-reflection": "*",
@@ -28,10 +28,10 @@
2828
"php-http/message-factory": "^1.0",
2929
"phpdocumentor/reflection-docblock": "^5.0",
3030
"psr/http-message": "^1.0 || ^2.0",
31-
"symfony/options-resolver": "^7.4.0",
32-
"symfony/property-access": "^7.4.4",
33-
"symfony/property-info": "^7.4.0",
34-
"symfony/serializer": "^7.3.0"
31+
"symfony/options-resolver": "^7.4.8",
32+
"symfony/property-access": "^7.4.8",
33+
"symfony/property-info": "^7.4.8",
34+
"symfony/serializer": "^7.4.8"
3535
},
3636
"require-dev": {
3737
"dms/phpunit-arraysubset-asserts": "^0.4.0",
@@ -46,10 +46,10 @@
4646
"phpmetrics/phpmetrics": "^2.7",
4747
"phpunit/phpunit": "^9.6",
4848
"sebastian/comparator": "^4.0.5",
49-
"symfony/cache": "^7.3.0",
50-
"symfony/type-info": "^7.3.0",
51-
"symfony/var-exporter": "^7.3.0",
52-
"vimeo/psalm": "^5.20"
49+
"symfony/cache": "^7.4.8",
50+
"symfony/type-info": "^7.4.8",
51+
"symfony/var-exporter": "^7.4.8",
52+
"vimeo/psalm": "^6.0"
5353
},
5454
"autoload": {
5555
"psr-4": {

phpunit.xml.dist

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
32
<!--
43
~ Copyright 2018 Google LLC
54
~
@@ -15,17 +14,15 @@
1514
~ See the License for the specific language governing permissions and
1615
~ limitations under the License.
1716
-->
18-
19-
<phpunit
20-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.4/phpunit.xsd"
22-
colors="true"
23-
bootstrap="./vendor/autoload.php"
24-
printerClass="LimeDeck\Testing\Printer"
25-
verbose="true">
26-
<php>
27-
<!-- Apigee Edge credentials - uncomment and change these lines to change to an online test. -->
28-
<!--
17+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" colors="true" bootstrap="./vendor/autoload.php" printerClass="LimeDeck\Testing\Printer" verbose="true">
18+
<coverage>
19+
<include>
20+
<directory suffix=".php">./src</directory>
21+
</include>
22+
</coverage>
23+
<php>
24+
<!-- Apigee Edge credentials - uncomment and change these lines to change to an online test. -->
25+
<!--
2926
<env name="APIGEE_EDGE_PHP_CLIENT_API_CLIENT" value="\Apigee\Edge\Tests\Test\Client"/>
3027
<env name="APIGEE_EDGE_PHP_CLIENT_HTTP_CLIENT" value="\Http\Adapter\Guzzle6\Client"/>
3128
<env name="APIGEE_EDGE_PHP_CLIENT_ORGANIZATION" value="myorg"/>
@@ -34,15 +31,10 @@
3431
<env name="APIGEE_EDGE_PHP_CLIENT_ENVIRONMENT" value="prod"/>
3532
<env name="APIGEE_EDGE_ENDPOINT" value="https://api.enterprise.apigee.com/v1"/>
3633
-->
37-
</php>
38-
<testsuites>
39-
<testsuite name="All Apigee Edge PHP API Client Tests">
40-
<directory>tests/</directory>
41-
</testsuite>
42-
</testsuites>
43-
<filter>
44-
<whitelist>
45-
<directory suffix=".php">./src</directory>
46-
</whitelist>
47-
</filter>
34+
</php>
35+
<testsuites>
36+
<testsuite name="All Apigee Edge PHP API Client Tests">
37+
<directory>tests/</directory>
38+
</testsuite>
39+
</testsuites>
4840
</phpunit>

psalm.xml.dist

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
allowStringToStandInForClass="true"
88
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xmlns="https://getpsalm.org/schema/config"
10-
xsi:schemaLocation="https://getpsalm.org/schema/config file:///var/www/html/vendor/vimeo/psalm/config.xsd"
10+
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
1111
>
1212
<projectFiles>
1313
<directory name="src" />
@@ -54,6 +54,17 @@
5454
<DeprecatedInterface errorLevel="info" />
5555

5656
<RiskyTruthyFalsyComparison errorLevel="info" />
57+
58+
<MissingOverrideAttribute errorLevel="info" />
59+
<PossiblyUnusedMethod errorLevel="info" />
60+
<PossiblyUnusedReturnValue errorLevel="info" />
61+
<PossiblyUnusedParam errorLevel="info" />
62+
<UnusedProperty errorLevel="info" />
63+
<UnusedClass errorLevel="info" />
64+
<UnusedVariable errorLevel="info" />
65+
<UnusedDocblockParam errorLevel="info" />
66+
<UnnecessaryVarAnnotation errorLevel="info" />
67+
<PossiblyUnusedProperty errorLevel="info" />
5768

5869
</issueHandlers>
5970
</psalm>

src/Api/ApigeeX/Denormalizer/AcceptedRatePlanDenormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,6 @@ public function supportsDenormalization($data, $type, $format = null, array $con
5050
return false;
5151
}
5252

53-
return AcceptedRatePlanInterface::class === $type || $type instanceof AcceptedRatePlanInterface || in_array(AcceptedRatePlanInterface::class, class_implements($type));
53+
return AcceptedRatePlanInterface::class === $type || $type instanceof AcceptedRatePlanInterface || in_array(AcceptedRatePlanInterface::class, class_implements($type) ?: []);
5454
}
5555
}

src/Api/ApigeeX/Denormalizer/ApiProductDenormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@ public function supportsDenormalization($data, $type, $format = null, array $con
5252
return false;
5353
}
5454

55-
return ApiProductInterface::class === $type || $type instanceof ApiProductInterface || in_array(ApiProductInterface::class, class_implements($type));
55+
return ApiProductInterface::class === $type || $type instanceof ApiProductInterface || in_array(ApiProductInterface::class, class_implements($type) ?: []);
5656
}
5757
}

src/Api/ApigeeX/Denormalizer/AppDenormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function supportsDenormalization($data, $type, $format = null, array $con
6868
return false;
6969
}
7070

71-
return AppInterface::class === $type || $type instanceof AppInterface || in_array(AppInterface::class, class_implements($type));
71+
return AppInterface::class === $type || $type instanceof AppInterface || in_array(AppInterface::class, class_implements($type) ?: []);
7272
}
7373

7474
/**

src/Api/ApigeeX/Denormalizer/BillingTypeDenormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ public function supportsDenormalization($data, $type, $format = null, array $con
4444
return false;
4545
}
4646

47-
return BillingTypeInterface::class === $type || $type instanceof BillingTypeInterface || in_array(BillingTypeInterface::class, class_implements($type));
47+
return BillingTypeInterface::class === $type || $type instanceof BillingTypeInterface || in_array(BillingTypeInterface::class, class_implements($type) ?: []);
4848
}
4949
}

src/Api/ApigeeX/Denormalizer/PrepaidBalanceDenormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@ public function supportsDenormalization($data, $type, $format = null, array $con
5252
return false;
5353
}
5454

55-
return PrepaidBalanceInterface::class === $type || $type instanceof PrepaidBalanceInterface || in_array(PrepaidBalanceInterface::class, class_implements($type));
55+
return PrepaidBalanceInterface::class === $type || $type instanceof PrepaidBalanceInterface || in_array(PrepaidBalanceInterface::class, class_implements($type) ?: []);
5656
}
5757
}

src/Api/ApigeeX/Denormalizer/RatePlanDenormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,6 @@ public function supportsDenormalization($data, $type, $format = null, array $con
7272
return false;
7373
}
7474

75-
return RatePlanInterface::class === $type || $type instanceof RatePlanInterface || in_array(RatePlanInterface::class, class_implements($type));
75+
return RatePlanInterface::class === $type || $type instanceof RatePlanInterface || in_array(RatePlanInterface::class, class_implements($type) ?: []);
7676
}
7777
}

0 commit comments

Comments
 (0)