mediamonks/mssql-bundle
Symfony bundle that adds Microsoft SQL Server support to Doctrine DBAL. Provides a custom MSSQL driver built on pdo_sqlsrv or pdo_dblib, plus schema tooling, so your Symfony app can use SQL Server for entities, migrations, and queries.
Architecture fit. This is a Symfony bundle, not a Laravel package — that is the single most important finding. Its integration surface is a Symfony Bundle class plus a DI extension/compiler pass that registers a Doctrine DBAL driver under a custom scheme (e.g. mediamonks_mssql). Laravel's container does not consume Symfony bundle extensions, so nothing about this package installs "for free" into a Laravel app. The reusable asset is narrower: the driver classes that (a) wrap pdo_dblib on *nix and pdo_sqlsrv on Windows, (b) normalize character encoding to UTF-8, and (c) paper over dblib transaction/result-set quirks. That is genuinely useful logic, but it is a code-extraction exercise, not a dependency add.
Integration feasibility. Feasible but conditional. Laravel already ships a first-party sqlsrv connection driver backed by Microsoft's msphpsql extension, which is actively maintained and supported on Linux (ODBC Driver 17/18). This bundle only earns its keep if we are constrained to FreeTDS/dblib — legacy hosts, an existing FreeTDS config, or environments where the MS ODBC driver cannot be installed — or if we specifically need its transaction handling around stored procedures that return result sets. Without one of those drivers, adopting it means taking on fork ownership for no functional gain.
Technical risk: high. Signals are weak across the board — 16 stars, 0 dependents, composite score 0.24, single-agency authorship. Practical concerns:
Driver/Connection contracts. If this bundle pins DBAL 2, it is effectively unusable on modern Laravel (10/11/12) without porting.each()-era code is common in bundles of this vintage.nvarchar truncation) hides, and it will not surface until non-ASCII data is in production.Key questions.
Doctrine\DBAL\Driver, or is it a thin PDO wrapper we can lift cleanly?pdo_sqlsrv + ODBC 18?Stack fit. Recommend treating this as reference implementation, not a dependency. Target: Laravel's sqlsrv driver via msphpsql. Fallback (only if dblib is mandated): vendor the driver classes into app/Database/ and register a custom connection via DB::extend('mssql_dblib', ...) in a service provider — 100–200 lines of glue, fully under our control.
Migration path.
pdo_dblib, one with ODBC 18 + pdo_sqlsrv. Run identical tests: UTF-8 round-trip (CJK, emoji, RTL), nvarchar boundary lengths, transactions around stored procs, OFFSET/FETCH pagination. Decide the driver on evidence, not on this package's existence.dblib schema grammar. You would inherit SqlServerGrammar, which targets the sqlsrv PDO. Verify insertGetId, lastInsertId, LIMIT/OFFSET, schema introspection, and boolean/date binding. These are the predictable breakages.dev-master. Prefer a hard fork with our own tests over an upstream pin.Compatibility. MIT license removes legal friction. Composer-side, audit transitive deps and framework constraints against our Laravel/PHP matrix. Operationally, the real compatibility boundary is the PHP extension in the production image, not the package version — pdo_dblib requires FreeTDS compiled and configured (freetds.conf, charset directive), which is an image-build concern that fails late if skipped.
Sequencing. (1) Driver decision from the spike → (2) if dblib, fork/vendor the driver classes and strip the Symfony bundle scaffolding → (3) integration test suite against a real SQL Server container in CI → (4) migrate one low-risk read-heavy service → (5) expand. Do not parallelize the driver decision with schema work; the answer changes the grammar.
Maintenance. Assume full ownership. Budget the fork explicitly: one engineer, ~10–15% of a quarter for the initial port, then a recurring line item for DBAL/PHP upgrade churn. Every DBAL major release re-opens this work. If the team cannot name an owner, do not adopt.
Support. No vendor, no SLA, no downstream community. Upstream response is best-effort from a digital agency whose incentive to maintain a 16-star bundle is limited. Treat any upstream issue as permanent.
Scaling. The driver layer is thin and not the bottleneck — throughput will be governed by SQL Server, network latency to the DB, and connection setup cost. Note two ceilings specific to this path: dblib does not expose modern SQL Server features (Always Encrypted, Azure AD/Entra auth, strict TLS controls) that ODBC 18 does, and PHP's lack of a connection pool means per-request connection setup dominates under high fan-out. Persistent connections should be avoided unless we can prove no transaction or temp-table state leaks across requests.
Failure modes, ranked by severity.
nvarchar. Fails quietly, discovered in reports or downstream systems. Mitigate with a non-ASCII round-trip test in CI, permanently.finally block.pdo_dblib absent, FreeTDS charset unset). Fails loudly at boot — cheap, but a deploy-blocker.Ramp-up. Conceptual ramp is low (it is a driver wrapper). Operational ramp is moderate: the team must learn FreeTDS/ODBC configuration, T-SQL dialect specifics, and Laravel's SQL Server grammar gaps — none of which are documented by this package. Plan for the first engineer to spend a week on the spike and produce a written internal runbook; that runbook, not the package, is the durable artifact.
How can I help you explore Laravel packages today?