Skip to content

Autogenerate hooks summary (with Symfony CLI tool)

homotechsual requested to merge github/fork/seancolsen/symfony-tools into master

Created by: seancolsen

@mickadoo when I looked at your PR #205 I got excited about this project, but I really wanted to see more on that summary page. I wanted to see a short description of each hook, and I wanted the hooks to be categorized. I was thinking that those tasks would be a bit cumbersome in bash so I started playing around with it in PHP. Then, well, I got pretty carried away. Yeah... so I hope you don't mind that I took something very cool that you did and then went a different direction with it. Sorry!

What do you think of this though? Check out the auto-generated summary page.

Mostly this PR is so giant because I ended up doing small tweaks to almost all the hooks files in order to get to a point where I could extract a nice, clean summary out of each of them.

I'm interested in seeing what else we can do with auto-generated documentation. I don't have anything too specific in mind at the moment, but I have a gut feeling that we'll probably end up wanting to do more stuff like this in the future... hence the somewhat more sophisticated docs-generating infrastructure with a symfony CLI tool here. It could still use some refining though (e.g. using __DIR__ all over the place), but I kind of like the idea of laying some solid groundwork here that we can build on top of more easily (than bash) if/when we end up wanting to do more complicated things.

I'm open to other approaches though. What are your thoughts about this?

Merge request reports