Estava dando tudo certo, mas ao colocar os novos comandos da erro (não localiza o arquivo).
<?php
use Alura\Pdo\Domain\Model\Student;
require_once 'vendor/autoload.php';
$databasePath = DIR . '/banco.sqlite';
$pdo = new PDO('sqlite:' . $databasePath);
$student = new Student (null, 'Pedro Giusti', new \DateTimeImmutable('1995-07-30'));
$sqlInsert = "INSERT INTO Students (name, birth_date) VALUES ('{$student->name()}', '{$student->birthDate()->format('Y-m-d')}');";
//echo $sqlInsert;
var_dump($pdo->exec($sqlInsert));
PS C:\Users\pedro_nqn6vyu\Documents\Semana_9\php-pdo-projeto-inicial> php inserir-aluno.php
PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 1 no such table: Students in C:\Users\pedro_nqn6vyu\Documents\Semana_9\php-pdo-projeto-inicial\inserir-aluno.php:14
Stack trace:
#0 C:\Users\pedro_nqn6vyu\Documents\Semana_9\php-pdo-projeto-inicial\inserir-aluno.php(14): PDO->exec('INSERT INTO Stu...')
#1 {main}
thrown in C:\Users\pedro_nqn6vyu\Documents\Semana_9\php-pdo-projeto-inicial\inserir-aluno.php on line 14
Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 1 no such table: Students in C:\Users\pedro_nqn6vyu\Documents\Semana_9\php-pdo-projeto-inicial\inserir-aluno.php on line 14
PDOException: SQLSTATE[HY000]: General error: 1 no such table: Students in C:\Users\pedro_nqn6vyu\Documents\Semana_9\php-pdo-projeto-inicial\inserir-aluno.php on line 14
Call Stack:
0.0004 394184 1. {main}() C:\Users\pedro_nqn6vyu\Documents\Semana_9\php-pdo-projeto-inicial\inserir-aluno.php:0
0.0051 460776 2. PDO->exec($statement = 'INSERT INTO Students (name, birth_date) VALUES ('Pedro Giusti', '1995-07-30');') C:\Users\pedro_nqn6vyu\Documents\Semana_9\php-pdo-projeto-inicial\inserir-aluno.php:14
PS C:\Users\pedro_nqn6vyu\Documents\Semana_9\php-pdo-projeto-inicial> composer dump-autoload
Generating autoload files
Generated autoload files
PS C:\Users\pedro_nqn6vyu\Documents\Semana_9\php-pdo-projeto-inicial> composer install
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Generating autoload files