Fw Framework v1.0.3
This release fixes a critical bug that prevented array responses from working correctly in API controllers. The framework now properly handles array responses by converting them to JSON with appropriate headers.
Bug Fixes
Core Framework
- Fixed array response handling: The framework now correctly handles array responses from controllers by converting them to JSON responses with proper headers. Previously, calling
setHeader()on the Response object would fail because the method doesn't exist.
Changed Methods
RequestFiber.php:233: Changed$this->app->response->setHeader('Content-Type', 'application/json')to$this->app->response->header('Content-Type', 'application/json')Component.php:315: Changed$this->app->response->setHeader('Content-Type', 'application/json')to$this->app->response->header('Content-Type', 'application/json')Component.php:326: Changed$this->app->response->setHeader('Location', $url)to$this->app->response->header('Location', $url')
Impact
- Controllers returning arrays will now work correctly
- JSON responses will have proper Content-Type headers
- Redirect functionality in components will work properly
- No breaking changes - maintains backward compatibility