symfony - Composer 更新后@template 注释的问题

标签 symfony doctrine sylius

我在 Sylius 项目中将 Doctrine 更新为最新版本。更新后,我收到以下错误。

[Semantical Error] The annotation "@template" in class Doctrine\Common\Collections\ArrayCollection was never imported. Did you maybe forget to add a "use" statement for this annotation?

有谁能够帮助我?

更新日志:
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 3 installs, 5 updates, 0 removals
  - Updating doctrine/collections (v1.3.0 => v1.6.0): Loading from cache
  - Installing doctrine/reflection (v1.0.0): Loading from cache
  - Installing doctrine/event-manager (v1.0.0): Loading from cache
  - Installing doctrine/persistence (v1.1.0): Loading from cache
  - Updating doctrine/common (v2.8.1 => v2.10.0): Loading from cache
  - Updating doctrine/dbal (v2.6.3 => v2.9.2): Loading from cache
  - Updating doctrine/orm (v2.5.14 => v2.6.3): Loading from cache
  - Updating symfony/doctrine-bridge (v4.1.11 => v4.2.4): Loading from cache
Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
Package symplify/token-runner is abandoned, you should avoid using it. Use https://github.com/symplify/codingstandard instead.
Writing lock file
Generating autoload files
muglug/package-versions-56:  Generating version class...
muglug/package-versions-56: ...done generating version class
ocramius/package-versions:  Generating version class...
ocramius/package-versions: ...done generating version class

What about running composer thanks now?
This will spread some 💖  by sending a ★  to 271 GitHub repositories of your fellow package maintainers.

Executing script cache:clear [OK]
Executing script assets:install public [OK]

最佳答案

自动更新 Doctrine/集合(v1.5.0 => v1.6.0)时我有同样的错误。
尝试使用 v1.5.0 版本。

关于symfony - Composer 更新后@template 注释的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55333819/

相关文章:

php - 以编程方式修改 Doctrine2 中表的架构名称?

php - Symfony 4 服务依赖注入(inject)——构造函数与方法

php - 自动 Getter/Setter 函数

symfony - Sylius + Vagrant + Behat 不工作

php - Sylius 安装崩溃,因为 "No identifier defined"

symfony - 在现有的 symfony 2 项目上安装 SyliusWebBundle

PHPUnit 因 Symfony2 session 而失败

php - Symfony 4 软删除与 Doctrine ORM

doctrine - 删除多对多表中的记录

database - 具有多个数据库连接的 CodeIgniter 2 + Doctrine 2