Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d81417a

Browse files
authoredDec 18, 2024··
Bump supported php version to 8.2 (#546)
* Set php to 8.2.26 in new .tool-versions file Php 8.2 is an actively maintained branch of the Php language, and will continue receiving active bug fix and security updates until 2024-12-31 [1] [1] https://php.watch/versions/8.2/releases * Replace fzaninotto/faker with fakerphp/faker, a maintained fork This is required to bump to 8.2 * Bump phpunit from 4.5.1 to 11.5.0 to support php 8.2 * Update composer lock file to reflect new dependency versions * Use php 8.2 docker image * Indicate that php 8.2 or higher is supported * Update wording in unit test from 7.4 to 8.2 * Update minimum required version in composer.json from 7.4 to 8.2 * Update to more modern phpunit syntax * Ignore phpunit output file * Add simple composer scripts for easier testing * Resolve static function errors * Handle phpunit test method + annotation deprecations * Fix: Adjust names of test objects to objects under test This will deal with a couple of warning messages that occur during test run * Exclude basic test (abstract class) from test suites to avoid warn So that we don't get a phpunit warning message, let's exclude these abstract classes from each respective test suite, as they were not being run anyway. * Fix deprecated annotations by asserting in test * Fix broken test by searching on email rather than name * Bump to php 8.2.27 - PHP 8.2.27 was released yesterday [1] so let's ensure that we get the latest and greatest version of this branch at least in terms of our asdf config [1] https://www.linuxcompatible.org/story/php-8227-released/
1 parent 9256f6f commit d81417a

28 files changed

+1723
-1099
lines changed
 

‎.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
vendor
22
phpunit.xml
33
tmp/**
4+
.phpunit.result.cache

‎.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
php 8.2.27

‎Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:7.4-cli
1+
FROM php:8.2-cli
22

33
# OS requirements for PHP
44
RUN apt-get update && apt-get install -y git unzip

‎README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This client **only** supports Zendesk's API v2. Please see our [API documentati
1616

1717
## Requirements
1818

19-
* PHP 7.4+
19+
* PHP 8.2+
2020

2121
## Installation
2222

‎composer.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,26 @@
44
"license": "Apache-2.0",
55
"homepage": "https://github.com/zendesk/zendesk_api_client_php",
66
"require": {
7-
"php": ">=7.4.0",
7+
"php": ">=8.2.0",
88
"guzzlehttp/guzzle": "^6.0 || ^7.0",
99
"guzzlehttp/psr7": "^1.7 || ^2.0",
1010
"mmucklo/inflect": "0.3.*"
1111
},
1212
"require-dev": {
13-
"phpunit/phpunit": "4.5.*",
13+
"phpunit/phpunit": "11.5.0",
1414
"squizlabs/php_codesniffer": "2.*",
1515
"phpmd/phpmd": "@stable",
16-
"fzaninotto/faker": ">=1.5.0",
16+
"fakerphp/faker": "^1.24.1",
1717
"psy/psysh": "@stable"
1818
},
1919
"autoload": {
2020
"psr-0": {
2121
"Zendesk\\API\\": "src/",
2222
"Zendesk\\Console\\": "src/"
2323
}
24+
},
25+
"scripts": {
26+
"test:unit": "vendor/bin/phpunit --testsuite 'Zendesk API Unit Test Suites'",
27+
"test:live": "vendor/bin/phpunit --testsuite 'Zendesk API Live Test Suites'"
2428
}
2529
}

0 commit comments

Comments
 (0)
Please sign in to comment.