PHP Fatal error: Uncaught TypeError: Argument 1 passed to Alura\Doctrine\Entity\Aluno::setNome() must be of the type string, object given, called in C:\Users\fnell\Documents\www\Alura\php\php-doctrine\php-doctrine\src\Entity\Aluno.php on line 61 and defined in C:\Users\fnell\Documents\www\Alura\php\php-doctrine\php-doctrine\src\Entity\Aluno.php:52 Stack trace:
#0 C:\Users\fnell\Documents\www\Alura\php\php-doctrine\php-doctrine\src\Entity\Aluno.php(61): Alura\Doctrine\Entity\Aluno->setNome(Object(Alura\Doctrine\Entity\Aluno))
#1 C:\Users\fnell\Documents\www\Alura\php\php-doctrine\php-doctrine\commands\criar-aluno.php(22): Alura\Doctrine\Entity\Aluno->addTelefone(Object(Alura\Doctrine\Entity\Telefone))
#2 {main} thrown in C:\Users\fnell\Documents\www\Alura\php\php-doctrine\php-doctrine\src\Entity\Aluno.php on line 52
Fatal error: Uncaught TypeError: Argument 1 passed to Alura\Doctrine\Entity\Aluno::setNome() must be of the type string, object given, called in C:\Users\fnell\Documents\www\Alura\php\php-doctrine\php-doctrine\src\Entity\Aluno.php on line 61 and defined in C:\Users\fnell\Documents\www\Alura\php\php-doctrine\php-doctrine\src\Entity\Aluno.php on line 52
TypeError: Argument 1 passed to Alura\Doctrine\Entity\Aluno::setNome() must be of the type string, object given, called in C:\Users\fnell\Documents\www\Alura\php\php-doctrine\php-doctrine\src\Entity\Aluno.php on line 61 in C:\Users\fnell\Documents\www\Alura\php\php-doctrine\php-doctrine\src\Entity\Aluno.php on line 52
Call Stack: 0.0003 396320 1. {main}() C:\Users\fnell\Documents\www\Alura\php\php-doctrine\php-doctrine\commands\criar-aluno.php:0 0.0912 4242640 2. Alura\Doctrine\Entity\Aluno->addTelefone($telefone = class Alura\Doctrine\Entity\Telefone { private int $id = uninitialized; private string $numero = '(24) 99999-9999'; private $aluno = NULL }) C:\Users\fnell\Documents\www\Alura\php\php-doctrine\php-doctrine\commands\criar-aluno.php:22 0.0912 4243016 3. Alura\Doctrine\Entity\Aluno->setNome($nome = class Alura\Doctrine\Entity\Aluno { private int $id = uninitialized; private string $nome = 'Vinicius Dias'; private $telefones = class Doctrine\Common\Collections\ArrayCollection { private $elements = [...] } }) C:\Users\fnell\Documents\www\Alura\php\php-doctrine\php-doctrine\src\Entity\Aluno.php:61