imefisto / swoole-psr-kit
A PSR-compliant toolkit for building Swoole HTTP/WebSocket servers with dependency management
Requires
- php: ^8.1
- imefisto/psr-swoole-native: ^2
- league/route: ^6
- php-di/php-di: ^7.0
- psr/container: ^2.0
- psr/http-message: ^1.0
- psr/http-server-middleware: ^1.0
- psr/log: ^3.0
Requires (Dev)
- nyholm/psr7: ^1.8
- phpstan/phpstan: ^1.0
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.6
This package is auto-updated.
Last update: 2025-09-26 09:12:59 UTC
README
A PHP library providing clean interfaces and handlers for Swoole server implementation, with support for HTTP, WebSocket, and Worker management.
⚠️ Alpha Release: This project is currently in alpha stage (v2.x-alpha). The API may change significantly between versions. Version 2.x contains breaking changes from 1.x.
Version Information
- Current:
2.0.0-alpha.1
(Alpha - Breaking changes from 1.x) - Previous:
1.1.0
(Legacy - Not recommended for new projects)
Migration from 1.x
If you're upgrading from version 1.x, please note there are breaking changes in 2.x. See CHANGELOG.md for detailed migration information.
Requirements
- PHP 8.3+
- Swoole 5.1+
Installation
For new projects (recommended):
composer require imefisto/swoole-psr-kit:^2.0@alpha
For existing 1.x projects:
composer require imefisto/swoole-psr-kit:^1.1
Features
- HTTP request handling with PSR-7 compliance
- WebSocket server support with clean event handlers
- Worker management interface
- Middleware support
- Extensible handler system
Basic Usage
See the folder examples/
.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
The MIT License (MIT). Please see License File for more information.