seregazhuk / php-watcher

Monitor for any changes in your php application and automatically restart it (suitable for async apps).
https://sergeyzhuk.me/2019/10/18/php-watcher/
389 stars 31 forks source link

Laravel Support #15

Closed ManojKiranA closed 4 years ago

ManojKiranA commented 5 years ago

Add Support for Laravel by adding Console Command

seregazhuk commented 5 years ago

I don't see any problem with using the watcher with Laravel. What is your issue about?

ManojKiranA commented 5 years ago

i have clearly mentioned as adding console command

for Example: My App Name is Demo

Instead of php-watcher Demo

There must of Some Sort of Command as

php artisan Watch

seregazhuk commented 5 years ago

Actually, it is not clear for those how don't use Laravel. I think that what you want here should be implemented as a separate package, not in this one. I don't want to couple this package to any framework.

gorbunov commented 4 years ago

@seregazhuk I'm a Laravel developer, and I see only one possible scope for php-watcher:

  1. There is long-running queue processing command, but there is already "sync" mode for development, which just processes queue immediately on requests (which is also default, so, no good reason to implement this) I actually use php-watcher for this restarting this queue inside docker container.

Also, for the actual feature asked, there is a bundled artisan serve command that does exactly whats requested: starts laravel app with internal php http server.

seregazhuk commented 4 years ago

@gorbunov so, there is no need to couple to Console Command or something like that? If someone wants to make artisan watch command - this can be implemented in a separate package "laravel-php-watcher" or something)

gorbunov commented 4 years ago

@seregazhuk yes, I think its not needed: There is no long-running processes to watch out-of-the-box in laravel in development mode, there is existing command to serve app as traditional http requests, any other complex behavior wouldn't benefit from any implementation internal watching. (Also no reason to bundle it with production code of any laravel app) I'd say this should be just closed.

seregazhuk commented 4 years ago

@gorbunov thank you!