Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Z4. Q&A

regy42 edited this page May 5, 2021 · 12 revisions

Q&A

  1. Is there any prerequisite to use this package?

Yes, Swoole extension(>1.9.3) and PHP 7.2 are required to use this package.

  1. Does Swoole support Windows system?

No, currently Swoole doesn't support Windows. Ubuntu on Windows 10 can run Swoole, but it's still not recommended for production environments.

  1. Can I use this package on my current Laravel projects out of the box?

Yes and no, different from traditional PHP lifecycle, your Laravel application will only boot at the first time and persist in the memory. That means some of your original code may make app become dirty and cause unexpected bugs in this case. (see more at Swoole Structure)

This package provides basic protection for the app container though, but there are still some limitations you need to keep in mind. Please see Notices for more details.

So it depends on if your code violates these limitations.

  1. How can I trace a bug that doesn't happen in traditional PHP?

Having better understanding in multi-process programming, Swoole structure, Laravel lifecycle and Container can help you a lot to figure out what's going on with your bug.

Following Debug Guideline can also help you trace your bug more easily.

  1. Does xxx package work with this package?

We can not guarantee all the third-party packages will work well with this package; especially since some packages are not designed with the consideration of this use case.

  1. Does this package support hot reload in developing?

Yes, but the watching module is separate from this package. You can check swooletw/watcher for more details.

The watching module is implemented with node.js. Make sure you install node environment before using it.

After v2.6.0, it supports built-in hot reload with fswatch.

  1. Does this package provide coroutine feature?

There's an experimental coroutine driver for PDO in this package. However, this may cause unpredictable errors in your app in this moment. The coroutine feature is a long-term plan in the roadmap. I can't guarantee when it will be completed though.

← Debug-Guideline | Others →

Clone this wiki locally