Releases: limoncello-php/framework
Rolling beta
0.10.0 Update PHP.
0.9.3: Improve database compatibility.
0.9.2
0.9.1
0.9.x
Some compatible improvements to the project. The main focus and the source for breaking changes were changing validation for inputs (forms and JSON API queries and data).
Limoncello\Flute\Contracts\Validation\FormRuleSetInterface
renamed toLimoncello\Flute\Contracts\Validation\FormRulesInterface
Limoncello\Flute\Contracts\Validation\JsonApiRuleSetInterface
renamed toLimoncello\Flute\Contracts\Validation\JsonApiDataRulesInterface
- Controller class constants
ON_CREATE_VALIDATION_RULES_SET_CLASS
andON_UPDATE_VALIDATION_RULES_SET_CLASS
were renamed toON_CREATE_DATA_VALIDATION_RULES_CLASS
andON_UPDATE_DATA_VALIDATION_RULES_CLASS
. - Instead of
Limoncello\Flute\Contracts\Validation\QueryRuleSetInterface
interfaceLimoncello\Flute\Contracts\Validation\JsonApiQueryRulesInterface
should be used. The new interface provides new methods for efficient validation for JSON API query parameters (filters, field sets, sorts, includes and paging). A simple start could be extend/inheritLimoncello\Flute\Validation\JsonApi\DefaultQueryValidationRules
which forbids filters, field sets, sorts and includes but allows pagination. - Two new controller class constants were added
ON_INDEX_QUERY_VALIDATION_RULES_CLASS
andON_READ_QUERY_VALIDATION_RULES_CLASS
each of them should point to a class that implementsJsonApiQueryRulesInterface
. The rules would be used for query validation onindex
andread
actions.
Controller methods configureOnXXXParser
which were used for configuring validation of JSON API queries are deprecated. All the functionality (and more) could be done in rules that implement JsonApiQueryRulesInterface
.
Controller method readRelationshipWithClosure
was replaced with defaultReadRelationshipWithClosure
. If you only need data from API taken via API method readRelationship($index, $modelRelationhsipName)
use controller method readRelationship
. If you need some custom behaviour then defaultReadRelationshipWithClosure
(controller's readRelationship
will be an example how to work with it).
Class \Limoncello\Flute\Http\BaseController
was refactored and now look super simple and easy. All helper methods were moved to \Limoncello\Flute\Http\Traits\DefaultControllerMethodsTrait
. If you are not happy with the default controller handlers or you do not want to inherit from BaseController
you can very easily add your own handlers combined with methods from DefaultControllerMethodsTrait
.
Route helpers \Limoncello\Flute\Http\Traits\FluteRoutesTrait::resource
and \Limoncello\Flute\Http\Traits\FluteRoutesTrait::controller
were renamed to \Limoncello\Flute\Http\Traits\FluteRoutesTrait::apiController
and \Limoncello\Flute\Http\Traits\FluteRoutesTrait::webController
.
Interface \Limoncello\Flute\Contracts\Http\ControllerInterface
was split into \Limoncello\Flute\Contracts\Http\JsonApiControllerInterface
and \Limoncello\Flute\Contracts\Http\WebControllerInterface
as they have similar but slightely different methods.
0.8.10: Fix for newer query parser
- Fix for the latest incompatible JSON-API query parser.
- Small improvements and fixes.