fastly / fastly-php

A Fastly API client for PHP
https://packagist.org/packages/fastly/fastly
MIT License
24 stars 34 forks source link

Fix for Creation of dynamic property Fastly\Configuration::$apiKeys is deprecated #48

Open bpleon opened 7 months ago

bpleon commented 7 months ago

The Problem

Getting Creation of dynamic property Fastly\Configuration::$apiKeys is deprecated when using PHP 8.3. Dynamic properties have been deprecated in PHP8.2. Fastly\Configuration dynamically sets $apiKeys as an array.

The Fix

Define the property to the class.

bartoszgadomski commented 6 months ago

+1 to this; we're also seeing this reported in logs.

[23-Apr-2024 10:42:09 UTC] Deprecated: Creation of dynamic property Fastly\Configuration::$apiKeys is deprecated in /var/www/public/plugins/vendor/fastly/fastly/lib/Configuration.php on line 193
koriym commented 1 month ago

+1 to this;

harmony7 commented 1 month ago

Thanks for the feedback, we're taking a look at this