Skip to content

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

Description

@pbiron

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions