chance-fyi/hyperf-database-sqlserver

Add SqlServer support to Hyperf

Maintainers

Package info

github.com/Chance-fyi/hyperf-database-sqlserver

pkg:composer/chance-fyi/hyperf-database-sqlserver

Statistics

Installs: 4 653

Dependents: 0

Suggesters: 0

Stars: 2

Open Issues: 1

v3.0.3 2026-06-09 06:42 UTC

This package is auto-updated.

Last update: 2026-06-09 06:44:24 UTC


README

Latest Stable Version Total Downloads License

Extending the SqlServer driver for Hyperf ORM through AOP and simulating coroutines using the Task component.

Installation

composer require chance-fyi/hyperf-database-sqlserver

Configuration

Configure a SQL Server connection in config/autoload/databases.php as usual. Every query is dispatched to a task worker (to simulate coroutines over the blocking PDO/ODBC driver), and that task has an execute timeout.

Task timeout

By default the task execute timeout is 10 seconds (the Hyperf Task default). A heavy query that legitimately runs longer than 10s would otherwise fail with Task [N] execute timeout. Raise it per connection with the task_timeout option (in seconds):

// config/autoload/databases.php
return [
    'sqlsrv' => [
        'driver'       => 'sqlsrv',
        // host / database / username / password / ...
        'task_timeout' => 60, // optional, seconds, default 10
    ],
];