-
-
Notifications
You must be signed in to change notification settings - Fork 214
Open
Description
Similar error to #350, I cannot retrieve load balancers:
PHP Fatal error: Uncaught TypeError: Cannot assign string to property DigitalOceanV2\Entity\LoadBalancer::$name of type int in /var/optimize/vendor/toin0u/digitalocean-v2/src/Entity/LoadBalancer.php:70
Stack trace:
#0 /var/optimize/vendor/toin0u/digitalocean-v2/src/Entity/AbstractEntity.php(35): DigitalOceanV2\Entity\LoadBalancer->build()
#1 /var/optimize/vendor/toin0u/digitalocean-v2/src/Api/LoadBalancer.php(39): DigitalOceanV2\Entity\AbstractEntity->__construct()
#2 [internal function]: DigitalOceanV2\Api\LoadBalancer->DigitalOceanV2\Api\{closure}()
#3 /var/optimize/vendor/toin0u/digitalocean-v2/src/Api/LoadBalancer.php(38): array_map()
#4 /var/optimize/utility/exactdn_cert_update.php(17): DigitalOceanV2\Api\LoadBalancer->getAll()
#5 {main}
thrown in /var/optimize/vendor/toin0u/digitalocean-v2/src/Entity/LoadBalancer.php on line 70
I changed the expected type of $name to string in Entity/LoadBalancer.php and it appears to work, but comparing the existing properties with the available ones in the docs appears to show quite a few missing: https://docs.digitalocean.com/reference/api/digitalocean/#tag/Load-Balancers
With that, I'm not certain fixing the $name property will be sufficient to get the LoadBalancer entity working well enough to perform a subsequent update operation. That is, I'm afraid if someone is using newer features, like global load balancers, performing an update with the object retrieved via getAll() might break their existing lb config.
Metadata
Metadata
Assignees
Labels
No labels