Skip to content

Commit 628721c

Browse files
Merge pull request #73 from weierophinney/feature/openswoole-support
Provide support for Open Swoole
2 parents 26c25a3 + 8828bc9 commit 628721c

33 files changed

Lines changed: 500 additions & 502 deletions

README.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
[![Build Status](https://travis-ci.com/mezzio/mezzio-swoole.svg?branch=master)](https://travis-ci.com/mezzio/mezzio-swoole)
44
[![Coverage Status](https://coveralls.io/repos/github/mezzio/mezzio-swoole/badge.svg?branch=master)](https://coveralls.io/github/mezzio/mezzio-swoole?branch=master)
55

6-
This library provides the support of [Swoole](https://www.swoole.co.uk/) into
7-
an [Mezzio](https://docs.mezzio.dev/) application. This means you can
8-
execute your Mezzio application using Swoole directly from the command line.
6+
This library provides support for [Swoole](https://github.com/swoole/swoole-src) or [Open Swoole](https://www.swoole.co.uk/) for [Mezzio](https://docs.mezzio.dev/) applications.
7+
This means you can execute your Mezzio application using Swoole directly from the command line.
98

109

1110
## Installation
@@ -18,11 +17,10 @@ $ composer require mezzio/mezzio-swoole
1817

1918
## Configuration
2019

21-
After installing mezzio-swoole, you will need to first enable the
22-
component, and then optionally configure it.
20+
After installing mezzio-swoole, you will need to first enable the component, and then optionally configure it.
2321

24-
We recommend adding a new configuration file to your autoload directory,
25-
`config/autoload/swoole.local.php`. To begin with, use the following contents:
22+
We recommend adding a new configuration file to your autoload directory, `config/autoload/swoole.local.php`.
23+
To begin with, use the following contents:
2624

2725
```php
2826
<?php
@@ -32,11 +30,11 @@ use Mezzio\Swoole\ConfigProvider;
3230
return array_merge((new ConfigProvider())(), []);
3331
```
3432

35-
The above will setup the Swoole integration for your application.
33+
The above will setup Swoole integration for your application.
3634

37-
By default, Swoole executes the HTTP server with host `127.0.0.1` on port
38-
`8080`. You can change these values via configuration. Assuming you have the
39-
above, modify it to read as follows:
35+
By default, Swoole executes the HTTP server with host `127.0.0.1` on port `8080`.
36+
You can change these values via configuration.
37+
Assuming you have the above, modify it to read as follows:
4038

4139
```php
4240
<?php
@@ -55,9 +53,7 @@ return array_merge((new ConfigProvider())(), [
5553

5654
> ### Mezzio skeleton 3.1.0 and later
5755
>
58-
> If you have built your application on the 3.1.0 or later version of the
59-
> Mezzio skeleton, you do not need to instantiate and invoke the package's
60-
> `ConfigProvider`, as the skeleton supports it out of the box.
56+
> If you have built your application on the 3.1.0 or later version of the Mezzio skeleton, you do not need to instantiate and invoke the package's `ConfigProvider`, as the skeleton supports it out of the box.
6157
>
6258
> You will only need to provide any additional configuration of the HTTP server.
6359

composer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"laminas",
77
"mezzio",
88
"components",
9+
"openswoole",
910
"swoole",
1011
"psr-7",
1112
"psr-14",
@@ -28,7 +29,6 @@
2829
},
2930
"require": {
3031
"php": "^7.4 || ~8.0.0",
31-
"ext-swoole": "^4.5.5",
3232
"composer/package-versions-deprecated": "^1.11",
3333
"dflydev/fig-cookies": "^2.0.1 || ^3.0",
3434
"laminas/laminas-cli": "^0.1.5 || ^1.0",
@@ -54,7 +54,9 @@
5454
"vimeo/psalm": "^4.0"
5555
},
5656
"suggest": {
57-
"ext-inotify": "To use inotify based file watcher. Required for hot code reloading."
57+
"ext-inotify": "To use inotify based file watcher. Required for hot code reloading.",
58+
"ext-openswoole": "The package requires at least one of Open Swoole or Swoole",
59+
"ext-swoole": "The package requires at least one of Open Swoole or Swoole"
5860
},
5961
"autoload": {
6062
"psr-4": {

0 commit comments

Comments
 (0)