[Docs] Extract example php code for static analysis.#5689
[Docs] Extract example php code for static analysis.#5689kenjis merged 5 commits intocodeigniter4:developfrom sfadschm:docs-example-code
Conversation
|
How about like this? Make the filename and folder name same. |
You mean, sparing the extra folder level |
Yes. I thought it was better the RST file and source file are close, but the difference might be not so much.
A bit different. |
Oh right, I get it now. |
Alright, I will leave this for a second opinion, but I am fine both ways. |
|
I don't have a strong opinion on where to place the code samples. Where it fits then that's fine. My question: is the extraction manually done? At least in the description, it says:
So I'm looking in the commits for a script that does that. Or maybe I got lost because of the many files changed? |
|
Oh sorry, what I do is that I manually mark the beginning and end of each php sample in a folder with a Then I build the docs to another local repository, where I havr stored the original docs build before this PR and fix any differences by hand (mostly indentation and such ). Unfortunately , I could not figure a way to identify php code samples automatically, as it is only introduced by |
Good point though, I will dedicate this PR to the pure extraction of the samples. The cs-fixer run will then be another PR so the changes are reviewable. |
|
What are our line ending conventions? |
|
|
|
So the main work of this PR is done. Questions remaining for now:
Once these are done I will squash all commits and start the second PR. |
|
And a bigger question: |
Personally, I would like numeric file names. Less thinking of file names. But I want it to be padded with leading zeros so that it will align nicely in file explorer. 01.php, 02.php, etc.
There are some rules which can handle mixed html/php code.
If the code is pure php, then yes to opening tag. If mixed with html, then include the closing tag where necessary |
|
This PR is really big! How could we review? |
I would agree with that. |
Correct, that is how I am doing it during the changes and why I removed the date from the HTML build. This PR will not change the HTML output in any way. So the way to go might be:
Currently, I created a new local repository where I stored just the old build and then changed the If that helps I can also upload the original and new HTML, but this might go against the idea of independent review. |
I will go with this. Flat folder structure makes it easier to work with both rst and php files. |
Great! |
|
This should now be up to date with |
|
I will add a script to automatically restore consecutive enumeration of the examples. |
No problem. |
It seems this is a bit behind. |
Yep, since #5709 😆 |
|
I made html on |
|
Up tp date with e1b4f76. The |
|
I think yes. |
This is the working PR for extracting
phpcode examples from the docs to enable runningphp-cs-fixeron them.All files will have consecutive numeric file names per subfolder (module).
This PR will not do any change to the output of the docs html build.
Content and style changes will follow with a second PR to ease review.
Workflow
phpcode in an rst.make htmland diff new docs with base branch.Status
makeandconf.py.Follow-up PR (content/style changes)
. :.non-phpcode.php-cs-fixerforuser_guide_src\source.Miscellaneous (possible stuff for the second PR)
database->metadata-> l. 53database->query-builder-> l. 295database->query-builder-> l. 238 (codeblock is not part of the lists)Happy about feedback and discussion.