Skip to content

Commit fcd4661

Browse files
committed
bug #867 Fixed the DateTime constraint deprecation (javiereguiluz)
This PR was merged into the master branch. Discussion ---------- Fixed the DateTime constraint deprecation This is a deprecation introduced by the upgrade to Symfony 4.2 in #865. ``` 3x: Validating a \DateTimeInterface with "Symfony\Component\Validator\Constraints\DateTime" is deprecated since version 4.2. Use "Symfony\Component\Validator\Constraints\Type" instead or remove the constraint if the underlying model is already type hinted to \DateTimeInterface. 1x in BlogControllerTest::testAdminNewPost from App\Tests\Controller\Admin 1x in BlogControllerTest::testAdminEditPost from App\Tests\Controller\Admin 1x in BlogControllerTest::testNewComment from App\Tests\Controller ``` Commits ------- aec924a Fixed the DateTime constraint deprecation
2 parents 6ec2223 + aec924a commit fcd4661

File tree

2 files changed

+0
-2
lines changed

2 files changed

+0
-2
lines changed

src/Entity/Comment.php

-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ class Comment
6464
* @var \DateTime
6565
*
6666
* @ORM\Column(type="datetime")
67-
* @Assert\DateTime
6867
*/
6968
private $publishedAt;
7069

src/Entity/Post.php

-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ class Post
8787
* @var \DateTime
8888
*
8989
* @ORM\Column(type="datetime")
90-
* @Assert\DateTime
9190
*/
9291
private $publishedAt;
9392

0 commit comments

Comments
 (0)