You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Theoretically, if we could map this to https://api.cakephp.org we could maybe throw a build error when the mapped method doesn't exist. Then we can just do something like
.. php:method:: \Cake\ORM\Table::deleteMany
and the rest will come automatically.
But I am far too inexperienced with sphinx to do this kind of stuff so maybe @markstory can jump in here with some ideas
I can see two ways the signature linking could be implemeted:
As a separate tool that we run periodically to 'sync' signature from the code into RST docs.
Extending the phpdomain so that when sphinx is parsing RST data into an AST to build the docs, we could inject validation logic and fail the documentation build should the signatures diverge.
I think 1. is the better approach as we don't need CakePHP and its dependencies available to build the documentation, and the 'sync' tool could be used in CI to help ensure that docs stay current as we evolve the book and code.
Many signatures are not even correct for 4.x but especially for 5.x types, e.g. $options is often an array type:
could all be typed in docs as they are in reality
I wonder if there is a more programmatic way to sync the docs to actual code?
The text was updated successfully, but these errors were encountered: