2017 © Pedro Peláez
 

symfony-bundle mssql-bundle

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

image

mediamonks/mssql-bundle

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

  • Tuesday, July 25, 2017
  • by mediamonks
  • Repository
  • 7 Watchers
  • 15 Stars
  • 5,698 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 13 % Grown

The README.md

Total Downloads Latest Stable Version Latest Unstable Version SensioLabs Insight License, (*1)

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., (*2)

  • 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., (*3)

A Big Thanks

  • Realestate.co.nz for their awesome MssqlBundle which was the base for this bundle
  • Leaseweb for their PdoDblib package 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 & Elmar from the .NET team for their help on working with Microsoft SQL Server

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

Please refer to the files in the /Resources/doc folder., (*4)

The Versions

25/07 2017

dev-master

9999999-dev https://www.mediamonks.com/

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

  Sources   Download

MIT

The Requires

  • php ^5.4|~7.0

 

by Arjen Warendorff
by Michal Kristin

bundle symfony mssql dblib pdo_dblib utf-8 sqlserver unicode sqlsrv utf8 freetds pdo_sqlsrv