Skip to content

v2.4.4

@houaiai houaiai tagged this 06 Mar 05:50
- Use think-orm's built-in init() hook method instead of initialize()
- Cleaner and more aligned with think-orm design patterns
- No need to override initialize() and call parent::initialize()

```php
// Before (v2.4.3)
protected function initialize(): void
{
    parent::initialize();
    $this->setOption(...);
}

// After (v2.4.4)
protected function init(): void
{
    $this->setOption(...);
}
```

- ✅ Simpler code structure
- ✅ Follows think-orm conventions
- ✅ Less boilerplate code
- ✅ Better maintainability

- ✅ think-orm 2.0.53+
- ✅ think-orm 3.x
- ✅ think-orm 4.0+

This is a minor refactoring release.
Fully backward compatible with v2.4.3.
No breaking changes.
Assets 2
Loading