Olá ! Segue o erro:
/usr/bin/php /php/phpPdo/criar-turma.php
PHP Fatal error: Uncaught Error: Class 'Alura\Pdo\Infrastructure\Repository\PdoStudentRepository' not found in /php/phpPdo/criar-turma.php:10 Stack trace:
#0 {main} thrown in /php/phpPdo/criar-turma.php on line 10
Process finished with exit code 255
No criar-turma.php:
<?php
use Alura\Pdo\Infrastructure\Persistence\ConnectionCreator;
use Alura\Pdo\Infrastructure\Repository\PdoStudentRepository;
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();
Obrigado !