Releases: Daveawb/Repos
Added pagination options
Removed dependency on DI container for criteria
Criteria are now instantiated with the arguments that you provide, dependency injection of any unresolved classes need to be resolved prior to being passed as arguments to the criteria.
Bug fix release
Moved composer dependencies into correct locations
Support for Laravel 5.4 makeWith
makeWith
will be used by default to buildCriteria
class'. A fallback allows for the use ofmake($class, array $args)
for older versions of Laravel.
Breaking changes to update
Update now fetches a model, updates it using the models fill method, persists and returns.
PDO Exception handling during updates
When a pdo error is not encountered but 0 rows have been updated an EmptyChangeSetException
is thrown.
Flushing models on create is optional
Optional flag to allow flushing models via flag on create.
$repository->create($attributes, Repository::NO_FLUSH);
$repository->create($attributes, Repository::FLUSH);
Type hinting improvements
Bumped version of Laravel to 5.3 to match type hints.
Model updating
Added a new method updateModel
that takes an array of data and an existing model. It returns a boolean indicating whether the update modified the model.
New instance capability
The repository can now create a fresh instance of itself using $repository->newInstance()
- Tests moved to in memory sqlite