You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to unserialize a JSON structure and hitting:
Fatal error: Uncaught ReflectionException: Class SearchDashboardsAndFolders does not exist in /Users/andig/htdocs/grafana-serializer/vendor/jms/metadata/src/MetadataFactory.php:170
The same happens when serializing. It seems that for de/serialization to work, type annotations need to use the fully qualified classname as in:
namespace Andig\GrafanaSerializer\Model;
use JMS\Serializer\Annotation\Type;
class Dashboard
{
/**
* @Type("array<Andig\GrafanaSerializer\Model\Panel>")
*/
public $panels;
}
It is not sufficient to use the short version although the class exists in the namespace:
/**
* @Type("array<Panel>")
*/
public $panels;
Is this the expected behaviour?
The text was updated successfully, but these errors were encountered:
andig
changed the title
ReflectionException:
ReflectionException when deserializing
Feb 24, 2019
andig
changed the title
ReflectionException when deserializing
ReflectionException when (de)serializing
Feb 24, 2019
andig
changed the title
ReflectionException when (de)serializing
ReflectionException when (de)serializing unless fully qualified classname is used
Feb 24, 2019
Trying to unserialize a JSON structure and hitting:
The same happens when serializing. It seems that for de/serialization to work, type annotations need to use the fully qualified classname as in:
It is not sufficient to use the short version although the class exists in the namespace:
Is this the expected behaviour?
The text was updated successfully, but these errors were encountered: