title: Could not convert PHP value to type date. Expected one of the following types: null, DateTime
body: <p>I created fixtures with fakerphp to generate fake birth date but can't load fixtures files and getting this error message : Could not convert PHP value '1970-01-01' to type date. Expected one of the following types: null, DateTime. Do you have an idea what I should modify please ?</p>
  <p>Here is part of my php entity file code :</p>
  <pre><code>
  /**
   * @ORM\Column(type=&quot;date&quot;)
   */
  private $birthDate;
  
  
  public function getId(): ?int
  {
      return $this-&gt;id;
  }
  
  public function getEmailAddress(): ?string
  {
      return $this-&gt;emailAddress;
  }
  
  public function setEmailAddress(string $emailAddress): self
  {
      $this-&gt;emailAddress = $emailAddress;
  
      return $this;
  }
  
  public function getBirthDate(): ?string
  {
      return $this-&gt;birthDate;
  }
  
  public function setBirthDate(string $birthDate): self
  {
      $this-&gt;birthDate = $birthDate;
  
      return $this;
  }
  
  </code></pre>
  <p>And my fixture :</p>
  <pre><code>public function load(ObjectManager $manager):void
  {
      $faker = Factory::create(('fr_FR'));
      $faker-&gt;seed(1234);
  
      for ($i = 0; $i &lt;= 20; $i++) {
          $member = new Member();
  
          $member-&gt;setEmailAddress('user@test.com');
          $member-&gt;setFirstName($faker-&gt;firstName());
          $member-&gt;setLastName($faker-&gt;lastName());
          $member-&gt;setbirthDate($faker-&gt;date($format ='Y-m-d', $max = '2004-31-12'));
          $member-&gt;setPostalAddress($faker-&gt;address());
  
          $password = $this-&gt;encoder-&gt;encodePassword($member, 'password');
          $member-&gt;setPassword($password);
      }
  
      $manager-&gt;persist($member);
      $manager-&gt;flush();
  }
  }
  </code></pre>