Reputation: 1536
I'm getting this error when trying to clear cache and composer install in prod server :
!! The type hint of parameter "show" in method "addShow" in class "App\Entity\ !! Type" is invalid.
this is the addShow method :
public function addShow(Show $show): self
{
if (!$this->shows->contains($show)) {
$this->shows[] = $show;
$show->setType($this);
}
return $this;
}
Upvotes: 0
Views: 2473
Reputation: 21
You need to specify class that you passing as parameter.
You can put all path to class to specify the type:
public function addShow(App\Bundle\Show $show): self
{
if (!$this->shows->contains($show)) {
$this->shows[] = $show;
$show->setType($this);
}
return $this;
}
or add:
use App\Bundle\Show;
Upvotes: 2