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

Improve NamespaceRegistry #645

Merged
merged 4 commits into from
Feb 8, 2022

Conversation

theofidry
Copy link
Member

  • Make the NamespaceRegistry code more readable
  • Leverage str_contains over strpos to make the code clearer
  • Add more tests to ensure we also test against sub-namespaces
  • Add more tests to ensure we also test against dirty-symbols (i.e. with a leading backslash)
  • Improve performances if global namespace is registered (it will skip all names + regexes checks)

A minor changes occurs in the spec were previously the class namespace was not detected as excluded hence could end up cleaned up. This is a very narrow edge case where the string literal is already prefixed: the only case affected is probably the specs themselves.

@theofidry theofidry enabled auto-merge (squash) February 8, 2022 10:21
@theofidry theofidry merged commit 402dc3d into humbug:master Feb 8, 2022
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