1414use App \Repository \PostRepository ;
1515use Doctrine \Common \Collections \ArrayCollection ;
1616use Doctrine \Common \Collections \Collection ;
17+ use Doctrine \DBAL \Types \Types ;
1718use Doctrine \ORM \Mapping as ORM ;
1819use Symfony \Bridge \Doctrine \Validator \Constraints \UniqueEntity ;
1920use Symfony \Component \Validator \Constraints as Assert ;
@@ -37,27 +38,27 @@ class Post
3738{
3839 #[ORM \Id]
3940 #[ORM \GeneratedValue]
40- #[ORM \Column(type: ' integer ' )]
41+ #[ORM \Column(type: Types:: INTEGER )]
4142 private ?int $ id = null ;
4243
43- #[ORM \Column(type: ' string ' )]
44+ #[ORM \Column(type: Types:: STRING )]
4445 #[Assert \NotBlank]
4546 private ?string $ title = null ;
4647
47- #[ORM \Column(type: ' string ' )]
48+ #[ORM \Column(type: Types:: STRING )]
4849 private ?string $ slug = null ;
4950
50- #[ORM \Column(type: ' string ' )]
51+ #[ORM \Column(type: Types:: STRING )]
5152 #[Assert \NotBlank(message: 'post.blank_summary ' )]
5253 #[Assert \Length(max: 255 )]
5354 private ?string $ summary = null ;
5455
55- #[ORM \Column(type: ' text ' )]
56+ #[ORM \Column(type: Types:: TEXT )]
5657 #[Assert \NotBlank(message: 'post.blank_content ' )]
5758 #[Assert \Length(min: 10 , minMessage: 'post.too_short_content ' )]
5859 private ?string $ content = null ;
5960
60- #[ORM \Column(type: ' datetime ' )]
61+ #[ORM \Column(type: Types:: DATETIME_MUTABLE )]
6162 private \DateTime $ publishedAt ;
6263
6364 #[ORM \ManyToOne(targetEntity: User::class)]
0 commit comments