Releases: tattersoftware/codeigniter4-handlers
Search Revamp
In an effort to make searching easier and more intuitive, this PR adjusts Handlers to use methods similar to CodeIgniter\Model
.
- Methods
all()
andnamed($name)
are now deprecated in favor orfindAll()
andfind($name)
respectively. - Search criteria has been revamped to accept operators, e.g.:
$handlers->where(['cost >' => 5])->first()
- Searching now has a "short circuit" option for matching one criterium:
$handlers->orWhere(['extension' => '*'])->findAll()
Add named lookup
Adds the ability to look up a specific handler by name.
Registration
This release reinstates Handler Registration which was removed with the database dependency. Handlers can now implement an option register()
method to be executed when Handlers::register()
is called. While there are no restrictions, the current intent is that register()
will add the attributes to the database.
Code Refactor
This is a complete refactor of the module. The premise is still the same, but instead of loading classes into the database they are detected and queried dynamically in place, a sort of distributed-filesystem database. All implementations will need to be updated - please see the new docs.
Additional changes:
- Adds and implements PHPStan for static code analysis
- Updates tests and test cases to framework scaffolding
- Adds GitHub Actions and Dependabot
Error handling, Bugs
v1.0.1 Add error handling; Verify magic get exists
Initial release
v1.0.0 Bugfix registrations