Mautic API Library 4.0.0 Released With Modern HTTP Support and New Features
Version 4.0.0 of the Mautic API Library introduces updates focused on modernising HTTP handling, improving reliability, and expanding API capabilities. The release replaces legacy components and aligns the library with current PHP standards.
A central change is the adoption of a PSR-18 compliant HTTP client, replacing the earlier cURL-based implementation. This allows developers to use compatible clients such as Guzzle or Symfony, making the library more flexible across different project architectures.
The update also raises the minimum requirement to PHP 8.0, aligning with newer Mautic versions and enabling stricter typing, improved performance, and more consistent code practices.
Logging functionality has been updated to follow the LoggerAwareInterface standard, using LoggerAwareTrait for more consistent behaviour. The release also adds support for managing point groups through the API, extending capabilities available in Mautic core.
Several issues have been addressed, including deprecation warnings in strlen() when handling null values, failures in getMauticVersion() due to case-sensitive headers, incorrect handling of empty DEC filter values, and authentication errors that were not properly flagged. Release details are available here.
