Skip to content

Conversation

@joshtrichards
Copy link
Member

Summary

  • Delegates canonical normalization to PathHelper::normalizePath to avoid duplicate implementations
  • Adds parameter and return type hinting
  • Adds some possible optimization via additional early return + dropping of no longer necessary preg* usage
  • Updated docs

Shouldn't introduce a BC. Retains existing checks:

  • Though null byte removal is added as a result of delegating to PathHelper. I don't believe this is a BC, but noting.
  • PathHelper's implementation doesn't normalize out single dot paths /./; I retained that here in Filesystem's implementation, but we may want to add it to the PathHelper implementation for consistency (we could remove it from this implementation here when we do so).

Couple notes:

  • There are various normalizePath() implementations. Some of these unique ones may be valid/necessary, but an audit to make sure we're not either duplicating more logic or assuming checks that aren't actually there in some code paths would probably be a good idea.

TODO

  • ...

Checklist

Signed-off-by: Josh <josh.t.richards@gmail.com>
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.

2 participants