Weave 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

Phpdcd Laravel Package

sebastian/phpdcd

PHP Dead Code Detector (phpdcd) is a command-line tool that scans PHP codebases for unused functions and methods, helping teams find dead code to remove. Part of Sebastian Bergmann's tooling, it is now archived and largely superseded by modern static analysis tools.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

  • Architecture fit: sebastian/phpdcd is a dev-time CLI static-analysis tool, not an application library. It fits Laravel only as an optional Composer dev dependency or CI job; it should not enter runtime, production images, or application architecture.
  • Integration feasibility: Feasible only after a compatibility spike. The package is archived, has no dependents, and is likely constrained to older PHP/PHP-Parser ecosystems. Modern Laravel 10/11/12 applications on PHP 8.x may hit Composer or parser incompatibilities.
  • Technical risk: High for adoption as a maintained dependency. Key risks are archival status, no upstream fixes, NOASSERTION license requiring legal review, legacy parser behavior, and high false-positive potential in Laravel’s dynamic patterns: service container bindings, facades, Eloquent magic, events/listeners, routes, policies, Blade/Livewire references, and convention-based discovery.
  • Ecosystem signal: 410 stars indicate historical relevance, but zero dependents and archived status indicate low current ecosystem validation. The high opportunity score likely reflects unmet demand for dead-code detection, not package readiness.
  • Recommendation: Do not adopt as a strategic dependency without a time-boxed spike. Prefer a maintained static-analysis stack for ongoing use; consider a fork only if dead-code detection is a priority and no maintained alternative covers the need.
  • Key questions: Which PHP and Composer versions are supported? What exact license applies? Does it support PHP 8.x syntax? Can it baseline/suppress findings? How are Laravel magic references handled? What is CI runtime on a large Laravel app? Is a maintained fork or replacement available? Who owns triage and suppressions?

Integration Approach

  • Stack fit: Use as an isolated Composer dev tool or CI-only container, not as a shared application dependency. Run it against app/, src/, or selected paths while excluding vendor/, storage/, generated code, and framework entrypoints.
  • Migration path: Start advisory and non-blocking. Establish a baseline of existing findings, classify false positives, define exclusions, then gate only new or changed code. If compatibility fails, replace with a maintained dead-code/static-analysis approach or fork under an approved license.
  • Compatibility: Validate PHP version, Composer constraints, PHP-Parser transitive dependencies, Laravel version, and CI image before adding to the main composer.json. Prefer an isolated tooling image or separate Composer project to avoid dependency conflicts with the Laravel lockfile.
  • Sequencing: 1) License and compatibility spike; 2) run manually on a branch; 3) triage false positives against Laravel conventions; 4) add non-blocking CI reporting; 5) introduce changed-code gating only after noise is controlled; 6) decide retain, fork, or replace based on ownership cost.
  • Guardrails: Do not block release pipelines initially. Document exclusions for container bindings, facades, Eloquent relationships, event listeners, routes, policies, and other dynamic references. Treat findings as candidates for review, not automatic deletion instructions.

Operational Impact

  • Maintenance: Archived status transfers maintenance burden internally. Pinning a version reduces surprise but does not provide security or PHP compatibility updates. Forking requires ongoing parser and framework-awareness work.
  • Support: No upstream support path. Teams need an internal owner for configuration, false-positive triage, documentation, and upgrade decisions. License ambiguity adds legal/operational review overhead.
  • Scaling: Runtime scales with codebase size and CI frequency. Large Laravel monorepos may need path scoping, changed-file analysis, caching, or scheduled rather than per-PR runs.
  • Failure modes: Composer dependency conflicts, parser failures on modern PHP syntax, false positives on Laravel magic, false negatives from dynamic dispatch, CI noise and developer bypass, abandoned transitive dependencies, and license/compliance surprise.
  • Ramp-up: Low initial command-line ramp-up for PHP developers, but moderate operational ramp-up for reliable use. Teams must learn triage, suppression policy, baseline management, and when dead-code findings are safe to act on.
  • Operational verdict: Low runtime risk if kept dev-only, but medium-to-high process risk due to archival status and Laravel false positives. Adopt only with explicit ownership, legal clearance, isolation, and a replacement/exit plan.
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.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource