TDBM 5.0 is released
We are tremendously happy to announce the first stable release of TDBM 5.
What is TDBM?
If you came to this page without a previous knowledge of Mouf, here is what you need to know:
- The global philosophy of TDBM is: your database model is meaningful and TDBM will do it's best to generate PHP objects from your database model. It is therefore taking a completely different direction than what Doctrine ORM does. If you prefer the other approach (starting from PHP code and generating the DB model from it), Mouf also comes with Doctrine bindings.
- TDBM does what it can to avoid the classical traps of the Active record design pattern. TDBM is well suited for simple to moderatly complex applications.
- TDBM is built on top of MagicQuery. It can automatically discard unused parameters in a SQL query. This is very useful to seamlessly write filters.
- TDBM will automatically generate query methods based on the indexes in your database
- As always with TDBM, a lot of energy has been put in simplifying the query process. TDBM will automatically detect joins between tables
- TDBM can automatically detect pivot tables and will generate many-to-many getters and setters accordingly.
So, what's new in this v5?
Framework independant
Until TDBM 4, TDBM was deeply connected to Mouf. This is no longer the case. Of course, Mouf integration is still there. But the core of TDBM is now framework independant is separated in an independant package.
- mouf/database.tdbm (the legacy package) is now the package for the Mouf bindings
- TDBM has been moved to thecodingmachine/tdbm
TDBM also comes with bindings for:
TDBM also comes with a nice documentation if you want to import it in any another framework.
New documentation, new website
The TDBM documentation has been migrated to a brand new website with a tremendous design.
Battle tested
TDBM 5 was not release yet but it has still been used on several projects in production.
Unit and integration tests have been greatly improved from TDBM 4.
Database agnostic
Since TDBM 4, TDBM relies on Doctrine DBAL for the database abstraction layer. However, TDBM 4 was only ever tested on MySQL and would fail to work on any other database.
TDBM 5 on the other hand has been tested and is known to work on a wide range of databases:
- MySQL
- MariaDB
- PostgreSQL
- Oracle
Each of those databases is tested on every commit thanks to Travis.
If you are looking to add support for another database, do not hesitate to open an issue/PR!
Migration friendly
A big number of users are still using TDBM 3. TDBM 3 and TDBM 5 are very different beasts. Because TDBM 5 is in another package with a brand new namespace, you can consider installing TDBM 3 and TDBM 5 side-by-side, in the same project, and migrating slowly your beans and DAOs to the new TDBM.
A PHP 7.1 library
The minimum PHP version has been bumped to PHP 7.1.
This is very important because the generated code uses PHP 7.1 type-hints extensively to ensure maximum safety when you use TDBM. "Strict typing for the win!"
Other features
- Added support for UUID automatic generation
- Support for annotations in column comments
- Generated code is now PSR-2 compliant
- Improved schema analysis
- Countless improvements of SQL parsing (in the underlying magic-query library)
- Added support for true JSON columns, thanks to DBAL 2.6
What's next?
In the coming months, we plan to add even more integrations, starting with an integration with container-interop/service-provider, the soon-to-be PSR that will allow injecting any service in any container.
Tags :
- david's blog
- Log in to post comments
What’s new on Mouf :
- TDBM 5.0 is released 09/11/2017
- Quickstarting a Mouf appl... 15/06/2017
- Building beautiful datagr... 05/10/2016
- Official release of TDBM... 14/06/2016
- Announcing Mouf 2.1 first... 01/03/2016
- Mouf + Magento + PSR-7 =... 30/06/2015
- Standardizing the way we... 10/06/2015
- Container interoperabilit... 09/06/2015
- Container-interop + PSR7... 01/06/2015
- New in Mouf: a console! 19/05/2015