Restore ability to generate documentation JSON blob.#250
Open
dmsnell wants to merge 10 commits intoWordPress:masterfrom
Open
Restore ability to generate documentation JSON blob.#250dmsnell wants to merge 10 commits intoWordPress:masterfrom
dmsnell wants to merge 10 commits intoWordPress:masterfrom
Conversation
c108fbb to
0cd9903
Compare
adbc85c to
b2c0c68
Compare
Member
Author
|
Rebuilt series of commits after previous head of adbc85c |
While a previous commit “Add[ed] support for PHP Namespaces,” the support seems mixed, or non-comprehensive. Certain names were receiving a global namespace prefix, while others weren’t. This commit undoes the tests asserting the particular names that were receiving that global namespace because the global namespace prefix has been removed in its entirety. Newer versions of `nikic/PHPParser` provide robust support for namespaces and produce fully-qualified names for objects, so this support is not particularly needed going forward either. See 42e4de3
b2c0c68 to
34de87c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch makes a few updates to unblock generating the documentation for WordPress, notably updating the underlying dependency
nikic/php-parserfrom^1.0to^3.0. Some updating is required here while some is required on the intermediate dependency onphpDocumentor/Reflection.dmsnell/Reflectorwhich updates the PHP parser.\PHPParser_Nodeto\PHPParser\Node.PHPParser: notably how names are represented and anonymous objects.Because
nikic/php-parsermade 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/Reflectiondependency involve:\Stringablefor runs with PHP versions lacking that interface.Overall there isn’t much work, and this will parse
trunkwith 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