Closed zspine closed 3 years ago
Might be so, but this is going to be an annoying breaking change for anyone using this :/
@mrsimonbennett yes I agree :) , but all property names with snake_case returns null value.
owner_uuid
default_ingress
created_at
updated_at
active_deployment
in_progress_deployment
last_deployment_created_at
live_url
tier_slug
live_url_base
live_domain
Another workaround is to use property overloading in the AbstractEntity.
public function __get($property)
{
$property = static::convertToCamelCase($property);
if (\property_exists($this, $property)) {
return $this->{$property};
}
$trace = debug_backtrace();
trigger_error(
'Undefined property ' . $property .
' in ' . $trace[0]['file'] .
' on line ' . $trace[0]['line'],
E_USER_NOTICE);
return null;
}
ConvertToCamelCase is used in the
DigitalOceanV2Entity::build
function, and entity property names are in snake case.