Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Name Collision Detector Laravel Package

shipmonk/name-collision-detector

Fast CLI tool to detect duplicate names in PHP code: classes, interfaces, traits, enums, functions, and constants defined multiple times in the same namespace. Scans thousands of files in seconds, supports config/excludes, exits non-zero on collisions.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Prevents intermittent runtime bugs caused by duplicate class/interface/constant definitions in classmap autoloading scenarios (e.g., test suites failing inconsistently based on autoload order)
  • Enables proactive code quality checks in CI/CD pipelines to catch naming conflicts before they reach production
  • Reduces technical debt in large/legacy codebases where manual namespace audits are impractical
  • Cost-effective "buy" decision versus building custom collision detection tooling (solves a narrow but critical problem with minimal maintenance)
  • Supports monorepo or multi-team environments where inconsistent naming conventions emerge across components

When to Consider This Package

Adopt when:

  • Using classmap autoloading (e.g., for test fixtures or legacy code) where PSR-4 alone can't prevent collisions
  • Working with large codebases (>5k files) where manual review is infeasible
  • Experiencing unexplained "class not found" or "ambiguous class" errors in CI
  • Needing a lightweight, fast static analysis tool that integrates with existing Composer workflows

Look elsewhere when:

  • Strictly using PSR-4 autoloading with well-managed namespaces (collisions are rare)
  • Already using comprehensive static analysis tools like PHPStan with custom rules covering this scenario
  • Operating in small projects where manual naming consistency checks suffice
  • Requiring constant/function collision detection in non-PHP contexts (e.g., JavaScript projects)

How to Pitch It (Stakeholders)

Executives: "This tool prevents costly production incidents caused by ambiguous class definitions – a known source of hard-to-debug failures that can delay deployments or cause outages. At under $0 in licensing cost and requiring minimal engineering time to implement, it eliminates a recurring source of technical debt while protecting revenue-generating systems from unpredictable failures."

Engineering: "Integrates in <5 minutes via Composer, runs in <2 seconds for 10k files, and catches edge-case collisions that only surface during specific test runs. It complements your existing CI pipeline without adding complexity – just add a single command to your build process to prevent 'works on my machine' bugs caused by class name conflicts. No configuration needed out-of-the-box, with optional JSON tuning for complex projects."

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport