Skip to content

Restore ability to generate documentation JSON blob.#250

Open
dmsnell wants to merge 16 commits intoWordPress:masterfrom
dmsnell:fix/update-through-to-phparser-4x
Open

Restore ability to generate documentation JSON blob.#250
dmsnell wants to merge 16 commits intoWordPress:masterfrom
dmsnell:fix/update-through-to-phparser-4x

Conversation

@dmsnell
Copy link
Member

@dmsnell dmsnell commented Feb 12, 2026

Status

  • The CI jobs are failing and I’m not sure why. It seems like it could be related to importing the fork of phpDocumentor/Reflection, but I would appreciate any help in understanding the failures.

Description

This patch makes a few updates to unblock generating the documentation for WordPress, notably updating the underlying dependency nikic/php-parser from ^1.0 to ^3.0. Some updating is required here while some is required on the intermediate dependency on phpDocumentor/Reflection.

  • Depend on the fork dmsnell/Reflector which updates the PHP parser.
  • Changes from the PHPParser namespace/class aliases with underscores to the normal form. For example, from \PHPParser_Node to \PHPParser\Node.
  • Updates to AST changes in PHPParser: notably how names are represented and anonymous objects.

Because nikic/php-parser made a change in how it presents names, prefixing every global identifier with the namespace prefix, a cleanup pass has been added to remove it. This is optional and could be removed if the documentation wants to adopt the global namespace prefix (and there are reasons to consider that).

Changes to the phpDocumentor/Reflection dependency involve:

  • Conditionally relying on \Stringable for runs with PHP versions lacking that interface.
  • Update deprecations in certain type definitions.
  • Update naming
  • Support nullable types in the AST.

Overall there isn’t much work, and this will parse trunk with PHP 7.4. One patch was necessary in Core to unblock some syntax issues, though the syntax form would have been solvable some other way — it was easier to remove it than update the parser.

See also #251

@dmsnell dmsnell force-pushed the fix/update-through-to-phparser-4x branch from e52fe08 to 0483dc7 Compare February 18, 2026 23:26
@dmsnell dmsnell force-pushed the fix/update-through-to-phparser-4x branch from c108fbb to 0cd9903 Compare February 18, 2026 23:37
@dmsnell dmsnell changed the title Fix/update through to phparser 4x Restore ability to generate documentation JSON blob. Feb 19, 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

Comments