darkterminal/turso-php-installer
Install Turso's libSQL server binaries for PHP and Laravel with a single Composer command. Handles downloads, platform detection, and setup so you can start building with local Turso databases right away.
Architecture fit. This package is not a runtime library; it is a provisioning tool that installs and compiles the libSQL/Turso PHP extension (libsql / pdo_libsql-style native bindings) into a PHP environment. For a Laravel application, that means it sits in the build/ops layer, not in the application dependency graph. It does not integrate with Laravel's service container, Eloquent, or DBAL out of the box — you would still need a Laravel database driver/connector (or configure it via PDO) to actually use Turso. The installer solves one narrow problem: getting the compiled *.so onto a host.
Integration feasibility. Feasible, but only as an explicit provisioning step in Dockerfiles, CI runners, or developer onboarding scripts. It is not something composer require can meaningfully deliver — native extensions bypass Composer's autoloader and require php.ini registration (extension=libsql.so). Feasibility therefore depends on:
php-dev/phpize, a C toolchain, and libSQL headers at build time.Technical risk. High relative to its maturity: 20 stars and a 0.42 score signal a thin community and a small number of production users. Specific risks:
php.ini SAPI).Key questions to resolve before adoption:
Stack fit. This is a poor fit for the default Laravel developer workflow, which is Composer-centric. It is a reasonable fit for containerized deployments where you control the base image and can bake the extension in at build time. If your stack is Laravel + MySQL/Postgres, adopting this means adding a second, non-standard database driver path — significant surface area for a marginal benefit unless Turso's distributed-replica/edge model is a core requirement.
Migration path.
docker-compose build or a setup script — not as a hidden post-install-cmd.Compatibility.
php:8.3.x-cli); never allow floating tags.Sequencing.
Maintenance. This is the dominant concern. You are adopting a single-maintainer, low-adoption native extension installer, which transfers a meaningful maintenance burden to your team: every PHP minor upgrade, base-image refresh, and libSQL release becomes a rebuild-and-verify task. Budget for an owning engineer (platform/DevOps), not just "someone on the app team."
Support. MIT with no commercial backing. Community support only (GitHub issues). If the maintainer stops publishing, your team either forks the installer/extension or migrates off Turso. Document an exit plan (fallback to Turso's HTTP/SDK access or to a standard SQL database) before production adoption.
Scaling. Scaling here is about deployment breadth, not throughput: every host and every container image must carry the compiled extension, so image size grows and cold-start/build times increase. Rolling out a PHP or base-image upgrade now requires coordinated extension rebuilds with a verification gate. Turso's distributed model may reduce database-scaling pressure, but it does not reduce your build-and-release complexity.
Failure modes.
php-dev, toolchain) → image build breaks.php.ini SAPI mismatch) → runtime PDOException: could not find driver.Ramp-up.
phpize, ABI pinning, and a custom DB driver are outside the usual scope and will create a knowledge bottleneck. Plan for one designated owner, a documented runbook, and CI coverage that proves the extension loads — otherwise the first production incident will be an opaque driver-not-found error.How can I help you explore Laravel packages today?