phlak/splat
Splat is a lightweight PHP library for matching strings against wildcard patterns. It provides simple, expressive helpers for route-style matching, capturing wildcard segments, and filtering paths or values, making it useful for routing, file matching, and other pattern-based tasks.
PathMatcher or FilePatternMatcher, keeping the package out of domain logic and making it replaceable. Likely use cases include upload rules, storage path filters, log/asset scanning, cache invalidation patterns, import/export path selection, and developer-defined include/exclude lists.glob/fnmatch, cross-platform path separator behavior, dotfile handling, ** recursion semantics, brace expansion behavior, and performance or regex-backtracking risk if user-supplied patterns are accepted.**, braces, character classes, escaping, dotfiles, and Windows separators consistently?fnmatch and glob?matches(string $pattern, string $path): bool and optionally filter(array $patterns, array $paths): array. Implement that adapter with phlak/splat; keep a fallback implementation using native fnmatch or glob where semantics permit. This allows replacement without touching call sites.How can I help you explore Laravel packages today?