api-library icon indicating copy to clipboard operation
api-library copied to clipboard

Fix getMauticVersion() command

Open dennisameling opened this issue 4 years ago • 2 comments

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.

dennisameling avatar Feb 24 '21 19:02 dennisameling

Codecov Report

Merging #240 (8f4dbf3) into main (a2ce866) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            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 data Powered by Codecov. Last update a2ce866...056ddbf. Read the comment docs.

codecov-io avatar Feb 24 '21 20:02 codecov-io

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.

Moongazer avatar Sep 02 '22 11:09 Moongazer

@escopecz as we have two +1's maybe someone from @mautic/core-team make the change suggested given Dennis is not active nowadays?

RCheesley avatar May 02 '23 14:05 RCheesley

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 avatar May 03 '23 08:05 escopecz

@escopecz Here is a new PR for the same fix without the signature changes: https://github.com/mautic/api-library/pull/302

Moongazer avatar May 06 '23 08:05 Moongazer

@Moongazer thank you, sir! Merged. I'll close this one.

escopecz avatar May 09 '23 13:05 escopecz