简体   繁体   English

Api 平台 3:DataTransformerInterface 问题

[英]Api-Platform 3: DataTransformerInterface Issue

I am learning to create DTO and DataTransformerInterface to send specific data in my response.我正在学习创建 DTO 和 DataTransformerInterface 以在我的响应中发送特定数据。

The issue is that the file "DataTransformerInterface" is missing.问题是文件“DataTransformerInterface”丢失了。 When I checked the "Api-Platform" folder, the Core folder is missing and when I verified on the git repository, the core folder is not available there.当我检查“Api-Platform”文件夹时,核心文件夹丢失了,当我在 git 存储库上验证时,核心文件夹在那里不可用。

I have searched through vendor and the file could not be found.我已经通过供应商进行了搜索,但找不到该文件。

Did anybody run into this problem and manage to solve it?有没有人遇到这个问题并设法解决它?

There is no more DataTransformerInterface in API-Platform 3. You should implement your logic inside a stateProvider or a stateProcessor instead. API 平台 3 中不再有DataTransformerInterface 。您应该在stateProviderstateProcessor中实现您的逻辑。

Look at this .看看这个

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM