PHPackages                             mediamonks/mssql-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. mediamonks/mssql-bundle

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

mediamonks/mssql-bundle
=======================

Symfony Bundle for working with Microsoft SQL Server on \*nix (dblib) and Windows (sqlsrv) with UTF-8 and transactions support

1635.1k2[1 issues](https://github.com/mediamonks/symfony-mssql-bundle/issues)1PHP

Since Jul 25Pushed 8y ago8 watchersCompare

[ Source](https://github.com/mediamonks/symfony-mssql-bundle)[ Packagist](https://packagist.org/packages/mediamonks/mssql-bundle)[ RSS](/packages/mediamonks-mssql-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (1)

[![Total Downloads](https://camo.githubusercontent.com/f0b3111439a35cad5a9b3e7a6a9d9ee65b089a9d52224612ec0b54264c4b386b/68747470733a2f2f706f7365722e707567782e6f72672f6d656469616d6f6e6b732f6d7373716c2d62756e646c652f646f776e6c6f616473)](https://packagist.org/packages/mediamonks/mssql-bundle)[![Latest Stable Version](https://camo.githubusercontent.com/3f68ca8f4d5df6b01184e81170dbfca3d53b57d6e8934f6a84281ff8d1d8ac98/68747470733a2f2f706f7365722e707567782e6f72672f6d656469616d6f6e6b732f6d7373716c2d62756e646c652f762f737461626c65)](https://packagist.org/packages/mediamonks/mssql-bundle)[![Latest Unstable Version](https://camo.githubusercontent.com/a7746aa00fb028a2ff8a07bfadfc10a225cffceccb9b9a4eb9186ee11cdb05e0/68747470733a2f2f706f7365722e707567782e6f72672f6d656469616d6f6e6b732f6d7373716c2d62756e646c652f762f756e737461626c65)](https://packagist.org/packages/mediamonks/mssql-bundle)[![SensioLabs Insight](https://camo.githubusercontent.com/7186933577905953bdb016d4a9743864e35ee92125290c70598c3fae3e204883/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f64616539316465612d363037612d346235352d396331302d3539336635393038666335662e737667)](https://insight.sensiolabs.com/projects/dae91dea-607a-4b55-9c10-593f5908fc5f)[![License](https://camo.githubusercontent.com/b41b3a29b17bd3bb7537a13aa6f86da5c3bcaccf9f2f189eaf5951d718f86724/68747470733a2f2f706f7365722e707567782e6f72672f6d656469616d6f6e6b732f6d7373716c2d62756e646c652f6c6963656e7365)](https://packagist.org/packages/mediamonks/mssql)

MediaMonksMssqlBundle
=====================

[](#mediamonksmssqlbundle)

This bundle provides a driver which makes Symfony and Doctrine (DBAL and ORM) support dblib driver on \*nix systems while also being compatible with sqlsrv on Windows.

- Uses pdo\_sqlsrv on Windows and pdo\_dblib on unix
- Supports UTF-8
- Supports transactions
- Supports Doctrine ORM
- Supports Sonata Admin
- Supports Symfony Sessions

There are a few bundles and packages out there which can handle dblib but unfortunately we could not make it work with UTF-8 so we spent a while on cracking this issue. Since others had already done a lot of work on this we felt we had to return the favour to the community and release this bundle.

A Big Thanks
============

[](#a-big-thanks)

- [Realestate.co.nz](http://www.realestate.co.nz/) for their awesome [MssqlBundle](https://github.com/realestateconz/MssqlBundle/) which was the base for this bundle
- [Leaseweb](https://www.leaseweb.com/) for their [PdoDblib package](https://github.com/LeaseWeb/LswDoctrinePdoDblib) which was very useful too
- Michal for his hard work in the past on projects where dblib had to be used, your input for this bundle was very valuable
- Arjen for his dedicated work on the function that prepares the query for supporting UTF-8 ♥
- Tonny &amp; Elmar from the .NET team for their help on working with Microsoft SQL Server

Notes
=====

[](#notes)

- Do not use pdo\_dblib unless you have very good reasons, use a different driver if you get the chance
- You probably need to be change the FreeTDS conf, make sure you can
- Support for ORM requires modifications to some Doctrine files in the vendor folder, a script for Composer which does this automatically is provided in this bundle
- When doing manual queries you should always use executeQuery() and executeUpdate() on Doctrine DBAL
- Named parameters are not supported, UTF-8 characters will be saved as ?
- This bundle was only tested on SQL Server 2008 R2 SP2 and nvarchar fields
- Joined inheritance mapping in ORM is not supported yet since we did not need it, this might be supported in the future
- Symfony session handler does not use locking now, this might be supported in the future
- There are no tests since original tests on Doctrine are also likely to fail, take this bundle as-is but please create a PR if you have found an issue and fixed it
- MediaMonks is not responsible for any data loss, use dblib and this driver at your own risk

Documentation
=============

[](#documentation)

Please refer to the files in the [/Resources/doc](/Resources/doc) folder.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/411c94cbec325fa9a747f4677bb07355b374a0f01008e48c33f809627004fa5d?d=identicon)[mediamonks](/maintainers/mediamonks)

---

Top Contributors

[![slootjes](https://avatars.githubusercontent.com/u/17158090?v=4)](https://github.com/slootjes "slootjes (23 commits)")[![mm-devmonk](https://avatars.githubusercontent.com/u/8170192?v=4)](https://github.com/mm-devmonk "mm-devmonk (2 commits)")[![darkwhispering](https://avatars.githubusercontent.com/u/994566?v=4)](https://github.com/darkwhispering "darkwhispering (1 commits)")[![KrzysiekJ](https://avatars.githubusercontent.com/u/1598188?v=4)](https://github.com/KrzysiekJ "KrzysiekJ (1 commits)")

---

Tags

dblibmssqlphpsonatasonata-adminsqlsrvsymfonysymfony-bundleunixutf8windows

### Embed Badge

![Health badge](/badges/mediamonks-mssql-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/mediamonks-mssql-bundle/health.svg)](https://phpackages.com/packages/mediamonks-mssql-bundle)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.3k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M542](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M209](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
