matomo-org / plugin-TrackingSpamPrevention

GNU General Public License v3.0
12 stars 7 forks source link

Improving Azure URL parsing #91

Closed snake14 closed 1 year ago

snake14 commented 1 year ago

Description:

The builds were failing indicating that the Azure page has changed again breaking our URL parsing. This PR is to address that.

Review

snake14 commented 1 year ago

@sgiehl The last failing build (PHP 8.1 and minimum Matomo) appears to be related to DeviceDetector. Any recommendations on getting it to pass?

sgiehl commented 1 year ago

The minimum required version is currently Matomo 4.0.5. That one uses a version of device detector (4.0.2), that was not fully compatible with PHP 8.1 I guess there isn't much we can do about that failing tests. We could explicitly skip them on PHP 8.1 or higher if Matomo version is lower than 4.7.

snake14 commented 1 year ago

The minimum required version is currently Matomo 4.0.5. That one uses a version of device detector (4.0.2), that was not fully compatible with PHP 8.1 I guess there isn't much we can do about that failing tests. We could explicitly skip them on PHP 8.1 or higher if Matomo version is lower than 4.7.

Thank you @sgiehl . I'll try checking the versions and skipping if necessary.

AltamashShaikh commented 1 year ago

@snake14 Also good to release a new version of the plugin

snake14 commented 1 year ago

Thank you @AltamashShaikh . I actually just realised why the position was so variable. The code was using strpos instead of mb_strpos while dealing with a UTF-8 encoded page. I just made that correction and removed the if statement as it shouldn't be necessary anymore.