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.
What it is: A single-purpose PHP library that parses DSN strings (e.g. mysql://user:pass@host:3306/db?charset=utf8) into structured components. Published as micro-module/dsn, implying it belongs to a micro-module/* package family with its own manifest/runtime conventions rather than vanilla PSR-4 + service provider conventions.
Architecture fit
DATABASE_URL, REDIS_URL, AMQP_URL, SENTRY_DSN, etc.).config/database.php and config/queue.php accept url keys and resolve DB_URL/REDIS_URL via parse_url internally. Adopting a package here is additive, not enabling.micro-module/ namespace is the real architectural question. If it drags in a non-standard package manifest, autoload shim, or a micro-module/core runtime, you are adopting an entire micro-framework's conventions to parse a string. That is a disproportionate architectural commitment for a ~1 class problem.Integration feasibility
composer require micro-module/dsn works if the micro-module bootstrap is on Packagist. This must be verified before anything else — a 0/0 package frequently has an unresolvable or yanked dependency chain.php: ^7.2|^7.4 constraint. That will block installation on PHP 8.1+ stacks or require --ignore-platform-reqs, which is a non-starter for production.Dsn::parse($string) in a config file or a custom config resolver. Integration effort is genuinely hours, not days — the cost is diligence, not engineering.Technical risk
temafey), no release in 5+ years, no issue triage, no security process. Bus factor of one, with no evidence of anyone else running this code.p@ssw0rd%21), IPv6 literals ([::1]:3306), multi-host DSNs, empty userinfo, scheme-less strings, and query-string coercion (?sslmode=require&connect_timeout=10). parse_url alone mishandles several of these; you need to know which ones this package handles. With no test suite visible and no dependents, assume untested.null, or return partial results? In a config-loading path, a thrown exception at bootstrap takes the whole app down; a silent partial parse produces a confusing runtime failure fifteen minutes later. This is your single biggest operational hazard.Key questions to answer before adoption
micro-module/dsn actually installable from Packagist on PHP 8.2/8.3, and what does the micro-module dependency graph pull in?parse_url?micro-module bootstrap to be registered?Stack fit
config/*.php runs on every request and an unhandled throw there is a hard outage.ConnectionUrlParser service bound in a service provider — not a dependency sprinkled through the codebase.url config support, league/uri, or a ~40-line internal parser. All three are lower-risk than a 0/0 package.Recommended migration path (adopt-if-verified, otherwise replace)
composer require the package, run it against a fixture corpus: plain DSN, encoded password, IPv6 host, multi-host, no-port, no-query, malformed, empty string. Record behavior for each.DsnParser with the same interface and copy the fixtures over as its test suite. Do not fork — there is not enough code to justify inheriting maintenance.parse(string): Dsn contract in your app. No call sites touch the third-party class directly.composer.json (1.0.0, not ^1.0), plus a composer.lock commit. For a dormant package, floating constraints buy you nothing and cost you surprise.Compatibility
ext-* requirements before merge. If the constraint excludes your runtime, stop — do not paper over it with --ignore-platform-reqs.micro-module package can silently work in dev and break under composer dump-autoload -o in CI.Sequencing
Maintenance
micro-module umbrella dependency is the maintenance liability, not the parser. If it pulls in a runtime you don't otherwise use, you now own that too.Support
Scaling
config:cache) in production, so parsing happens once per deploy, not per request. Ensure it works under config:cache, where closures and some dynamic behavior are forbidden.Failure modes to instrument
port, sslmode, timeout) → driver-level type errors.composer install on the constraint. You will discover this mid-upgrade, under time pressure, when swapping implementations is riskiest.Ramp-up
TPM recommendation Given 0 stars, 0 dependents, no release since 2020, and a native Laravel alternative that already covers the common cases, do not adopt as a runtime dependency. Run the half-day spike against a fixture corpus; if it proves clean and installs on your PHP version, consider vendoring the ~150 lines into your own namespace rather than depending on it. If it fails any fixture, write the internal parser — the fixture corpus you build for the evaluation becomes its test suite, and the decision costs you one day either way. The only scenario where taking the dependency is defensible is a short-lived proof of concept, pinned and clearly marked for replacement before production.
How can I help you explore Laravel packages today?