首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >JmsSerializerBundle安装以错误结束:在"jms_serializer.visitors“下无法识别的选项"xml”

JmsSerializerBundle安装以错误结束:在"jms_serializer.visitors“下无法识别的选项"xml”
EN

Stack Overflow用户
提问于 2018-11-22 10:47:12
回答 1查看 850关注 0票数 0

当我安装一个Symfony 4框架项目并添加JmsSerializerBundle时,我会得到一个错误。

复制:

代码语言:javascript
复制
composer create-project symfony/website-skeleton myproject
cd myproject
composer require jms/serializer-bundle

安装结束时出错:

代码语言:javascript
复制
Using version ^3.0 for jms/serializer-bundle
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "4.1.*"
Package operations: 16 installs, 0 updates, 0 removals
  - Installing hoa/exception (1.17.01.16): Loading from cache
  - Installing hoa/event (1.17.01.13): Loading from cache
  - Installing hoa/consistency (1.17.05.02): Loading from cache
  - Installing hoa/visitor (2.17.01.16): Loading from cache
  - Installing hoa/ustring (4.17.01.16): Loading from cache
  - Installing hoa/protocol (1.17.01.14): Loading from cache
  - Installing hoa/zformat (1.17.01.10): Loading from cache
  - Installing hoa/iterator (2.17.01.10): Loading from cache
  - Installing hoa/compiler (3.17.08.08): Loading from cache
  - Installing hoa/regex (1.17.01.13): Loading from cache
  - Installing hoa/math (1.17.05.16): Loading from cache
  - Installing hoa/stream (1.17.02.21): Loading from cache
  - Installing hoa/file (1.17.07.11): Loading from cache
  - Installing jms/metadata (2.0.0): Loading from cache
  - Installing jms/serializer (2.0.0): Loading from cache
  - Installing jms/serializer-bundle (3.0.0): Loading from cache
Writing lock file
Generating autoload files
ocramius/package-versions:  Generating version class...
ocramius/package-versions: ...done generating version class
Symfony operations: 1 recipe (f702450e5b1b913f83ea887faacbdb83)
  -  WARNING  jms/serializer-bundle (>=2.0): From github.com/symfony/recipes-contrib:master
    The recipe for this package comes from the "contrib" repository, which is open to community contributions.
    Review the recipe at https://github.com/symfony/recipes-contrib/tree/master/jms/serializer-bundle/2.0

    Do you want to execute this recipe?
    [y] Yes
    [n] No
    [a] Yes for all packages, only for the current installation session
    [p] Yes permanently, never ask again for this project
    (defaults to n): y
  - Configuring jms/serializer-bundle (>=2.0): From github.com/symfony/recipes-contrib:master
Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 1
!!
!!  In ArrayNode.php line 304:
!!
!!    Unrecognized option "xml" under "jms_serializer.visitors"

在Windows 10 Powershell上运行composer等。我猜骨架太裸露了,需要依赖关系,但这不是应该自动解决的吗?

可能是什么原因?我怎么才能修好它?提前谢谢你的帮助。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-11-22 13:23:09

当前的菜谱与JMSSerializerBundle 3不兼容(有一个挂起的拉请求,请参阅https://github.com/symfony/recipes-contrib/pull/559)。因此,就目前而言,您需要手动调整配置。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53429212

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档