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

Dsn Laravel Package

micro-module/dsn

micro-module/dsn is a small PHP package for parsing, building, and handling DSN (Data Source Name) connection strings, making database or service connection details easier to manage in Laravel and PHP applications.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Configuration UX: "paste a URL" onboarding. The most valuable product use case is letting a user supply a single DSN string (mysql://user:pass@host:3306/db?sslmode=require) instead of a six-field connection form. This package is the parsing layer behind that pattern for databases, Redis, AMQP/queues, mailers, and object storage.
  • Build vs. buy for a ~100-line parser. The "buy" side is genuinely cheap (MIT, likely zero transitive dependencies), but the maintenance signal is poor: 0 stars, 0 dependents, last release December 2020. Frame this as buy the idea, own the code — vendor it rather than depend on it.
  • Roadmap input for integrations. Any roadmap item involving third-party connections (warehouse connectors, message brokers, S3-compatible storage, SMTP relays) inherits the same requirement: accept a DSN, validate it, and surface a readable error. This package is a useful spec for that requirement even if the code isn't adopted.
  • Ops/CLI tooling. Parsing DATABASE_URL-style environment variables consistently across services and deploy scripts, including redacting credentials in logs and diagnostics.
  • Multi-tenant connection routing. Extracting host/port/database/options from a tenant-supplied DSN to route or validate connections at provisioning time.
  • Not supported: anything requiring RFC 3986 strictness, unusual or custom schemes, or a maintained dependency with security response. Those are separate decisions.

When to Consider This Package

Consider it when:

  • You need DSN parsing now and the scope is narrow — a handful of known schemes you control.
  • You are willing to vendor/fork the code into your own namespace rather than require it via Composer, and to own its tests and bug fixes.
  • Your inputs are internally generated (your own docs, your own UI) rather than arbitrary user-supplied URLs, so edge-case robustness is less critical.
  • You want a compact reference implementation to align a team on parsing behavior before writing an in-house version.

Look elsewhere when:

  • You need a supported dependency with a security response path — 0 stars, 0 dependents, and a 2020-12-18 last release mean there is effectively no maintenance or community. Treat it as sample code.
  • You need full RFC 3986 / URI compliance, IPv6 literals, percent-encoding edge cases, or non-standard schemes — use league/uri or PHP's native parse_url plus your own validation.
  • You need Laravel-native integration (config repository binding, validation rules, service provider wiring) — this is a micro-package, not a Laravel integration.
  • Your DSNs carry secrets and you need audited handling, redaction guarantees, and tests proving it.
  • The parsing logic is a small enough part of your feature that writing and owning ~50–100 lines is cheaper than the review and provenance work of adopting an unmaintained package.

How to Pitch It (Stakeholders)

To executives: This is a small, MIT-licensed utility for turning a single connection string into structured configuration. It is not a strategic dependency and carries no license cost, but it is also unmaintained — no stars, no downstream users, no release since 2020. Recommendation: use it as a design reference for a "paste your connection URL" onboarding flow, and have engineering own a vendored copy or a short in-house equivalent rather than depend on it. Cost is a few hours of engineering; risk is near zero because the alternative is writing the same logic ourselves.

To engineering: MIT-licensed, tiny surface area, no meaningful ecosystem to inherit. Treat it as a starting point: fork it into our namespace, add tests for the schemes we actually support, add credential redaction for logging, and pin our own release. If we need rigorous URI handling or unusual schemes, we should evaluate league/uri instead and not spend time extending this. Either way, the product requirement — accept a DSN, validate it, fail with a human-readable message — stands on its own and should go on the roadmap independent of this package's fate.

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.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings