10000 Update example to match actual make::entity output by vilius-g · Pull Request #14088 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Update example to match actual make::entity output #14088

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update example to match actual make::entity output
  • Loading branch information
vilius-g authored Aug 17, 2020
commit f45358884563b1656ac28137db587fdc7d999969
9 changes: 5 additions & 4 deletions doctrine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down
0