civicrm/gitignore
A Laravel/PHP package for managing .gitignore rules, helping keep generated and environment-specific files out of version control. It provides a simple way to maintain consistent ignore patterns across CiviCRM projects.
.gitignore" — file sync/copy tools, scaffolder output filtering, release packaging, cache-key computation, static analysis that skips ignored paths — becomes a scoped dependency instead of a multi-day glob-semantics research project. The hard parts (negation with !, ** matching, leading-slash anchoring, directory-only trailing-slash rules, later-pattern-wins precedence) are exactly the edge cases teams get wrong on the first pass..gitignore, sparse-checkout, and by extension .dockerignore, .npmignore, .prettierignore, .eslintignore. A single evaluation unlocks several "respect ignore rules" features across the product without a second implementation..dockerignore/.npmignore from a canonical .gitignore; ignore-aware file watchers and incremental scanners; linting a repo's ignore files for dead or contradictory patterns; monorepo sparse-checkout tooling; pre-commit-style guardrails that explain why a path was ignored.NOASSERTION license, the honest answer is "treat as source to audit and vendor," which is a decision worth making deliberately rather than by default.Adopt (as vendored source, not a living dependency) when:
git check-ignore --stdin is impractical (no git binary in the runtime, per-file latency, or you need the parsed pattern list for reporting/UI).Look elsewhere, or don't adopt, when:
NOASSERTION means GitHub could not identify a recognized SPDX license. Nothing ships in a distributed or hosted product until legal reviews the actual LICENSE text in the repo — that review may end the conversation.git check-ignore as the canonical oracle or add your own conformance suite.Executives: A small, single-purpose PHP library that saves us from hand-building ignore-rule matching in our developer tooling — the kind of subtle parsing work that generates quiet bugs. It costs nothing to use, but our exposure is governance, not money: no community, no dependents, and an unclassified license. Recommendation is a short time-boxed spike, then vendor the code with legal sign-off rather than adopt it as a tracked dependency. Low downside, modest and contained upside.
Engineering: It parses the .gitignore pattern grammar and is reusable for sparse-checkout, .dockerignore, and .npmignore. It saves you reimplementing **, negation, anchoring, and precedence — and the bugs that come with them. Treat it as code you are adopting, not a library you are depending on: vendor it, pin it, and build a conformance test suite using git check-ignore as the oracle before it touches anything that ships. Confirm the license first; NOASSERTION is an unresolved question, not a permissive one.
How can I help you explore Laravel packages today?