Shipping a small Laravel utility (Hook Press) : build-time class discovery via Composer hooks. Feedback welcome!
Hey folks š
Iāve used a Composer hook pattern a few times across projects where I didnāt want to maintain manual listsājust implement strategies/drivers and have them auto-discovered. I decided to clean it up and packag it. Build-time discovery (on install/update) and a cached map the app reads at runtime. No boot-time reflection, no āremember to register this classā.
Use case: auto-discovering strategies/drivers/handlers; populating registries,dropdowns or whatever you find useful - without wiring.
Repo: https://github.com/teofanis/hook-press
Curious about your take:
-
Would this fit your use cases?
-
Concerns around Composer hooks, caching, or CI?
-
DX wishes (config shape, commands, docs)?
If itās useful, a ā helps others find it. Happy to iterate based on feedback.
Please or to participate in this conversation.