Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update StartFrankenPhpCommand.php
  • Loading branch information
taylorotwell authored Jun 28, 2025
commit 1c4afe6d2420c2bf7b4a5e35b07814ef14483c33
33 changes: 17 additions & 16 deletions src/Commands/StartFrankenPhpCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,22 @@ protected function buildMercureConfig()
return "$config\n\t\t}";
}

/**
* Always return a no-op object, because FrankenPHP has native watcher support.
*
* @return object
*/
protected function startServerWatcher()
{
return new class
{
public function __call($method, $parameters)
{
return null;
}
};
}

/**
* Generate the file watcher configuration snippet to include in the Caddyfile.
*
Expand All @@ -202,7 +218,7 @@ protected function buildWatchConfig()
return '';
}

// If paths are not specified, fall back to FrankenPHP's default watcher pattern
// If paths are not specified, fall back to FrankenPHP's default watcher pattern...
if (empty($paths = config('octane.watch'))) {
return "\t\twatch";
}
Expand Down Expand Up @@ -369,19 +385,4 @@ protected function stopServer()
'--server' => 'frankenphp',
]);
}

/**
* Always return a no-op object, because FrankenPHP has native
* watcher support, so there is no need for an external watcher.
*/
protected function startServerWatcher()
{
return new class
{
public function __call($method, $parameters)
{
return null;
}
};
}
}