ThinkORM 2023 Update: New Features, JSON Support, and Bug Fixes for PHP 8.0+
The latest ThinkORM release, now independent from ThinkPHP and requiring PHP 8.0+, introduces extensive JSON handling improvements, new query methods, mutator enhancements, and numerous bug fixes that boost performance and developer experience for PHP database applications.
ThinkORM is a PHP and PDO based database middleware and ORM library that originated as a core component of ThinkPHP and has now been separated as an independent package, requiring PHP 8.0+.
Recent major updates include:
Fixed support for JSON fields in the value and column methods.
Added support for MySQL "not equal" operation expressions.
Improved handling of hidden , visible and append in the query class.
Added automatic writing of fields defined via mutators.
Enhanced the dataset withattr method.
Introduced whereJsonContains and whereOrJsonContains methods for querying JSON array data.
The hidden method now supports hiding a specific attribute of a JSON field.
Added columnWithAttr and valueWithAttr methods.
Fixed an error that occurred when a JSON attribute and type conversion were defined simultaneously.
The value and column query methods now support accessors.
Improved mutator support for JSON fields.
The query class now includes a readonly method to set fields as read‑only.
The fetchsql method now supports the setInc and setDec methods.
Fixed an issue where data could not be updated or deleted after using query scopes.
Corrected string‑quote handling in JSON data queries.
Pre‑loading of relations now supports using the withBind method inside closures to bind parameters dynamically to the parent model.
Fixed null‑query handling for JSON fields.
Found the article helpful? Liking and sharing it is the greatest support!
Laravel Tech Community
Specializing in Laravel development, we continuously publish fresh content and grow alongside the elegant, stable Laravel framework.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.