Releases: devarts/plausible-php
Release list
v4.0.1
What's Changed
- Add missing
nameproperty definition toBreakdownItemby @marko-ogg in #9
Full Changelog: v4.0.0...v4.0.1
v4.0.0
🏗️ Architecture Changes
-
Introduced
Devarts\PlausiblePHP\Contract\ConfigurationInterfaceandDevarts\PlausiblePHP\Contract\ConfigurationInterface\Configurationas it's implementation. This object provides client to be used for Plausible API communication, and accepts configuration parameters like API key and API base URI. -
Introduced separate classes for different Plausible APIs in
Devarts\PlausiblePHP\Apinamespace: -
❗ Renamed
Devarts\PlausiblePHP\PlausibleAPItoPlausibleApi. This class also now accepts object ofConfigurationInterfacetype in it's constructor. It's purpose is changed, as it now serves as a provider of different Plausible APIs. It implementsDevarts\PlausiblePHP\Contract\PlausibleApiInterface. -
Introduced new namespace
Devarts\PlausiblePHP\Contractthat holds interfaces that are self-explanatory:ApiResponseObjectConfigurationInterfaceEventsApiInterfaceSitesApiInterfaceStatsApiInterfacePlausibleApiInterface
🆕 New Features
- Added support for properties
event:goalandevent:hostname(see properties) - Added support for new metrics:
conversion_rate,time_on_pageandviews_per_visit(see metrics) - Added support for Sites List API: https://plausible.io/docs/sites-api#get-apiv1sites
- Added support for Goals List API: https://plausible.io/docs/sites-api#get-apiv1sitesgoals
- Added normalisation for
Devarts\PlausiblePHP\Support\MetricandDevarts\PlausiblePHP\Support\Filterobjects passed as arguments to different methods ofDevarts\PlausiblePHP\Api\StatsApi, which means if you pass raw objects they will automatically be converted to string representation.
❗Other Important Changes
- ❗ Dropped support for providing base API URI with
v1paths. Following URI is not valid base path anymore:https://plausible.io/api/v1/ - ❗ Dropped support for PHP 7.4
⏫ Upgrade Guide
- Update
Devarts\PlausiblePHP\PlausibleAPIconstruction:- (optional) Rename class from
PlausibleAPItoPlausibleApi - Pass instance of
ConfigurationInterfaceto the constructor (e.g.Devarts\PlausiblePHP\Configuration::create('api_key'))
- (optional) Rename class from
- Update API methods calls:
- For each method previously called on
Devarts\PlausiblePHP\PlausibleAPIobjects, add corresponding proxy call. For example, if you previously called$plausible_api->getAggregate(...)you should now call$plausible_api->stats()->getAggregate(...)
- For each method previously called on
- Make sure to tweak base URI when passing to
Devarts\PlausiblePHP\Configuration::createto not containv1/suffix
v3.3.0
v3.2.0
v3.1.0
What's Changed
- Allow custom base URI in PlausibleAPI by @therohitdas in #5
New Contributors
- @therohitdas made their first contribution in #5
Full Changelog: v3.0.0...v3.1.0
Support custom event property filter, with additional usage improvements
Changes:
- Dropped checks for supported metrics and filters in
Devarts\PlausiblePHP\Support\Metric::addandDevarts\PlausiblePHP\Support\Filter::addmethods, allowing users to add any metric or filter. - Added methods to
Devarts\PlausiblePHP\Support\MetricandDevarts\PlausiblePHP\Support\Filterto simplify adding metrics and filters (e.g.addEventName,addVisitors...). - Implemented method to add custom event property
Devarts\PlausiblePHP\Support\Filter::addEventCustomProperty.
Backward incompatible change:
- Dropped constants
Devarts\PlausiblePHP\Support\Metric::SUPPORTED_METRICSandDevarts\PlausiblePHP\Support\Property::SUPPORTED_PROPERTIES.
Changed library namespace
- Changed library namespace from
PlausibletoDevarts\PlausiblePHP.
Fix "dynamic properties are deprecated" error when using PHP 8.2
v1.0.4 Drop phpunit 7 version from require-dev
Fix broken PlausibleAPI::deleteGoal method
v1.0.3 Cast goal ID to string when passing to urlencode
Expand Guzzle version requirements
v1.0.2 Merge branch 'master' of github.com:devarts/plausible-php