Note that there are some explanatory texts on larger screens.

plurals
  1. POSymfony OAuth api FOSOAuthServerBundle: crash
    text
    copied!<p>Am trying to use the FOSOAuthServerBundle but am having a crash problem, the crash message is :</p> <pre><code>PHP Fatal error: Declaration of MP\OAuthBundle\Entity\AccessToken::setUser() must be compatible with that of FOS\OAuthServerBundle\Model\TokenInterface::setUser() in /home/bitnami..../OAuthBundle/Entity/AccessToken.php on line 13 </code></pre> <p>AccessToken.class:</p> <pre><code>&lt;?php namespace MP\OAuthBundle\Entity; use FOS\OAuthServerBundle\Entity\AccessToken as BaseAccessToken; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity * @ORM\Table(name="oauth_access_tokens") */ class AccessToken extends BaseAccessToken { /** * @ORM\Id * @ORM\Column(type="integer") * @ORM\GeneratedValue(strategy="AUTO") */ protected $id; /** * @ORM\ManyToOne(targetEntity="Client") * @ORM\JoinColumn(nullable=false) */ protected $client; /** * @ORM\ManyToOne(targetEntity="\MP\UserBundle\Entity\User") */ protected $user; } </code></pre> <p>TokenInterface::setUser:</p> <pre><code> /** * @param UserInterface $user */ function setUser(UserInterface $user); </code></pre> <p>User.class</p> <pre><code>namespace MP\UserBundle\Entity; use Symfony\Component\Security\Core\User\UserInterface; use Doctrine\ORM\Mapping as ORM; use FOS\UserBundle\Model\User as BaseUser; /** * User */ class User extends BaseUser { const ROLE_ADMIN = 'ROLE_ADMIN'; /** * @var integer ... </code></pre> <p>I still do not see where the problem can be ! My user is implementing the UserInterface at the end!</p> <p>Any idea?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload