Skip to content

Add support for generating the namespace for the manual#21313

Open
kocsismate wants to merge 1 commit intophp:PHP-8.5from
kocsismate:gen-stub-namespace
Open

Add support for generating the namespace for the manual#21313
kocsismate wants to merge 1 commit intophp:PHP-8.5from
kocsismate:gen-stub-namespace

Conversation

@kocsismate
Copy link
Member

@kocsismate kocsismate commented Feb 27, 2026

Based on php/phd#194

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewing gen_stub code is always difficult due to the lack of tests :/

Comment on lines +3761 to +3762
$package->setAttribute("modifier", "namespace");
$package->setAttribute("class", $namespace);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need this, the renderer takes care of adding the namespace.

Copy link
Member

@DanielEScherzer DanielEScherzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree that reviewing is hard, especially for patches that change the documentation generation rather than stubs - noticed one thing that might make it easier to review, but I don't think I'm qualified to actually approve this


/** @param array<string, ConstInfo> $allConstInfos */
public function getFieldSynopsisElement(DOMDocument $doc, array $allConstInfos): DOMElement
public function getFieldSynopsisElement(DOMDocument $doc, array $allConstInfos, int $indentationLevel): DOMElement
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we do the indentation changes on a separate commit, even if it is in the same PR? I assume that the initial indentation changes were meant to be no-ops, and just make things useful for indenting in a namespace later, but I can't really tell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants