PHPackages                             plutakhin/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. plutakhin/mssql-bundle

ActiveLibrary[Database &amp; ORM](/categories/database)

plutakhin/mssql-bundle
======================

Driver for work with MsSQL server

030PHP

Since Sep 29Pushed 11y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Install
-------

[](#install)

Add the **isoft/mssql-bundle** into **composer.json**

```
"require": {
    ....
    "isoft/mssql-bundle": "master-dev"
},

```

Usage
-----

[](#usage)

Add to section doctrine - dbal in **config.yml** option **driver\_class**

```
doctrine:
    dbal:
        driver_class:   \Realestate\MssqlBundle\Driver\PDODblib\Driver
        host: %database_host%
        user: %database_user%
        password: %database_password%
        # options:
        #    ansi_nulls: on
        #    ansi_warnings: on

```

The %database\_driver% must not be set, neither the %charset% parameter, as for stackoverflow.com/questions/8492941/doctrine-2-how-to-add-custom-dbal-driver#answer-8731924

The connection options (ansi\_nulls and ansi\_warnings) may be configured for MSSQL to ON|OFF

---

In app/AppKernel.php registerBundles(), add the following line:

```
$bundles = array(
    ...
    new Realestate\MssqlBundle\RealestateMssqlBundle(),
    ...
);

```

---

This driver requires version 8.0 (from ) as default 4.2 version does not have UTF support

An example of freetds.conf (/etc/freetds/freetds.conf) is:

```
[mssql_server]
    host = xxx.xxx.xxx.xxx
    port = 1433
    tds version = 8.0
    client charset = UTF-8
    text size = 20971520

```

---

can't use nvarchar!!

---

In SQL 2000 SP4 or newer, SQL 2005 or SQL 2008, if you do a query that returns NTEXT type data, you may encounter the following exception: \_mssql.MssqlDatabaseError: SQL Server message 4004, severity 16, state 1, line 1: Unicode data in a Unicode-only collation or ntext data cannot be sent to clients using DB-Library (such as ISQL) or ODBC version 3.7 or earlier.

It means that SQL Server is unable to send Unicode data to FTREETDS, because of shortcomings of FTREETDS. You have to CAST or CONVERT the data to equivalent NVARCHAR data type, which does not exhibit this behaviour.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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/1894b1b06ac2ff97f5d48f2949d60d57e6736a19a82069a89ed1b9d866c2a4da?d=identicon)[plutakhin](/maintainers/plutakhin)

---

Top Contributors

[![pasinter](https://avatars.githubusercontent.com/u/188074?v=4)](https://github.com/pasinter "pasinter (14 commits)")[![c0rrupt](https://avatars.githubusercontent.com/u/1436683?v=4)](https://github.com/c0rrupt "c0rrupt (10 commits)")[![warezthebeef](https://avatars.githubusercontent.com/u/521746?v=4)](https://github.com/warezthebeef "warezthebeef (4 commits)")[![thePanz](https://avatars.githubusercontent.com/u/226021?v=4)](https://github.com/thePanz "thePanz (3 commits)")[![woodspire](https://avatars.githubusercontent.com/u/1275609?v=4)](https://github.com/woodspire "woodspire (1 commits)")[![liverbool](https://avatars.githubusercontent.com/u/206804?v=4)](https://github.com/liverbool "liverbool (1 commits)")[![mikemeier](https://avatars.githubusercontent.com/u/776406?v=4)](https://github.com/mikemeier "mikemeier (1 commits)")[![r0ssIV](https://avatars.githubusercontent.com/u/1242369?v=4)](https://github.com/r0ssIV "r0ssIV (1 commits)")

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/plutakhin-mssql-bundle/health.svg)](https://phpackages.com/packages/plutakhin-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.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

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

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/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)
