Removed AsSingle
result modifier. Consider using AsSingleScalar
.
No BC breaks
Moved Happyr\DoctrineSpecification\Specification
to Happyr\DoctrineSpecification\Specification\Specification
.
Merged getFilterInstance
and getQueryModifierInstance
into getSpec
. The new function should return a Filter
and/or
a QueryBuilder
. We did this to make the API easier.
You can now do Spec::andx(new MyFilter(), new MyQueryModifier);
with both Filter
s and QueryBuilder
s.
It has been many changes since 0.2 and we refactored quite a lot. These are the biggest changes.
The old Specification
interface has been split up to two parts. We got a Filter
with will modify the SELECT
clause of
the SQL query. We also got the QueryModifier
interface the modifies the query (Limit, Order, Join etc).
The new Specification
interface extends Filter
and QueryModifier
.
You have to update your specifications to comply with QueryModifier
and/or Expression
There are two new methods getFilter
and modify
. You don't need to override these. You may use BaseSpecfication as normal.
The supports
function has been removed.
The match
method has changed to take a second optional parameter of a ResultModifier
. You may modify the result by changing
the hydration mode or to add a cache. We decided that it would not be a part of a Specification
.