For Doctrine annotations I prefer use ::class constants over strings:
namespace App\Entity;
use App\Entity\User;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity()
*/
class Post
{
/**
* @ORM\ManyToOne(targetEntity=User::class, inversedBy="posts")
*/
private $author;
}
Unfortunately, the autocompletion for properties (posts) doesn't work in this case.
I would like to set in Settings whether I prefer constants or strings.
For Doctrine annotations I prefer use
::classconstants over strings:Unfortunately, the autocompletion for properties (
posts) doesn't work in this case.I would like to set in
Settingswhether I prefer constants or strings.