|
1 |
| -<h1> |
2 |
| - <img width="200" height="120" align="center" alt="Open Swoole Logo" src="https://www.swoole.co.uk/images/swoole-logo.svg" /> |
3 |
| -</h1> |
| 1 | +<p align="center"><a href="https://openswoole.com" target="_blank"><img src="https://openswoole.com/images/swoole-logo.svg#gh-light-mode-only" width="200" /></a></p> |
4 | 2 |
|
5 |
| -[](https://github.com/openswoole/swoole-src/actions?query=workflow%3Alib-openswoole) |
6 |
| -[](https://github.com/openswoole/swoole-src/actions?query=workflow%3Aext-openswoole) |
7 |
| -[](https://github.com/openswoole/swoole-src/actions?query=workflow%3Atest-linux) |
8 |
| -[](https://scan.coverity.com/projects/open-swoole-src) |
9 |
| -[](https://codecov.io/gh/openswoole/swoole-src) |
10 | 3 |
|
11 |
| -**Open Swoole (since 2017) is a programmatic server for PHP with async IO, coroutines and fibers: secure, reliable, high performance** |
| 4 | +<p align="center"><a href="https://github.com/openswoole/ext-openswoole/actions?query=workflow%3Alib-openswoole"><img src="https://github.com/openswoole/ext-openswoole/workflows/lib-openswoole/badge.svg" alt="lib-openswoole" style="max-width: 100%;"></a> |
| 5 | +<a href="https://github.com/openswoole/ext-openswoole/actions?query=workflow%3Aext-openswoole"><img src="https://github.com/openswoole/ext-openswoole/workflows/ext-openswoole/badge.svg" alt="ext-openswoole" style="max-width: 100%;"></a> |
| 6 | +<a href="https://github.com/openswoole/ext-openswoole/actions?query=workflow%3Atest-linux"><img src="https://github.com/openswoole/ext-openswoole/workflows/test-linux/badge.svg" alt="test-linux" style="max-width: 100%;"></a> |
| 7 | +<a href="https://scan.coverity.com/projects/open-swoole-src" rel="nofollow"><img src="https://camo.githubusercontent.com/74ce2aa24f7fc272064e7afeec3712e0e548cda19202c4af7e42e7cacf2e7f6f/68747470733a2f2f7363616e2e636f7665726974792e636f6d2f70726f6a656374732f32333937302f62616467652e737667" alt="Coverity Scan Build Status" data-canonical-src="https://scan.coverity.com/projects/23970/badge.svg" style="max-width: 100%;"></a></p> |
12 | 8 |
|
13 |
| -## Documentation & Community |
| 9 | +## Open Swoole |
14 | 10 |
|
15 |
| -+ __Documentation__: <https://www.swoole.co.uk/docs> |
| 11 | +Open Swoole is a programmatic server for PHP with async IO, coroutines and fibers: secure, reliable, high performance |
| 12 | + |
| 13 | ++ __Website__: <https://openswoole.com> |
16 | 14 | + __Twitter__: <https://twitter.com/openswoole>
|
17 |
| -+ __Join Slack Group__: <https://goo.gl/forms/wooTTDmhbu30x4qC3> |
18 |
| -+ __Join Discord Channel__: <https://discord.gg/5QC57RNPpw> |
19 |
| -+ __IDE Helper & API__: <https://github.com/openswoole/ide-helper> |
| 15 | ++ __Slack__: <https://goo.gl/forms/wooTTDmhbu30x4qC3> |
| 16 | ++ __Discord__: <https://discord.gg/5QC57RNPpw> |
| 17 | ++ __IDE Helper__: <https://github.com/openswoole/ide-helper> |
20 | 18 |
|
21 |
| -## Installation |
| 19 | +## Documentation |
22 | 20 |
|
23 |
| -> As with any open source project, Open Swoole always provides the most reliable stability and the most powerful features in **the latest released version**. Please ensure as much as possible that you are using the latest version. |
| 21 | +Documentation for Open Swoole can be found on the [Open Swoole website](https://openswoole.com/docs). |
24 | 22 |
|
25 |
| -### Compiling requirements |
| 23 | +## Installation |
26 | 24 |
|
27 |
| -+ Linux, OS X or Cygwin, WSL |
28 |
| -+ PHP 7.2.0 or later (The higher the version, the better the performance.) |
29 |
| -+ GCC 4.8 or later |
| 25 | +> Open Swoole always provides the most reliable stability and the most powerful features in **the latest released version**. Please ensure as much as possible that you are using the latest version. |
30 | 26 |
|
31 |
| -### 1. Install with PECL (beginners) |
| 27 | +### 1. Install or upgrade Open Swoole from multiple distribution channels |
32 | 28 |
|
33 |
| -```shell |
34 |
| -pecl install openswoole |
35 |
| -``` |
| 29 | +Please check [Open Swoole Installation Guide](https://openswoole.com/docs/get-started/installation) about how to install Open Swoole on Ubuntu/CentOS/Windows WSL from Docker, PECL or Binary releases channels. |
36 | 30 |
|
37 |
| -### 2. Install from source (recommended) |
| 31 | +### 2. Compile from source |
38 | 32 |
|
39 |
| -Please download the source packages from [Releases](https://github.com/openswoole/swoole-src/releases) or: |
| 33 | +#### Compiling requirements |
40 | 34 |
|
41 |
| -```shell |
42 |
| -git clone https://github.com/openswoole/swoole-src.git && \ |
43 |
| -cd swoole-src |
44 |
| -git checkout v4.8.0 |
45 |
| -``` |
| 35 | ++ Linux, OS X or Cygwin, WSL |
| 36 | ++ PHP 7.4.0 or later (The higher the version, the better the performance.) |
| 37 | ++ GCC 4.8 or later |
46 | 38 |
|
47 |
| -Compile and install at the source folder: |
| 39 | +Download the source packages from [Releases](https://github.com/openswoole/ext-openswoole/releases) or: |
48 | 40 |
|
49 | 41 | ```shell
|
| 42 | +git clone https://github.com/openswoole/ext-openswoole.git && \ |
| 43 | +cd ext-openswoole |
| 44 | +git checkout v22.0.0 |
50 | 45 | phpize && \
|
51 | 46 | ./configure && \
|
52 | 47 | make && make install
|
53 | 48 | ```
|
54 | 49 |
|
55 |
| -#### Enable extension in PHP |
56 |
| - |
57 |
| -After compiling and installing the openswoole extension, you have to add a new line `extension=openswoole.so` to `php.ini` to enable Open Swoole. It is recommended to be added after all the other extensions because openswoole may depend on extensions: sockets, mysqlnd, curl etc. |
| 50 | +You can find how to fix [Common Installation Errors](https://openswoole.com/docs/get-started/common-install-errors) if there are errors in the installation. |
58 | 51 |
|
59 |
| -#### Extra compile configurations |
| 52 | +#### Compile configurations |
60 | 53 |
|
61 | 54 | > for example: `./configure --enable-openssl --enable-sockets`
|
62 | 55 |
|
63 | 56 | + `--enable-openssl` or `--with-openssl-dir=DIR`
|
64 | 57 | + `--enable-sockets`
|
65 | 58 | + `--enable-http2`
|
66 | 59 | + `--enable-mysqlnd` (need mysqlnd, it just for supporting `$mysql->escape` method)
|
67 |
| -+ `--enable-swoole-json` |
68 |
| -+ `--enable-swoole-curl` |
| 60 | ++ `--enable-hook-curl` |
69 | 61 | + `--with-postgres[=DIR]`
|
70 | 62 |
|
71 |
| -### Upgrade |
| 63 | +#### Enable Open Swoole extension |
72 | 64 |
|
73 |
| -> If you upgrade from source, don't forget to `make clean` before you upgrade your swoole |
| 65 | +After compiling and installing the openswoole extension, you have to add a new line `extension=openswoole.so` at the end of `php.ini` or create a ini file at `conf.d` folder to enable Open Swoole. It is recommended to be added after all the other extensions because openswoole may depend on extensions: sockets, mysqlnd, curl etc. |
74 | 66 |
|
75 |
| -1. `pecl upgrade openswoole` |
76 |
| -2. `cd swoole-src && git pull && make clean && make && sudo make install` |
77 |
| -3. if you have changed PHP version, please re-run `phpize clean && phpize` then try to compile |
| 67 | +## Frameworks & Components |
78 | 68 |
|
79 |
| -## Call for Contributors |
| 69 | +> PR are welcome if your framework is using openswoole |
| 70 | + |
| 71 | + - [**Laravel Octane**](https://laravel.com/docs/9.x/octane) Laravel Octane supercharges your application's performance by serving your application using high-powered application servers. |
| 72 | + - [**PHP Runtime**](https://github.com/php-runtime) make it easy to run any kind of PHP Application (Symfony, Laravel, PSR7, Native) with all kinds of Runtimes like OpenSwoole, Bref, Google Cloud Functions, Roadrunner and React PHP with minimal configuration. |
| 73 | + - [**Mezzio Swoole**](https://docs.mezzio.dev/mezzio-swoole/) allows you to run Mezzio and [PSR-15](https://www.php-fig.org/psr/psr-15/) applications on Open Swoole. |
| 74 | + |
| 75 | +## For Contributors |
80 | 76 |
|
81 | 77 | If you like to involve the maintenance of this repo, it is better to get started by submitting PR, you will be invited to the dev group once there are significant contributions. Or join Slack group firstly, the team will provide mentoring and internal support to help you get started.
|
82 | 78 |
|
83 |
| -* [Report issues and feedback](https://github.com/openswoole/swoole-src/issues) |
| 79 | +* [Report issues and feedback](https://github.com/openswoole/ext-openswoole/issues) |
84 | 80 | * Submit fixes, features via Pull Request
|
85 | 81 |
|
86 |
| -This project exists thanks to all the historical [[Contributors](https://github.com/openswoole/swoole-src/graphs/contributors)]. |
| 82 | +This project exists thanks to all the historical [[Contributors](https://github.com/openswoole/ext-openswoole/graphs/contributors)]. |
87 | 83 |
|
88 | 84 | ## Security issues
|
89 | 85 |
|
90 |
| -Security issues should be reported privately, via email, to the Open Swoole develop team [[email protected]](mailto:[email protected]). You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. |
91 |
| - |
92 |
| -## Frameworks & Components |
93 |
| - |
94 |
| -> PR are welcome if your framework is using openswoole |
95 |
| - |
96 |
| - - [**Laravel Octane**](https://laravel.com/docs/8.x/octane) Laravel Octane supercharges your application's performance by serving your application using high-powered application servers. |
97 |
| - - [**PHP Runtime**](https://github.com/php-runtime) make it easy to run any kind of PHP Application (Symfony, Laravel, PSR7, Native) with all kinds of Runtimes like OpenSwoole, Bref, Google Cloud Functions, Roadrunner and React PHP with minimal configuration. |
98 |
| - - [**Mezzio Swoole**](https://docs.mezzio.dev/mezzio-swoole/) allows you to run Mezzio and [PSR-15](https://www.php-fig.org/psr/psr-15/) applications on Open Swoole. |
| 86 | +Security issues should be reported privately, via email, to the Open Swoole develop team [[email protected]](mailto:[email protected]). You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. |
99 | 87 |
|
100 | 88 | ## License
|
101 | 89 |
|
102 |
| -Apache License Version 2.0 see http://www.apache.org/licenses/LICENSE-2.0.html |
| 90 | +Open Swoole is open-sourced software licensed under the [Apache 2.0 license](http://www.apache.org/licenses/LICENSE-2.0.html). |
0 commit comments