{"id":15077757,"url":"https://github.com/k911/swoole-bundle","last_synced_at":"2025-10-05T11:31:54.303Z","repository":{"id":44995119,"uuid":"150461141","full_name":"k911/swoole-bundle","owner":"k911","description":"Symfony Swoole Bundle","archived":true,"fork":false,"pushed_at":"2022-01-14T22:51:08.000Z","size":2752,"stargazers_count":256,"open_issues_count":28,"forks_count":45,"subscribers_count":11,"default_branch":"develop","last_synced_at":"2024-05-01T15:27:37.483Z","etag":null,"topics":["async","hacktoberfest","http-server","php","swoole","symfony-bundle"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/k911.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null},"funding":{"github":"k911"}},"created_at":"2018-09-26T17:01:58.000Z","updated_at":"2024-02-11T12:01:00.000Z","dependencies_parsed_at":"2022-08-28T23:02:05.006Z","dependency_job_id":null,"html_url":"https://github.com/k911/swoole-bundle","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k911%2Fswoole-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k911%2Fswoole-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k911%2Fswoole-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k911%2Fswoole-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/k911","download_url":"https://codeload.github.com/k911/swoole-bundle/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235393591,"owners_count":18982818,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async","hacktoberfest","http-server","php","swoole","symfony-bundle"],"created_at":"2024-09-25T04:31:46.529Z","updated_at":"2025-10-05T11:31:48.981Z","avatar_url":"https://github.com/k911.png","language":"PHP","funding_links":["https://github.com/sponsors/k911"],"categories":[],"sub_categories":[],"readme":"# Swoole Bundle\n\n[![Maintainability](https://api.codeclimate.com/v1/badges/1d73a214622bba769171/maintainability)](https://codeclimate.com/github/k911/swoole-bundle/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/1d73a214622bba769171/test_coverage)](https://codeclimate.com/github/k911/swoole-bundle/test_coverage)\n[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://github.com/ellerbrock/open-source-badges/)\n[![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://opensource.org/licenses/mit-license.php)\n\nSymfony integration with [Swoole](https://www.swoole.co.uk/) to speed up your applications.\n\n---\n\n## Build Matrix\n\n| CI Job  | Branch [`master`](https://github.com/k911/swoole-bundle/tree/develop)                                                                       | Branch [`develop`](https://github.com/k911/swoole-bundle/tree/master)                                                                         |\n| ------- | ------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |\n| Circle  | [![CircleCI](https://circleci.com/gh/k911/swoole-bundle/tree/master.svg?style=svg)](https://circleci.com/gh/k911/swoole-bundle/tree/master) | [![CircleCI](https://circleci.com/gh/k911/swoole-bundle/tree/develop.svg?style=svg)](https://circleci.com/gh/k911/swoole-bundle/tree/develop) |\n| CodeCov | [![codecov](https://codecov.io/gh/k911/swoole-bundle/branch/master/graph/badge.svg)](https://codecov.io/gh/k911/swoole-bundle)              | [![codecov](https://codecov.io/gh/k911/swoole-bundle/branch/develop/graph/badge.svg)](https://codecov.io/gh/k911/swoole-bundle)               |\n| Travis  | [![Build Status](https://travis-ci.org/k911/swoole-bundle.svg?branch=master)](https://travis-ci.org/k911/swoole-bundle)                     | [![Build Status](https://travis-ci.org/k911/swoole-bundle.svg?branch=develop)](https://travis-ci.org/k911/swoole-bundle)                      |\n\n## Table of Contents\n\n- [Swoole Bundle](#swoole-bundle)\n  - [Build Matrix](#build-matrix)\n  - [Table of Contents](#table-of-contents)\n  - [Quick start guide](#quick-start-guide)\n  - [Features](#features)\n  - [Requirements](#requirements)\n    - [Current version](#current-version)\n    - [Future versions](#future-versions)\n    - [Swoole](#swoole)\n      - [Version check](#version-check)\n      - [Installation](#installation)\n\n## Quick start guide\n\n1. Make sure you have installed proper Swoole PHP Extension and pass other [requirements](#requirements).\n\n2. (optional) Create a new symfony project\n\n    ```bash\n    composer create-project symfony/skeleton project\n\n    cd ./project\n    ```\n\n3. Install bundle in your Symfony application\n\n    ```bash\n    composer require k911/swoole-bundle\n    ```\n\n4. Edit `config/bundles.php`\n\n    ```php\n    return [\n        // ...other bundles\n        K911\\Swoole\\Bridge\\Symfony\\Bundle\\SwooleBundle::class =\u003e ['all' =\u003e true],\n    ];\n    ```\n\n5. Run Swoole HTTP Server\n\n    ```bash\n    bin/console swoole:server:run\n    ```\n\n6. Enter http://localhost:9501\n\n7. You can now configure bundle according to your needs\n\n## Features\n\n-   Built-in API Server\n\n    Swoole Bundle API Server allows managing Swoole HTTP Server in real-time.\n\n    -   Reload worker processes\n    -   Shutdown server\n    -   Access metrics and settings\n\n-   Improved static files serving\n\n    Swoole HTTP Server provides a default static files handler, but it lacks supporting many `Content-Types`. To overcome this issue, there is a configurable Advanced Static Files Server. Static files serving remains enabled by default in the development environment. Static files directory defaults to `%kernel.project_dir%/public`. To configure your custom mime types check [configuration reference](docs/configuration-reference.md) (key `swoole.http_server.static.mime_types`).\n\n-   Symfony Messenger integration\n\n    _Available since version: `0.6`_\n\n    Swoole Server Task Transport has been integrated into this bundle to allow easy execution of asynchronous actions. Documentation of this feature is available [here](docs/swoole-task-symfony-messenger-transport.md).\n\n-   Hot Module Reload (HMR) for development **ALPHA**\n\n    Since Swoole HTTP Server runs in Event Loop and does not flush memory between requests, to keep DX equal with normal servers, this bundle uses code replacement technique, using `inotify` PHP Extension to allow continuous development. It is enabled by default (when the extension is found) and requires no additional configuration. You can turn it off in bundle configuration.\n\n    _Remarks: This feature currently works only on a Linux host machine. It probably won't work with Docker, and it is possible that it works only with configuration: `swoole.http_server.running_mode: process` (default)._\n\n## Requirements\n\n### Current version\n\n-   PHP version `\u003e= 7.4`\n-   Swoole PHP Extension `\u003e= 4.5.10`\n-   Symfony `\u003e= 4.4.0`\n\n### Future versions\n\n-   PHP version `\u003e= 8.0`\n-   Swoole PHP Extension `\u003e= 4.6`\n-   Symfony `\u003e= 5.0`\n\nAdditional requirements to enable specific features:\n\n-   [Inotify PHP Extension](https://pecl.php.net/package/inotify) `^2.0.0` to use Hot Module Reload (HMR)\n    -   When using PHP 8, inotify version `^3.0.0` is required\n\n### Swoole\n\nBundle requires [Swoole PHP Extension](https://github.com/swoole/swoole-src) version `4.5.10` or higher. Active bug fixes are provided only for the latest version.\n\n#### Version check\n\nTo check your installed version you can run the following command:\n\n```sh\nphp -r \"echo swoole_version() . \\PHP_EOL;\"\n\n# 4.4.7\n```\n\n#### Installation\n\nOfficial GitHub repository [swoole/swoole-src](https://github.com/swoole/swoole-src#%EF%B8%8F-installation) contains comprehensive installation guide. The recommended approach is to install it [from source](https://github.com/swoole/swoole-src#3-install-from-source-recommended).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk911%2Fswoole-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fk911%2Fswoole-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk911%2Fswoole-bundle/lists"}