Repository: laravel/octane (language: php)

Issue:
Opcache is not cleared before worker (re)boot
- Octane Version: v1.2.12
- Laravel Version: v9.3.1
- PHP Version: 8.1.0
- Server & Version: OpenSwoole 4.11 and also Swoole 4.8.10 (Using their official docker dev-images respectively)
- Database Driver & Version: Not relevant

### Description:
The opcache is not cleared before the worker boot, resulting in hot reload not working with all bootstrapped content using at least Swoole and OpenSwoole. (tested with both)

The solution is very simple, and is simply a re-ordering of the boot sequence of a worker, moving the [`clearOpcodeCache()`](https://github.com/laravel/octane/blob/1.x/src/Swoole/Handlers/OnWorkerStart.php#L41) method call before the [`$this->bootWorker()`](https://github.com/laravel/octane/blob/1.x/src/Swoole/Handlers/OnWorkerStart.php#L37) method call fixes the issue on my setup.

### Steps To Reproduce:

1. Enable opcache in php.ini: `opcache.enable_cli=1`
2. With the server running in --watch mode, edit any bootstrapped file, for example a routes file.
3. Observe hot reloading is not having any effect on bootstrapped files, for example that routes do not change untill server restart.

<!-- If possible, please provide a GitHub repository to demonstrate your issue -->
<!-- laravel new bug-report --github="--public" -->



Discussion / hints:

Fix patch:
diff --git a/src/Swoole/Handlers/OnWorkerStart.php b/src/Swoole/Handlers/OnWorkerStart.php
index b6e310885..fc6d41152 100644
--- a/src/Swoole/Handlers/OnWorkerStart.php
+++ b/src/Swoole/Handlers/OnWorkerStart.php
@@ -31,6 +31,8 @@ public function __construct(
      */
     public function __invoke($server, int $workerId)
     {
+        $this->clearOpcodeCache();
+
         $this->workerState->server = $server;
         $this->workerState->workerId = $workerId;
         $this->workerState->workerPid = posix_getpid();
@@ -38,7 +40,6 @@ public function __invoke($server, int $workerId)
 
         $this->dispatchServerTickTaskEverySecond($server);
         $this->streamRequestsToConsole($server);
-        $this->clearOpcodeCache();
 
         if ($this->shouldSetProcessName) {
             $isTaskWorker = $workerId >= $server->setting['worker_num'];


Test patch: