Skip to content
This repository has been archived by the owner on Jan 17, 2022. It is now read-only.

Commit

Permalink
docs(readme): clarify state of HMR in bundle (#275)
Browse files Browse the repository at this point in the history
- update deps
- update composer develop line to 0.8.x

Fixes #264
  • Loading branch information
k911 authored Jul 14, 2020
1 parent 87ede15 commit 1e49f07
Show file tree
Hide file tree
Showing 6 changed files with 153 additions and 86 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ php -v
# Zend Engine v3.3.7, Copyright (c) 1998-2018 Zend Technologies
```

Currently, the minimum supported version is `7.2.19` but it is highly recommended to develop using the latest PHP version.
Currently, the minimum supported version is `7.3.10` but it is highly recommended to develop using the latest PHP version.

#### [Docker](https://docs.docker.com/install/)

Expand Down
24 changes: 18 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Symfony integration with [Swoole](https://www.swoole.co.uk/) to speed up your ap
- [Quick start guide](#quick-start-guide)
- [Features](#features)
- [Requirements](#requirements)
- [Current (`0.8.x`)](#current-08x)
- [Future](#future)
- [Swoole](#swoole)
- [Version check](#version-check)
- [Installation](#installation)
Expand Down Expand Up @@ -78,24 +80,34 @@ Symfony integration with [Swoole](https://www.swoole.co.uk/) to speed up your ap

- Improved static files serving

Swoole HTTP Server provides a default static files handler, but it lacks supporting many `Content-Types`. To overcome this issue, there is (not yet 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`.

- Hot Module Reload (HMR) - for development

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.
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`).

- Symfony Messenger integration

*Available since version: `0.6`*

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).

- Hot Module Reload (HMR) for development **ALPHA**

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.

*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).*
## Requirements
### Current (`0.8.x`)
- PHP version `>= 7.3.10`
- Swoole PHP Extension `>= 4.4.7`
- Symfony `>= 4.3.1`
### Future
- PHP version `>= 7.4`
- Swoole PHP Extension `>= 4.5`
- Symfony `>= 5.0`
Additional requirements to enable specific features:
- [Inotify PHP Extension](https://pecl.php.net/package/inotify) `^2.0.0` to use Hot Module Reload (HMR)
Expand All @@ -106,7 +118,7 @@ Bundle requires [Swoole PHP Extension](https://github.com/swoole/swoole-src) ver
#### Version check
To check your installed version you can run following command:
To check your installed version you can run the following command:
```sh
php -r "echo swoole_version() . \PHP_EOL;"
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@
"upscale/swoole-blackfire": "^3.0"
},
"suggest": {
"ext-inotify": "To enable HMR.",
"doctrine/orm": "To use the EntityManager handler.",
"symfony/messenger": "To use Symfony Messenger Swoole Task Transport.",
"ext-inotify": "To enable HMR",
"doctrine/orm": "For using Entity Manager Handler",
"symfony/messenger": "For using Symfony Messenger Swoole Task Transport.",
"upscale/swoole-blackfire": "To enable Blackfire profiling",
"pixelfederation/doctrine-resettable-em-bundle": "To be able to recover Doctrine entity managers from errors.",
"symfony/error-handler": "To use Symfony exception handler."
"pixelfederation/doctrine-resettable-em-bundle": "To be able to recover Doctrine Entity Managers from errors",
"symfony/error-handler": "To use Symfony Error Handler"
},
"autoload": {
"files": [
Expand Down Expand Up @@ -124,7 +124,7 @@
},
"extra": {
"branch-alias": {
"dev-develop": "v0.7.x-dev"
"dev-develop": "v0.8.x-dev"
}
},
"config": {
Expand Down
Loading

0 comments on commit 1e49f07

Please sign in to comment.