Refentry names are taken from xml IDs and stored in the database during indexing. These are then retrieved and used for linking to functions and methods. Do not use html_entity_decode on these names as these IDs should not have entities in them to begin with. This change aligns this function with the function/method linking functions that only do strtolower as well.
Co-authored-by: haszi <haszika80@gmail.com>
Closes https://github.com/php/doc-en/issues/3353.
When the list of `refentry`s (functions and methods) is retrieved from the indexing database the characters `_`, `::` and `->` in their names were replaced by `-` before storing them in the array `$ref` in `Format.php`. As this array is used to generate the links to and the index list of functions/methods, functions and methods with the same name after replacing the before mentioned characters (e.g. `finfo_buffer()`/`finfo::buffer()`, `finfo_file()`/`finfo::file()`, etc.) were overwriting each other's reference entries in memory (in the `$ref` array).
Fix this by not replacing the above listed characters.
Co-authored-by: haszi <haszika80@gmail.com>
Move all database access to IndexRepository.
Use the same database during the entire indexing-rendering process.
Add a simple smoke test for render.php.
Co-authored-by: haszi <haszika80@gmail.com>
Still breaks the EN build on the doc rendering server
Indexing...
E_WARNING /local/src/phd/render.php:79 Undefined variable $config
PHP Fatal error: Uncaught Error: Call to a member function render_ids() on null in /local/src/phd/render.php:79
Stack trace:
0 /local/src/phd/render.php(129): phpdotnet\phd\make_reader()
1 {main} thrown in /local/src/phd/render.php on line 79
This reverts commit 71e6292050.
Add new IndexRepository class to handle all database access.
Inject IndexRepository as a dependency into the constructor of Index and use that instead of directly accessing the database.
Add basic indexing test.
Fix existing test that uses indexing to use IndexRepository.