Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Php Rql Laravel Package

danielmewes/php-rql

php-rql is a PHP client driver for RethinkDB. It lets PHP applications connect to a RethinkDB server, build ReQL queries with a fluent API, execute them synchronously or asynchronously, and process results, making it easy to integrate RethinkDB’s realtime NoSQL database into PHP projects.

View on GitHub
Deep Wiki
Context7

A PHP client driver for the RethinkDB query language (ReQL)

Frequently asked questions about Php Rql
Does php-rql work with Laravel out of the box?
No. It is a raw RethinkDB driver with no service provider, facade, config, migrations, or Eloquent adapter. Laravel's database layer is SQL-centric and will not use this driver under DB::connection(). Treat it as an infrastructure dependency and wrap it behind your own repository or service classes.
How do I install php-rql with Composer?
Run composer require danielmewes/php-rql. The package is pure PHP and bundles its own protobuf implementation, so you do not need ext-protobuf. After install, connect to a running RethinkDB server and build queries with the fluent ReQL API. Verify the install against your PHP version before committing to it.
Which PHP versions does php-rql support?
The codebase dates from the PHP 5.3 era, so support on modern PHP is not guaranteed. Test it explicitly on your target range, including PHP 8.1, 8.2, and 8.3, because dynamic properties, curly-brace string offsets, and reserved words can break. Plan to fork and patch rather than assume a successful Composer install equals compatibility.
How do I run a ReQL query in PHP with php-rql?
Connect to the server, build the query with the fluent API, then call run on the connection to execute it and receive a result or cursor. Iterate cursors to read large result sets instead of materializing everything at once. Keep query construction in a repository layer so controllers and jobs never call the driver directly.
Does php-rql support async queries and cursors?
Yes. php-rql provides synchronous and asynchronous execution using a promise-based API, plus cursor iteration for result streams. Async is useful for fan-out and concurrent queries, but it complicates error handling and connection lifecycle. Test large cursors and nested or array results carefully, since those edge cases concentrate risk in the bundled protocol layer.
How do I prevent ReQL injection with php-rql?
ReQL is composited programmatically, so pass user input as r\expr() arguments and never concatenate it into a query string. There is no PDO-style parameter binding to fall back on, so the discipline lives in your query-building code. Ban r\js() by policy, because it performs server-side JavaScript evaluation and is a direct injection and operational risk.
Can php-rql handle RethinkDB changefeeds?
Yes. Changefeeds are a core RethinkDB feature and php-rql speaks ReQL, so you can subscribe to changes through the driver. The hard part is operational: PHP-FPM request lifecycles are a poor fit for long-lived server-push streams. Run changefeed consumers in dedicated long-running workers with reconnect, backoff, and monitoring rather than inside web requests.
Can I use php-rql with Laravel Octane or Swoole?
Not recommended for a first version. Long-lived workers invalidate the driver's assumptions about connections and promises, and state can leak between requests. If Octane or Swoole becomes mandatory, design connection-per-worker pooling and per-request state reset before writing feature code. Treat that as a separate engineering project, not a configuration flag.
Is RethinkDB and php-rql still maintained?
RethinkDB's commercial sponsor ceased operations in 2016, and the database survives as a community project with intermittent maintenance. php-rql is a low-adoption PHP 5.3-era driver, so expect a thin answer base and plan to fork and patch. The strategic risk is the database supply chain, not just the driver, so get a named sponsor and document an exit plan.
What are alternatives to php-rql for realtime features in Laravel?
If you mainly need realtime push, evaluate Postgres LISTEN/NOTIFY, Redis Streams, MongoDB change streams, or Laravel's own broadcasting with a queue-backed fan-out. These keep your primary database and Laravel tooling intact and avoid adding a second, thinly maintained data store. Choose RethinkDB only when changefeeds and document semantics are a genuine differentiator and you can support the server yourself.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource