Skip to content

Drop file pages emptied by the @ignore tag (FileAssembler)#4110

Open
lacatoire wants to merge 2 commits into
phpDocumentor:masterfrom
lacatoire:fix/respect-ignore-tag
Open

Drop file pages emptied by the @ignore tag (FileAssembler)#4110
lacatoire wants to merge 2 commits into
phpDocumentor:masterfrom
lacatoire:fix/respect-ignore-tag

Conversation

@lacatoire

Copy link
Copy Markdown
Contributor

When every class, interface, trait, enum, function or constant of a file is removed by a descriptor filter (typically because each element carries an @ignore tag) the file page was still generated, listed in the files index and exposed the full source, which defeated the purpose of @ignore.

FileAssembler now returns null in that case, mirroring how the class page itself is already omitted.

Refs #1959

When every class, interface, trait, enum, function or constant of a file
is removed by a descriptor filter (for example because each carries an
@ignore tag) the FileAssembler now returns null. Without this change the
file page was still generated, listed in the files index and exposed the
full source, which defeated the purpose of @ignore for users relying on
it to hide entire entities.

Refs phpDocumentor#1959
@lacatoire lacatoire changed the title Drop files whose documented elements are all filtered out Drop file pages emptied by the @ignore tag (FileAssembler) May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant