• Start

Languages

/

PHP

/

Libraries

/

Surqlize (ORM)

Installation

Install Surqlize with Composer, including the alpha v2 SurrealDB PHP SDK it depends on.

Surqlize is installed with Composer. It requires PHP 8.4 or later and depends on the alpha v2 SurrealDB PHP SDK.

composer require surrealdb/surqlize

Surqlize depends on the alpha SDK, so your project must allow alpha releases. If Composer cannot resolve the SDK under the default stable minimum stability, lower the stability for the SDK or set it project-wide.

composer config minimum-stability alpha
composer config prefer-stable true

Surqlize runs queries through the SDK, which uses PSR-18 and PSR-17 interfaces for the HTTP transport. Install a client and factory implementation, plus discovery, when you connect over http:// or https://.

composer require guzzlehttp/guzzle php-http/discovery

The WebSocket transport uses PHP's native stream functions and needs no extra packages. See the SDK installation guide for details.

RequirementVersion
PHP>= 8.4
SurrealDB PHP SDKsurrealdb/surrealdb.php (v2 alpha)
SurrealDB server1.x up to (but not including) 4.0.0

Was this page helpful?