0.5.0-beta3
Pre-release
Pre-release
Database and ORM package improvements and fixes, new Darya\Foundation
package for application setup, separate package readmes and HTTP response improvements.
Changelog:
General
- Added readmes for all packages, apart from Foundation
- Simplified the framework readme
- PSR-2 code style for all packages
- PSR-4 namespacing for all unit tests
Database
- Implemented a database-specific query object that provides table joins,
subqueries,GROUP BY
andHAVING
, which database query translators now
support - Fixed MySQL connection query issues that occurred without the
mysqlnd
extension - Added missing error check after preparing MySQL query statement result -
Catches syntax or logical errors with queries, e.g. 'Subquery returns more
than 1 row' for column subqueries
Foundation
- Implemented a new
Foundation
namespace to house classes that aid the set up
of an application, including a configuration interface with implementations
and a handful of default service providers - Moved the autoloader to this namespace
HTTP
- Improved HTTP response
- Changed response to prepare content as a string when sent instead of when
the content is set - Changed content type to
application/json
instead oftext/json
for array
content - Implemented
Response::body()
for retrieving content as a string - Removed old cookie methods
- Refactored and added more dynamic properties such as
status
,headers
,
cookies
,content
andredirected
- Unit tested
- Changed response to prepare content as a string when sent instead of when
ORM
- Lots of general improvements and refactoring for
Model
andRecord
- Implemented querying parameters (filter, order, limit) to relations and eager
loading inRecord
Model::data()
now returns transformed (non-raw attributes)- Raw attribute access has moved to
Model::rawData()
- The
toArray()
,toJson()
andgetIterator()
methods now utilise the
transformed attributes
- Raw attribute access has moved to
- Implemented
Model::convertToJson()
- allows converting plain array of models
to JSON - Added unique() method to
Query
objects andQuery\Builder
executor methods