Skip to content

Commit 4333349

Browse files
committed
Merge branch '5.4' into 6.2
* 5.4: Update example to match actual make::entity output
2 parents 530a990 + 52672e9 commit 4333349

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doctrine.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,19 +135,19 @@ Whoa! You now have a new ``src/Entity/Product.php`` file::
135135
use App\Repository\ProductRepository;
136136
use Doctrine\ORM\Mapping as ORM;
137137

138-
#[ORM\Entity(repositoryClass: ProductRepository::class)]
138+
#[ORM\Entity(repositoryClass: ProductRepository::class)]
139139
class Product
140140
{
141141
#[ORM\Id]
142142
#[ORM\GeneratedValue]
143143
#[ORM\Column]
144-
private int $id;
144+
private ?int $id = null;
145145

146146
#[ORM\Column(length: 255)]
147-
private string $name;
147+
private ?string $name = null;
148148

149149
#[ORM\Column]
150-
private int $price;
150+
private ?int $price = null;
151151

152152
public function getId(): ?int
153153
{

0 commit comments

Comments
 (0)