Releases: bertugfahriozer/ci4commonModel
Release list
Release v1.2.5
This release (v1.2.5) encompasses all the major architectural improvements, the new CodeIgniter 4 Events integration, PSR-4 compliance, and new query functionalities introduced since v1.2.2.
✨ Features & Enhancements
WHERE INClause Support (v1.2.5): Enhanced theCommonModel::listsmethod to supportWHERE INqueries, providing more flexibility for multi-value filtering.- CodeIgniter 4 Events Integration (v1.2.4): Integrated
CodeIgniter\Events\Events::trigger()for database operations. You can now use event listeners for thecreate,edit, andremovecommands triggered via the model. - Array Result Support (v1.2.3): Added the capability to return database query results as an
arrayinstead of anobject.
🛠️ Refactoring & Architectural Changes
- PSR-4 Structure Compliance (v1.2.4): Completely refactored the package structure. The
CommonModel.phpfile has been moved to thesrc/directory, and the namespace has been updated toci4commonmodel. isResetHandling Improvement (v1.2.3): ImprovedCommonModelto better handlenulloptions for the 'isReset' property and fixed potential edge cases.
📚 Documentation & Build
- Documentation Overhaul (v1.2.4): Upgraded phpDocumentor to v3.9.1 and rebuilt the documentation using the "clean" template. Converted PHPDoc
@exampleblocks to Markdown code blocks for better HTML rendering. - Linter & Readme Fixes (v1.2.4): Fixed linter warnings and updated outdated namespace references within the
readme.md. - Export-Ignore Rules (v1.2.3): Added a
.gitattributesfile to exclude unnecessary development files and directories (export-ignore) from production distribution archives.
use statements (e.g., use ci4commonmodel\CommonModel;) wherever you instantiate the class in your project!
Full Changelog: 1.2.2...1.2.5
v1.2.2 – Multi-Database Support & Stability Improvements
This release introduces support for multiple database connections and includes important improvements for greater flexibility and better stability in CodeIgniter 4 projects using ci4commonmodel.
🚀 New Features:
- ✅ Multi-Database Group Support:
You can now initialize CommonModel with a custom database connection group (e.g., 'secondDB') to support dynamic multi-database architecture.
- 🔧 Constructor Enhancement:
CommonModel’s constructor now accepts a $group parameter, allowing developers to switch between defined database groups in the .env or Config\Database.php.
🛠 Improvements:
- Better handling of dynamic connections using Database::connect().
- Cleaned up internal handling of $dbGroup for improved clarity and performance.
📚 Upgrade Notes:
If you use multiple database connections, be sure to define custom database groups in app/Config/Database.php as .env alone is not sufficient.
🔧 Version 1.2.1 – Advanced Database Management Features & Maintenance Update
What's Changed in v1.2.1 (since v1.2.0)
This release introduces powerful new database management capabilities, streamlining development workflows and providing more flexible control over database structure within your CI4 applications.
🚀 New Features
- Added support for creating and dropping tables directly from the model
- Introduced functions to add and remove columns from existing tables
- Added support for renaming tables and updating specific fields
- New utility method to truncate all data from a table
- Support for listing, creating, and deleting databases and tables
- Ability to list table columns for schema inspection
- Functions to drop primary and foreign keys
🔧 Improvements
- Removed legacy
WhereWithJoinsmethod for simplification - Improved internal comments and added clear usage examples for all new functions
- Enhanced overall maintainability and readability of the model
Feel free to test the new features and report issues or suggestions in the Issues section. Thanks for your continued support!
📦 CommonModel Update — Database Management Enhancements
This release introduces major enhancements to the CommonModel class, focused on improving database schema and table management. The update is ideal for developers looking to perform advanced database operations programmatically.
🆕 What's New
-
New Schema Functions:
- Create, drop, and rename tables
- Add or remove columns
- Update column definitions
- Drop primary and foreign keys
-
Data Management:
- Truncate all data from a specific table
-
Database Utilities:
- List, create, and delete tables and databases
- Retrieve column metadata for tables
-
Codebase Improvements:
- Deprecated the
WhereWithJoinsmethod - Enhanced inline documentation and added usage examples for easier integration
- Deprecated the
✅ Recommended Use
These additions are ideal for dynamic applications requiring runtime schema adjustments, database migrations, or modular database control in admin tools or CMS systems.
1.1.9
The documentation has been added and the README file has been updated.
1.1.8
1.1.7
1.1.0
added many insert, lists function added ordering variable and bugs fi…