Database queries with Laravel's Connection class

Code
<?php

use Illuminate\Database\Connection;

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

$connection = new Connection($pdo);

$result $connection->select(
    
'SELECT * FROM test WHERE id < :id'
    [
'id' => 4]
);
dump($result);

// dry run
$queries $connection->pretend(function(Connection $c) {
    
$c->select('SELECT * FROM test');
    
$c->delete('DELETE FROM test WHERE id = :id', ['id' => 1]);
    
$c->select('SELECT * FROM test');
});
dump($queries);
Result
^ array:3 [
0 => {#1397
+"id": 1
+"name": "foo"
+"creation_date": "2014-07-20 11:37:29"
}
1 => {#1398
+"id": 2
+"name": "test"
+"creation_date": "2014-07-20 10:40:22"
}
2 => {#1399
+"id": 3
+"name": "bar"
+"creation_date": "2014-07-23 07:27:18"
}
]

^ array:3 [
0 => array:3 [
"query" => "SELECT * FROM test"
"bindings" => []
"time" => 0.0
]
1 => array:3 [
"query" => "DELETE FROM test WHERE id = :id"
"bindings" => array:1 [
"id" => 1
]
"time" => 0.0
]
2 => array:3 [
"query" => "SELECT * FROM test"
"bindings" => []
"time" => 0.0
]
]
Used Versions
PHP 8.2, Laminas MVC 3.2, Symfony 5.2, Laravel 8.28, PHPUnit 9.5, Doctrine ORM 2.8