You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a return typehint on the entity getter/setter, the proxies are not generated with the typehint, which throws an error when called.
Example:
/****
* @ORM\Table(name="carro_marca")
* @ORM\Entity
*/
class Marca
{
/****
* @ORM\Column(name="marca_id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="NONE")
*/
private $id;
/****
* @return integer
*/
public function getId() : \int
{
return $this->id;
}
}
Creates the following getId on the Proxy:
class Marca extends \AppBundle\Entity\Carro\Marca implements \Doctrine\ORM\Proxy\Proxy
{
...
/****
* {@inheritDoc}
*/
public function getId()
{
...
}
}
Which makes my application throw the following error:
{quote}
Compile Error: Declaration of Proxies*CG*\AppBundle\Entity\Carro\Marca::getId() must be compatible with AppBundle\Entity\Carro\Marca::getId(): int
{quote}
The text was updated successfully, but these errors were encountered:
Jira issue originally created by user naroga:
When using a return typehint on the entity getter/setter, the proxies are not generated with the typehint, which throws an error when called.
Example:
Creates the following
getId
on the Proxy:Which makes my application throw the following error:
{quote}
Compile Error: Declaration of Proxies*CG*\AppBundle\Entity\Carro\Marca::getId() must be compatible with AppBundle\Entity\Carro\Marca::getId(): int
{quote}
The text was updated successfully, but these errors were encountered: