Boa tarde, segue meu código:
<?php
use Alura\Pdo\Domain\Model\Student;
use Alura\Pdo\Domain\Repository\PdoStudentRepository;
use Alura\Pdo\Infrastructure\Persistence\ConnectionCreator;
require_once 'vendor/autoload.php';
$connection = ConnectionCreator::createConnection();
$studentRepository = new PdoStudentRepository($connection);
$connection->beginTransaction();
$aStudent = new Student(
null,
'Nico Steppat',
new DateTimeImmutable('1985-05-01'),
);
$studentRepository->save($aStudent);
$anotherStudent = new Student(
null,
'Sergio Lopes',
new DateTimeImmutable('1985-05-01'),
);
$studentRepository->save($anotherStudent);
$connection->commit();
Ele está apresentando o seguinte erro:
PHP Fatal error: Uncaught Error: Class "Alura\Pdo\Infrastructure\Persistence\ConnectionCreator" not found in C:\Users\thauan.silva\Desktop\Alura\Formação-Avançando-com-PHP\php-pdo-projeto-inicial\criar-turma.php:11 Stack trace: #0 {main} thrown in C:\Users\thauan.silva\Desktop\Alura\Formação-Avançando-com-PHP\php-pdo-projeto-inicial\criar-turma.php on line 11
Fatal error: Uncaught Error: Class "Alura\Pdo\Infrastructure\Persistence\ConnectionCreator" not found in C:\Users\thauan.silva\Desktop\Alura\Formação-Avançando-com-PHP\php-pdo-projeto-inicial\criar-turma.php:11 Stack trace: #0 {main} thrown in C:\Users\thauan.silva\Desktop\Alura\Formação-Avançando-com-PHP\php-pdo-projeto-inicial\criar-turma.php on line 11