It’s here. It took more time than I have expected. Nextras Orm 3.0 comes with few major features, huge internal refactoring and many small fixes.
Collection Custom Functions & OR
Collection custom functions are a powerful enhancement of repository layer. Now you may do more advanced filtering & sorting of
ICollection. We also added support for disjunction –
OR filtering. As you might have guessed, it is internally also implemented as custom functions.
Custom functions hold the high level abstraction when being applied, though, they internally allow implementing low level behavior specific for the array and SQL storage.
// filter collection by entities with name Jan or age 10 $collection->findBy([ ICollection::OR, ['name' => 'Jan'], ['age' => 10], ]);
Custom functions are quite powerful because the can be nested!
// filter collection by entities where name starts with Jan or age is 10 // note thet LikeFunction is not included in Orm $collection->findBy([ ICollection::OR, [LikeFunction::class, 'name', 'Jan'], ['age' => 10], ]);
We have enhanced also the general model. Now it comes with two important functions:
clear()– flushes all the caches & references to entities;
refreshAll()– refreshes all data directly from the storage;
We have dropped support for
\DateTime – sorry for that. On the other hand, we now support much better
PHP 7.0 scalar types & PHP 7.2
This release also adds scalar types where is it possible. We currently require PHP 7.0, therefore we do not use nullable types.
Also we have fixed support for PHP 7.2.
We do not expect many of you will use Microsoft’s SQL server, though, this is quite nice feature and hopefully someone will be happy about that. Some of edge cases are not fully supported (e.g. there is an internal workaround). Please test it and report bugs 🙂
I’d like to thank all the contributor and users. You support, question and Orm usage drives me in the further development. Namely I want to thank to Jan Tvrdik and David Matejka for the help with the development and valuable feedback and review. Thank to you guys.
We have partnered with GeekyEdu and as a result there is the first Nextras Orm training ever in Prague. 🙂