Eloquent active record models

Code
<?php

use Illuminate\Database\ConnectionResolver;
use 
Illuminate\Database\Connection;
use 
Illuminate\Database\Query\Grammars\MySqlGrammar;

$pdo = new PDO('mysql:dbname=eloquent;host=127.0.0.1');

$connection = new Connection($pdo);
$connection->enableQueryLog();
$connection->setQueryGrammar(new MySqlGrammar());

$resolver = new ConnectionResolver([
    
'default' => $connection,
]);

Test::setConnectionResolver($resolver);


$test Test::find(1);

echo 
$test['name'];

$test['name'] = 'newname';
if (
$test->isDirty()) {
    
dump($test->save());
}

echo 
$test['name'];
Result
foo
^ true

newname
Used Versions
PHP 8.2, Laminas MVC 3.2, Symfony 5.2, Laravel 8.28, PHPUnit 9.5, Doctrine ORM 2.8