File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -94,30 +94,27 @@ that all have constraints on their properties.
9494 // src/Entity/BookCollection.php
9595 namespace App\Entity;
9696
97+ use App\Entity\Book;
9798 use Doctrine\Common\Collections\ArrayCollection;
98- use Doctrine\Common\Collections\Collection
99+ use Doctrine\Common\Collections\Collection;
99100 use Doctrine\ORM\Mapping as ORM;
100101 use Symfony\Component\Validator\Constraints as Assert;
101102
102- /**
103- * @ORM\Entity
104- */
103+ #[ORM\Entity]
105104 #[Assert\Traverse]
106105 class BookCollection implements \IteratorAggregate
107106 {
108107 /**
109108 * @var string
110- *
111- * @ORM\Column
112109 */
110+ #[ORM\Column]
113111 #[Assert\NotBlank]
114112 protected $name = '';
115113
116114 /**
117115 * @var Collection|Book[]
118- *
119- * @ORM\ManyToMany(targetEntity="App\Entity\Book")
120116 */
117+ #[ORM\ManyToMany(targetEntity: Book::class)]
121118 protected $books;
122119
123120 // some other properties
You can’t perform that action at this time.
0 commit comments