← Home ← Codex ← DEBT
Browse by Category
+ added · updated 7d
← Back to glossary

Dependency Management Philosophy

General PHP 5.3+ Intermediate
debt(d5/e5/b7/t5)
d5 Detectability Operational debt — how invisible misuse is to your safety net

Closest to 'specialist tool catches' (d5). The term's detection_hints.tools lists composer-audit, dependabot, snyk, and roave-security-advisories — all specialist security/dependency scanning tools that must be explicitly configured in CI. Default linters won't catch missing composer.lock commits or abandoned packages; these require dedicated tooling.

e5 Effort Remediation debt — work required to fix once spotted

Closest to 'touches multiple files / significant refactor' (e5). While quick_fix suggests running composer audit is trivial, the common_mistakes (composer.lock not committed, no licence review, depending on abandoned packages) require touching multiple files and potentially replacing packages across the codebase. Switching from an abandoned package to a maintained alternative often requires code changes throughout the application.

b7 Burden Structural debt — long-term weight of choosing wrong

Closest to 'strong gravitational pull' (b7). The applies_to shows this affects all PHP contexts (web, cli). Dependency choices are load-bearing across the entire system — every component relies on the dependency tree. A bad dependency choice (abandoned package, licence conflict, security-vulnerable library) shapes every future decision and forces workarounds. The misconception explicitly notes dependencies add 'security surface, conflicts, licence risk, and maintenance burden' that compounds over time.

t5 Trap Cognitive debt — how counter-intuitive correct behaviour is

Closest to 'notable trap' (t5). The misconception field states 'More dependencies save time' is the canonical wrong belief — this is a documented gotcha that most developers eventually learn through painful experience with supply chain issues, version conflicts, or abandoned packages. It's not catastrophic (experienced developers know to audit dependencies), but it contradicts the naive assumption that adding packages is purely beneficial.

About DEBT scoring →

Also Known As

dependency management composer lock left-pad

TL;DR

Every dependency is a liability — prefer few well-maintained packages; pin versions via composer.lock; audit regularly.

Explanation

Principles: prefer stdlib, prefer widely-used over niche, check licence (GPL contamination risk), pin versions (composer.lock), audit regularly (composer audit). Left-pad problem (npm 2016): a widely-used 11-line package was unpublished, breaking thousands of projects. Each dependency adds: security attack surface, version conflicts, licence risk, maintenance burden.

Common Misconception

More dependencies save time — each adds security surface, conflicts, licence risk, and maintenance burden.

Why It Matters

Dependency management is not just about installing packages — it is about controlling what code runs in your application. A compromised or malicious package in your dependency tree can exfiltrate data, install backdoors, or corrupt your build. Pinning exact versions in composer.lock and running composer audit regularly catches known vulnerabilities before they reach production. The supply chain attack surface through third-party packages is now the most common vector for large-scale compromises.

Common Mistakes

  • composer.lock not committed
  • composer update in production
  • No licence review
  • Depending on abandoned packages

Avoid When

  • Adding a package for a feature you could implement in 10 lines — every dependency is a supply chain risk.
  • Ignoring outdated dependencies — stale packages accumulate security vulnerabilities.
  • Committing vendor directories to version control when a lock file is sufficient.
  • Using broad version constraints (^1.0) without testing — minor updates can introduce breaking changes.

When To Use

  • Pin exact versions in production lock files — deterministic builds prevent surprise breakage.
  • Audit new dependencies for maintenance activity, license compatibility, and known vulnerabilities before adding.
  • Automate dependency updates with Dependabot or Renovate — humans do not reliably update dependencies.
  • Separate dev dependencies from production dependencies — only production code ships to users.

Code Examples

✗ Vulnerable
// Non-pinned: different versions on dev/CI/prod
✓ Fixed
// Checklist: <50 lines to DIY? Maintained? MIT licence? Audit in CI
git add composer.lock

Added 16 Mar 2026
Edited 25 Mar 2026
Views 63
Rate this term
No ratings yet
🤖 AI Guestbook educational data only
| |
Last 30 days
0 pings T 2 pings W 1 ping T 0 pings F 0 pings S 0 pings S 0 pings M 1 ping T 0 pings W 0 pings T 3 pings F 2 pings S 4 pings S 2 pings M 1 ping T 1 ping W 0 pings T 1 ping F 0 pings S 0 pings S 0 pings M 0 pings T 0 pings W 0 pings T 0 pings F 0 pings S 2 pings S 1 ping M 0 pings T 0 pings W
No pings yet today
No pings yesterday
Scrapy 11 Amazonbot 9 Google 6 Ahrefs 4 Perplexity 4 ChatGPT 4 SEMrush 4 Bing 3 Claude 2 Majestic 1 Unknown AI 1 Meta AI 1 PetalBot 1
crawler 47 crawler_json 4
DEV INTEL Tools & Severity
🟠 High ⚙ Fix effort: Low
⚡ Quick Fix
Run composer audit weekly and on every CI run — it checks installed packages against the PHP Security Advisories database and takes under a second
📦 Applies To
PHP 5.3+ web cli
🔗 Prerequisites
🔍 Detection Hints
No composer audit in CI; outdated packages with known vulnerabilities; composer.lock not committed; use of abandoned packages
Auto-detectable: ✓ Yes composer-audit dependabot snyk roave-security-advisories
⚠ Related Problems
🤖 AI Agent
Confidence: Medium False Positives: Medium ✗ Manual fix Fix: Medium Context: File
CWE-1104


✓ schema.org compliant