Requirements
- PHP >= 8.2 to run the installer CLI (
composer.jsonrequires^8.2.0); install targets are PHP 8.2, 8.3, 8.4 and 8.5 (NTS and TS). PHP 8.1 support was dropped - Composer
- Linux / macOS host. On Windows, use WSL or download the extension binary manually from the Turso Client PHP releases
1. Install the installer
composer global require darkterminal/turso-php-installer
Add the Composer global bin directory to PATH:
export PATH="$HOME/.composer/vendor/bin:$PATH"
# or
export PATH="$HOME/.config/composer/vendor/bin:$PATH"
2. Run the install
turso-php-installer install
3. Verify
php -m | grep libsql
Then in PHP:
<?php
$libsql = new LibSQL("file:example.db");