Skip to content

Skip README.md generation in extension-init command if it exists#2283

Open
IndraGunawan wants to merge 2 commits intophp:mainfrom
IndraGunawan:extension-init-readme
Open

Skip README.md generation in extension-init command if it exists#2283
IndraGunawan wants to merge 2 commits intophp:mainfrom
IndraGunawan:extension-init-readme

Conversation

@IndraGunawan
Copy link
Contributor

@IndraGunawan IndraGunawan commented Mar 14, 2026

Currently, the extension-init command automatically generates a boilerplate README.md. While helpful for initial setups, this behavior becomes destructive during the iterative development phase. If a developer has customized their README and later runs extension-init to update function signatures or add new functions, their custom documentation is overwritten without warning.

@dunglas
Copy link
Member

dunglas commented Mar 14, 2026

Maybe a flag isn't worth it?
We could just never overwrite the file if it exists. Users wanting to regenerate it can just delete it before running the command.

@alexandre-daubois
Copy link
Member

An alternative could also be to name it in a different way, like README_generated.md, then people would rename it. Just thinking out loud, Kevin's idea also suits me!

@IndraGunawan
Copy link
Contributor Author

that makes sense. I agree the command shouldn't overwrite README.md if it already exists

@IndraGunawan IndraGunawan changed the title add overwrite-readme flag to extension-init command Skip README.md generation in extension-init command if it exists Mar 15, 2026
@IndraGunawan IndraGunawan force-pushed the extension-init-readme branch from 3569d09 to efe7541 Compare March 15, 2026 08:47
@IndraGunawan IndraGunawan force-pushed the extension-init-readme branch from efe7541 to c03d117 Compare March 15, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants