snowplow / snowplow-php-tracker

Snowplow event tracker for PHP. Add analytics into your PHP apps and scripts
http://snowplowanalytics.com
34 stars 36 forks source link

Required parameters after optional parameters deprecated in PHP 8.0 #97

Closed paulboocock closed 3 years ago

paulboocock commented 3 years ago

When using PHP 8.0, trackEcommerceTransaction throws deprecation warnings/errors due to $items not being an optional parameter. I think we should update this to be optional (as you don't HAVE to have items in a transaction).

https://github.com/snowplow/snowplow-php-tracker/blob/e41b10406983f18622c1394f88bd2487a68e0db1/src/Tracker.php#L286

https://php.watch/versions/8.0/deprecate-required-param-after-optional