Fix getMauticVersion() command
Fixes https://github.com/mautic/api-library/issues/233
Ensures that the mautic-version header key is always converted to lowercase prior to checking if it exists. This makes the getMauticVersion() command less error-prone.
Codecov Report
Merging #240 (8f4dbf3) into main (a2ce866) will not change coverage. The diff coverage is
100.00%.
@@ Coverage Diff @@
## main #240 +/- ##
=========================================
Coverage 51.45% 51.45%
Complexity 406 406
=========================================
Files 30 30
Lines 1028 1028
=========================================
Hits 529 529
Misses 499 499
| Impacted Files | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| lib/Api/Api.php | 78.10% <100.00%> (ø) |
67.00 <1.00> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update a2ce866...056ddbf. Read the comment docs.
I can confirm that the commit https://github.com/mautic/api-library/pull/240/commits/8f4dbf3a5fe9deeb7da0838a22b9917c6dfaccc0 solves the issue. The methods signature change is not needed.
@escopecz as we have two +1's maybe someone from @mautic/core-team make the change suggested given Dennis is not active nowadays?
The method signature changes should be reverted. After that it's good to go. Anyone able to make the PR with only the changes in the getMauticVersion method?
@escopecz Here is a new PR for the same fix without the signature changes: https://github.com/mautic/api-library/pull/302
@Moongazer thank you, sir! Merged. I'll close this one.