Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在api-platform使用教义2-空间。
对于CrEOF\Spatial\PHP\Types\AbstractPoint该类,我需要为和属性添加一个序列化组。$x$y
CrEOF\Spatial\PHP\Types\AbstractPoint
$x
$y
在不改变供应商的情况下实现这一目标的最佳方法是什么?
在序列化程序文档中,他们在注释中提供了使用 yml 和 xml) 映射进行序列化组的示例。这样,您可以添加一些指向供应商实体的序列化组,而无需在供应商类中使用注释
$classMetadataFactory = new ClassMetadataFactory(new YamlFileLoader('/path/to/your/definition.yml'));