Repository navigation
Search on Server/Data Center, JSM fixes and runnable tests
⚠️ Upgrade notes
This release contains two small behavior changes. Please check your code before upgrading.
IssueField::$fixVersionsdefaults tonullinstead of[](#558)
WhenfixVersionsisn't returned (e.g. it's excluded from the requestedfields), the property is nownull.
If you iterate over it directly, use the new getter or?? []:foreach ($issue->fields->getFixVersions() as $version) { ... } // or foreach ($issue->fields->fixVersions ?? [] as $version) { ... }
Reporter::$active(andUser::$active) is nowbool(#532)
It was declared asstring, so it held"1"/"". It now holdstrue/false, as returned by Jira.
if ($user->active)keeps working, but strict comparisons like$user->active === '1'need to change.
Fixes
Search on Jira Server/Data Center (#552)
IssueService::search() now works on both Jira Cloud and Jira Server/Data Center.
It calls the enhanced search API (/search/jql) first. On a 404 it falls back to the legacy /search API (Server/Data Center).
On Server/Data Center, nextPageToken holds the next startAt offset, so the same paging loop works on both:
$nextPageToken = '';
do {
$ret = $issueService->search($jql, $nextPageToken, 50, ['summary']);
// ...
$nextPageToken = $ret->getNextPageToken();
} while (!empty($nextPageToken));The second parameter of search() is nextPageToken, not startAt. The README pagination example has been updated.
Undefined constant CURL_LOCK_DATA_CONNECT (#567)
CURL_LOCK_DATA_CONNECT requires libcurl 7.57.0 or later, but PHP 8.0 - 8.3 can be built with libcurl 7.29.0 (e.g. CentOS/RHEL 7).
The connection cache is now shared only when the constant is defined. Otherwise only the DNS cache is shared.
fixVersions mapping (#558)
Mapping a response with "fixVersions": null no longer throws JsonMapper_Exception. New IssueField::getFixVersions() always returns an array.
Jira Service Management (#532)
Several ServiceDesk classes failed to map real API responses:
CustomerService: building a customer from a user failed (wrongtimeZoneproperty,accountId/keymissing on Server/Cloud,avatarUrlstype mismatch).OrganisationService:createFromOrganisation()sent a JSON string as the organisation name.- Responses couldn't be mapped by JsonMapper.
getCustomersForOrganisation()didn't read the pagedvaluesand failed to build its URL.addCustomersToOrganisation()posted form data to the wrong endpoint.
Comment,RequestStatus,Organisation,Request: mapping JSON objects failed withTypeError.Customer::setLinks()dropped the given links.
Others
- Creating a project no longer sends an empty
versionsfield, which Jira rejected with 400. - Removed
curl_close()calls, deprecated in PHP 8.5.
Tests and CI
- Running
vendor/bin/phpunitwithout a Jira server now passes. Tests that need a live Jira server extendJiraIntegrationTestCaseand are skipped unless.envis configured. See "Running tests" in the README. (#532) - CI runs the whole test suite on PHP 8.3, 8.4 and 8.5.
Closed issues
#532, #542, #547, #552, #558, #567
Full Changelog: 5.12.1...5.13.0