laravel / octane

Supercharge your Laravel application's performance.
https://laravel.com/docs/octane
MIT License
3.73k stars 288 forks source link

Code Updates don't reflect unless the Octane Server with FrankenPHP is restarted #834

Closed abishekrsrikaanth closed 6 months ago

abishekrsrikaanth commented 6 months ago

Octane Version

2.3.2

Laravel Version

10.43.0

PHP Version

8.3

What server type are you using?

FrankenPHP

Server Version

1.1.0

Database Driver & Version

MySQL 8

Description

Any code changes I make to the laravel app doesn't reflect unless the octane server is restarted. These aren't code changes on .env file or AppServiceProvider, but the code changes are within the app folder. This issue is on the local environment. I run octane with the following command. This issue doesn't occur when using RoadRunner. Haven't used Swoole, so not sure about this.

php artisan octane:start -port={PORT_NOW}

Steps To Reproduce

  1. Run your Laravel app using Octane Server with FrankenPHP
  2. Make code changes within the app folder
  3. Check if the code changes reflect on the browser.
  4. Restart the Octane Server and you will notice the code updates done before restarting the octane server.
theaungmyatmoe commented 6 months ago

You have to provide --watch option like below.

php artisan octane:start -port={PORT_NOW} --watch

Before watching files, you have to install npm install --save-dev chokidar.

https://laravel.com/docs/10.x/octane#watching-for-file-changes

crynobone commented 6 months ago

Thanks @amm834