add admin option to php-server for easier debugging
This just adds a --admin option for the php-server command. Makes it a heck of a lot easier to profile and debug.
@dunglas any objections to merging this?
I'm hesitating. I would prefer keeping the "general" Caddy-related options in sync with what native Caddy commands provide.
What do you think @mholt @francislavoie?
Why not just use a Caddyfile?
I don't really have an opinion on the design of a command that isn't included in vanilla Caddy.
Personally, I'm not a fan of it either except for exactly one case: quickly switching between test directories without maintaining a caddy file and all their variants. Being able to turn on admin and running pprof is great.
That being said, it is also too easy to just go into the file and change it to true. So, I'm not particularly attached to it one way or the other. I didn't think about being able to use the admin api to change settings, so I'm leaning towards closing the PR.
Similar to Francis, if it's not Caddy itself I don't mind if other programs add their own CLI. But if you're going for parity with the caddy command (there is wisdom in that, to keep it more predictable and symmetric), I would just flip the switch in a config file, personally.
Caddy values having all the config contained in a single file/source, not spread across config file and CLI and env vars etc ... but it's really up to the application developer.
@mholt in case you didn't realize, this command is more akin to caddy file-server or caddy reverse-proxy kinda thing
Hayır itirazım yok
sf
14 Ağu 2024 Çar 01:40 tarihinde Rob Landers @.***> şunu yazdı:
@dunglas https://github.com/dunglas any objections to merging this?
— Reply to this email directly, view it on GitHub https://github.com/dunglas/frankenphp/pull/932#issuecomment-2288416292, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJOVHCDRWYAKLIX5FNOQG4TZRMX3PAVCNFSM6AAAAABLLIKH6OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBYGQYTMMRZGI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
That's true. In that case it doesn't really matter then IMO. Since those specialty sub commands carry config on them.