Skip to content

Commit 52672e9

Browse files
committed
minor #17821 [Doctrine] Update example to match actual make::entity output (alamirault)
This PR was merged into the 5.4 branch. Discussion ---------- [Doctrine] Update example to match actual make::entity output From slack ![image](https://user-images.githubusercontent.com/9253091/215199944-ecc4544f-62c8-435d-928d-e219b1c5e732.png) It's a new behavior since maker 1.44.0 released July 26th, 2022 symfony/maker-bundle#1147 (New example is based on local execution) Commits ------- 32d50e9 Update example to match actual make::entity output
2 parents 7ace09c + 32d50e9 commit 52672e9

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)