tchoulom / ViewCounterBundle

This bundle is used to count the number of views of a page.
MIT License
15 stars 11 forks source link

Error in Symfony 4.4: @MappedSuperclass annotation is not loaded #5

Closed tonyellow closed 4 years ago

tonyellow commented 4 years ago

I'm trying to install the bundle in symfony 4.4 but i'm getting the following error:

!!    [Semantical Error] The annotation "@MappedSuperclass" in class Tchoulom\Vie  
!!    wCounterBundle\Entity\ViewCounterInterface was never imported. Did you mayb  
!!    e forget to add a "use" statement for this annotation?      

Hope there is an easy fix, seems like a nice bundle!

tonyellow commented 4 years ago

I can resolve the error by adding the below lines to When i add the following lines to view-counter-bundle/Entity/ViewCounterInterface.php:

use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\MappedSuperclass;
use Doctrine\ORM\Mapping\HasLifecycleCallbacks;

Definately not ideal as it will be overwritten on composer update :(

tchoulom commented 4 years ago

Hello,

The problem is solved.

Thanks.