### Start Docker Compose for Testing Source: https://github.com/cycle/database/blob/2.x/CONTRIBUTING.md Navigate to the tests directory and start the Docker containers required for testing the database drivers. ```bash cd tests/ docker compose up ``` -------------------------------- ### Install Cycle DBAL using Composer Source: https://github.com/cycle/database/blob/2.x/README.md Use this command to add the Cycle DBAL component to your project. ```bash composer require cycle/database ``` -------------------------------- ### Run Full Test Suite Source: https://github.com/cycle/database/blob/2.x/CONTRIBUTING.md Execute the complete test suite using PHPUnit to verify all functionalities. ```bash ./vendor/bin/phpunit ``` -------------------------------- ### Connect, Define Schema, Insert, and Select with Cycle DBAL Source: https://github.com/cycle/database/blob/2.x/README.md Demonstrates connecting to a SQLite database, creating a 'users' table schema, inserting a record, and selecting it. Requires the 'vendor/autoload.php' file. ```php [ 'default' => ['connection' => 'sqlite'], ], 'connections' => [ 'sqlite' => new Config\SQLiteDriverConfig( connection: new Config\SQLite\FileConnectionConfig( database: 'runtime/database.db' ), ), ], ])); $users = $dbm->database('default')->table('users'); // create or update table schema $schema = $users->getSchema(); $schema->primary('id'); $schema->string('name'); $schema->datetime('created_at'); $schema->datetime('updated_at'); $schema->save(); // insert data $users->insertOne([ 'name' => 'test', 'created_at' => new DateTimeImmutable(), 'updated_at' => new DateTimeImmutable(), ]); // select data foreach ($users->select()->where(['name' => 'test']) as $u) { print_r($u); } ``` -------------------------------- ### Clone Cycle DBAL Repository Source: https://github.com/cycle/database/blob/2.x/CONTRIBUTING.md Use this command to clone the project repository to your local machine. ```bash git clone git@github.com:cycle/database.git ``` -------------------------------- ### Run SQLite Focused Test Suite Source: https://github.com/cycle/database/blob/2.x/CONTRIBUTING.md Run a subset of tests specifically for the SQLite driver for quicker verification. ```bash ./vendor/bin/phpunit --group driver-sqlite ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.