1
0
mirror of https://github.com/php/phd.git synced 2026-03-24 07:02:07 +01:00

8 Commits

Author SHA1 Message Date
AllenJB
264c65b187 Fix missing pages in search indexes (#212)
* Search indexes: Fix missing search entries

This handles duplicated ids - but requires changes on web-php to use new indexes
2025-11-04 06:19:18 +00:00
Jim Winstead
417b06655c Fix element map so changelog rows are handled correctly (#146) 2024-09-23 11:16:41 -07:00
haszi
6291d50a05 Remove html_entity_decode when getting refentry names from the database (#131)
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>
2024-05-25 13:42:41 +01:00
haszi
8625d102d5 Fix GH-3353 incorrect function tag linking (#123)
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>
2024-05-22 16:19:28 +01:00
haszi
fc84db4987 Move all database access to IndexRepository (#126)
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>
2024-05-20 13:19:31 +01:00
Gina Peter Banyard
b535eebcde Revert "Move all database access code to IndexRepository (#120)"
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.
2024-05-14 00:28:54 +01:00
haszi
71e6292050 Move all database access code to IndexRepository (#120)
Use the same IndexRepository instance everywhere

Co-authored-by: haszi <haszika80@gmail.com>
2024-05-13 23:48:20 +01:00
haszi
26bf0c610a Inject database dependency into constructor of Index
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.
2024-04-16 11:23:53 +01:00