Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
9 changes: 6 additions & 3 deletions caddy/php-server.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
func init() {
caddycmd.RegisterCommand(caddycmd.Command{
Name: "php-server",
Usage: "[--domain <example.com>] [--root <path>] [--listen <addr>] [--worker /path/to/worker.php<,nb-workers>] [--watch <paths...>] [--access-log] [--debug] [--no-compress] [--mercure]",
Usage: "[--domain=<example.com>] [--root=<path>] [--listen=<addr>] [--worker=/path/to/worker.php<,nb-workers>] [--watch[=<glob-pattern>]]... [--access-log] [--debug] [--no-compress] [--mercure]",
Short: "Spins up a production-ready PHP server",
Long: `
A simple but production-ready PHP server. Useful for quick deployments,
Expand All @@ -47,11 +47,14 @@ For more advanced use cases, see https://github.com/dunglas/frankenphp/blob/main
cmd.Flags().StringP("root", "r", "", "The path to the root of the site")
cmd.Flags().StringP("listen", "l", "", "The address to which to bind the listener")
cmd.Flags().StringArrayP("worker", "w", []string{}, "Worker script")
cmd.Flags().StringArrayP("watch", "", []string{}, "Directory to watch for file changes")
cmd.Flags().StringArray("watch", []string{}, "Glob pattern of directories and files to watch for changes")
Comment thread
withinboredom marked this conversation as resolved.
cmd.Flags().BoolP("access-log", "a", false, "Enable the access log")
cmd.Flags().BoolP("debug", "v", false, "Enable verbose debug logs")
cmd.Flags().BoolP("mercure", "m", false, "Enable the built-in Mercure.rocks hub")
cmd.Flags().BoolP("no-compress", "", false, "Disable Zstandard, Brotli and Gzip compression")
cmd.Flags().Bool("no-compress", false, "Disable Zstandard, Brotli and Gzip compression")
Comment thread
withinboredom marked this conversation as resolved.

cmd.Flags().Lookup("watch").NoOptDefVal = defaultWatchPattern

cmd.RunE = caddycmd.WrapCommandFuncForCobra(cmdPHPServer)
},
})
Expand Down
2 changes: 1 addition & 1 deletion docs/fr/worker.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Il est également possible de [redémarrer le worker en cas de changement de fic
La commande suivante déclenchera un redémarrage si un fichier se terminant par `.php` dans le répertoire `/path/to/your/app/` ou ses sous-répertoires est modifié :

```console
frankenphp php-server --worker /path/to/your/worker/script.php --watch "/path/to/your/app/**/*.php"
frankenphp php-server --worker /path/to/your/worker/script.php --watch="/path/to/your/app/**/*.php"
```

## Runtime Symfony
Expand Down
2 changes: 1 addition & 1 deletion docs/ru/worker.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ frankenphp php-server --worker /path/to/your/worker/script.php
Следующая команда выполнит перезапуск, если будет изменён любой файл с расширением `.php` в директории `/path/to/your/app/` или её поддиректориях:

```console
frankenphp php-server --worker /path/to/your/worker/script.php --watch "/path/to/your/app/**/*.php"
frankenphp php-server --worker /path/to/your/worker/script.php --watch="/path/to/your/app/**/*.php"
```

## Symfony Runtime
Expand Down
2 changes: 1 addition & 1 deletion docs/worker.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ It's also possible to [restart the worker on file changes](config.md#watching-fo
The following command will trigger a restart if any file ending in `.php` in the `/path/to/your/app/` directory or subdirectories is modified:

```console
frankenphp php-server --worker /path/to/your/worker/script.php --watch "/path/to/your/app/**/*.php"
frankenphp php-server --worker /path/to/your/worker/script.php --watch="/path/to/your/app/**/*.php"
```

## Symfony Runtime
Expand Down