简体   繁体   English

无法使用 Symfony 5 安装 FOSRestBundle

[英]Unable to install FOSRestBundle with Symfony 5

I was trying to install FOSRestBundle on Symfony 5 using composer but got the following error message:我试图使用 composer 在Symfony 5上安装 FOSRestBundle,但收到以下错误消息:

friendsofsymfony/rest-bundle 2.7.1 requires symfony/config ^3.4|^4.3 friendsofsymfony/rest-bundle 2.7.1 需要 symfony/config ^3.4|^4.3

Is it possible to manually install FOSRestBundle with Symfony 5;是否可以使用 Symfony 5 手动安装 FOSRestBundle; as it seems it will not be updated and instead API Platform will be maintained in future?因为它似乎不会更新,而是将来会维护 API 平台?

I don't want to use API Platform as it has lot of stuff not required by my project.我不想使用 API 平台,因为它有很多我的项目不需要的东西。

FOSRestBundle development has not been abandoned. FOSRestBundle 的开发并没有被放弃。

But Symfony 5 support is not expected until version 3 .但是 Symfony 5 的支持预计要到版本 3

You can check the progress here .您可以在 此处查看进度。 As you can see there is no due date yet.如您所见,还没有截止日期。

So you either continue using FOSRestBundle with Symfony 4.4 (which is perfectly acceptable, 4.4 it's a long term release and it's not going anywhere), or you need Symfony 5;所以你要么继续在 Symfony 4.4 中使用 FOSRestBundle(这是完全可以接受的,4.4 是一个长期版本,它不会去任何地方),或者你需要Symfony 5; you either look for alternatives to FOSRestBundle or run a pre-release version (with the risks that it entail).你要么寻找 FOSRestBundle 的替代品,要么运行一个预发布版本(有它带来的风险)。

Thanks GrenierJ, an issue is already open and as per xabbuh , the master now serves for the development of FOSRestBundle 3.0.感谢 GrenierJ,一个问题已经开放,根据xabbuh ,大师现在为 FOSRestBundle 3.0 的开发服务。 Its version constraints already allow Symfony 5 components.它的版本限制已经允许 Symfony 5 组件。 I tried to install the dev-master using composer require --dev friendsofsymfony/rest-bundle:dev-master and it successfully installed.我尝试使用composer require --dev friendsofsymfony/rest-bundle:dev-master安装composer require --dev friendsofsymfony/rest-bundle:dev-master并成功安装。 Its under development so all of its features may not be compatible with Symfony 5.它正在开发中,因此其所有功能可能与 Symfony 5 不兼容。

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

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