4

I updated Doctrine to newest version in my Sylius project. After update i am receiving following error.

[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?

Can anybody help me?

Update Log:

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]
3y3skill3r
  • 889
  • 1
  • 8
  • 27
  • 2
    Problem was introduced by doctrine/collections v1.6.0. Fix this package to v1.5.0 to fix problem. I hope a patch will be realised – al37350 Mar 25 '19 at 08:55

4 Answers4

2

I has the same error when auto updating doctrine/collections (v1.5.0 => v1.6.0). Try to use v1.5.0 version.

0

Same problem, this seem like one of your dependency in require or require-dev have a broken dependency. Try upgrading only the dependency you need. If you upgrade one and that it fail with this error, report the bug to the maintainer.

0

so yes - if you will perform a downgrade of package doctrine/collection, to version 1.5, everything works well.

Here is some info:

https://github.com/doctrine/collections/issues/180

3y3skill3r
  • 889
  • 1
  • 8
  • 27
  • According to https://github.com/doctrine/collections/pull/186 the issue has already been fixed in the master branch of https://github.com/doctrine/collections – W0rma Mar 25 '19 at 15:49
0

This issue was fixed in 1.6.1 release. Just run a composer update and it should be solved. See the release details here for more info.

Sicaa
  • 78
  • 1
  • 7