From f45358884563b1656ac28137db587fdc7d999969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilius=20Grigali=C5=ABnas?= Date: Mon, 17 Aug 2020 10:34:37 +0300 Subject: [PATCH] Update example to match actual make::entity output --- doctrine.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doctrine.rst b/doctrine.rst index 269ee0a02b7..9a2ee33db89 100644 --- a/doctrine.rst +++ b/doctrine.rst @@ -131,16 +131,17 @@ Woh! You now have a new ``src/Entity/Product.php`` file:: // src/Entity/Product.php namespace App\Entity; + use App\Repository\ProductRepository; use Doctrine\ORM\Mapping as ORM; /** - * @ORM\Entity(repositoryClass="App\Repository\ProductRepository") + * @ORM\Entity(repositoryClass=ProductRepository::class) */ class Product { /** - * @ORM\Id - * @ORM\GeneratedValue + * @ORM\Id() + * @ORM\GeneratedValue() * @ORM\Column(type="integer") */ private $id; @@ -155,7 +156,7 @@ Woh! You now have a new ``src/Entity/Product.php`` file:: */ private $price; - public function getId() + public function getId(): ?int { return $this->id; }