Fix docs build: php-parser 4.x, vendored dependency#251
Fix docs build: php-parser 4.x, vendored dependency#251sirreal wants to merge 23 commits intoWordPress:masterfrom
Conversation
Co-authored-by: aider (openai/DeepSeek-R1) <aider@aider.chat>
|
Here's the
|
dmsnell
left a comment
There was a problem hiding this comment.
did you consider a git submodule for the vendoring? it makes me a bit nervous that we have no history or lineage from he Reflector source showing what has changed, and we have no way to easily update it should another 3.x update come about (not that we would expect one).
| public function getType() | ||
| { | ||
| if ( $this->node->type instanceof \PhpParser\Node\NullableType ) { | ||
| return "?{$this->node->type->type}"; |
There was a problem hiding this comment.
this change, for example, seems lost in the vendoring even though it’s a fix on top of the old code. noting here for future reference — I know you are aware of this.
There was a problem hiding this comment.
Yes, I'd be happy to clean up history so that the vendoring is its own commit and changes are separate commits.
Core does not use namespaces so hooks functions typically appear as fully qualified
Not really. I just wanted to get this working without needing to work with a tight feedback loop and not need to work through multiple repositories. We could preserve some history, at least with a trail of the pristine state (referencing the exact version that was used initially) and keep our changes separate. This seems sufficient and simple for the time being. I expect:
|
|
I have the full phpunit suite passing locally and hooks were broken in the generated docs but they do seem to be working now. I believe things are working as expected. There are almost certainly more things to fix or improve, but at least this is capable of generating up-to-date docs. |
|
Not to lose this: I believe that currently, due to changes in this doesn’t seem to be a real problem, though we may try and finesse this after it’s working again to remove that if we prefer. |
|
This is the only issue I've seen and it only seems to affect this hook: This is my local build of
I'm not sure why the source isn't present because the line number seems to be correct. |
Co-authored-by: Jon Surrell <jonsurrell@git.wordpress.org>


Update packages and make necessary changes to process current all syntax currently in https://github.com/WordPress/wordpress-develop
trunk.This includes the 3.x
phpdocumenter/Reflectionpackage in the repository with the necessary fixes to allownikic/php-parserto be upgraded.That work is taken from dmsnell/Reflection@50f8afb
Alternative to #247
This builds on the work started with @dmsnell.