-
-
Notifications
You must be signed in to change notification settings - Fork 640
Closed
Labels
Description
After #3740 empty namespaces aren't rendered. But they are still indexed by the search feature, leading to 404 errors.
Excluded @internal classes are also indexed.
Expected behavior
Internal classes and empty namespaces shouldn't appear in the search index.
Actual behavior
Empty namespaces or internal classes appear in the search index.
Steps to reproduce the problem
- In an empty temporary directory, create the two following files:
Internal/MyInternalInterface.php
<?php
namespace App\Internal;
/** @internal */
interface MyInternalInterface {}Public/MyPublicInterface.php
<?php
namespace App\Public;
interface MyPublicInterface {}- Generate documentation from this folder using 3.5.3 (latest at the time of writing)
curl -LO "https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.5.3/phpDocumentor.phar";
php phpDocumentor.phar;- Move to doc build and launch a local server, for example on port 8080:
cd .phpdoc/build;
php -S 127.0.0.1:8080;- Open the doc index in a browser. For previous example,
http://127.0.0.1:8080/. - In the top right corner search input, search for "internal".
Two entries are found:\App\Internaland\App\Public\MyPublicInterface. - Click on the first search result, the
\App\Internalnamespace, the page isn't found.
Your environment
- Version used: 3.5.3
- phpDocumentor.phar downloaded and used as-is
- PHP 8.3.6 (cli) (built: Apr 10 2024 14:21:20) (NTS)
- macOS Sonoma 14.6.1 (23G93)