Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

value of 'wp-parser-namespace_children' option incorrect after parsing source with hierarchical nmespaces #213

Open
pbiron opened this issue Mar 15, 2019 · 0 comments

Comments

@pbiron
Copy link

pbiron commented Mar 15, 2019

When parsing code that contains hierarchical namespaces, e.g.,

namespace My\Hierarchical\Namespace;

class MyClass {
...
}

terms are created for each step in the hierarchy (My, Hierarchical and Namespace in the example above), but since cache invalidation is suspended during a parse, the wp-parser-namespace_children option is never updated.

This results in, among other things, only the top-level namespace term showing in the WP_Terms_List_Table in the backend

hierarchical-namespace-terms

WP_Parser\Importer::import() correctly deletes wp-parser-package_children and wp-parser-since_children at the end of the parse (which will result in them being rebuilt at the appropriate time), but it seems that wp-parser-namespace_children was forgotten.

PR coming shortly.

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

No branches or pull requests

1 participant