klaviyo / klaviyo-api-php

PHP SDK for Klaviyo API
https://developers.klaviyo.com
MIT License
46 stars 21 forks source link

Basic plugin analysis failed. #48

Closed DannyDan closed 6 months ago

DannyDan commented 6 months ago

I updated to the latest version 7.1 and Shopware Plugin analysis failed, because of constant names are used twice:

Fatal error: Cannot redefine class constant KlaviyoAPI\Model\MetricAggregateQueryResourceObjectAttributes::SORT_BOUNCE_TYPE in //vendor/klaviyo/api/lib/Model/MetricAggregateQueryResourceObjectAttributes.php on line 336

Errors parsing /vendor/klaviyo/api/lib/Model/MetricAggregateQueryResourceObjectAttributes.php

public const SORT_BOUNCE_TYPE = 'Bounce Type';
public const SORT_BOUNCE_TYPE = '-Bounce Type';

I already raised this issue several versions before last year, and it was fixed: https://github.com/klaviyo/klaviyo-api-php/issues/19 But now it looks like its back in. :)

jon-batscha commented 6 months ago

Hey,

Apologies for the regression, working on a fix. Will update here when it's released.

jon-batscha commented 6 months ago

Following up on this:

Just released a fix, and additional tests so we don't see this kind of reversion again.

Apologies for the degraded experience, and much thanks for the eagle eye in catching this error.

Cheers! Jon