Releases: danteay/corephp-slim-scafold
Releases · danteay/corephp-slim-scafold
1.3.0.0
Fixed
- IOMiddleware log type
Removed
- Eloquent support by default, BaseModel class and dependencies. It was separate on corephp/slim-eloquent
- Swiftmailer support by default, Libraries\Email\Client class and dependencies. It was separate on corephp/mailer
- Remove views support by default, twig and its dependencies
- Remove JsonSchema validator by deafult and its dependencies
- Cors middleware and its dependencies
- JWT support and middleware by default
- Base name space and classes
Feature
- BaseController was renamed to Controller inside Controllers namespace
- Json response on errorHandler and notFoundHandler instead of view rendering
- Add Mysql supprt to Docker configurations
- Add dev docker file
- Upgrade to PHP 7.3 on docker files
1.2.0.1
Features
- Add logging in the global errorHandler dependency.
- Add logging on ExceptionHelper::proccessException function
- Add pagination that not dependes of the Ilumminate/pagination package:
This fuction is a scope function of Eloquent ORM, and is attached to the BaseModel class of the project. You can use this funtion instead of the
$items = MyModel::pagination($limit, $page, false)
get
function to return the elements of the query.
This function has 3 parameters:- $limit: this is the number of elements by page that can return the pagination
- $page: this is the page number that you want, if you provide an invalid number the pagination automatically retrieves the page 1 if you insert a page lower than 1, and if you provide a number higher than the total of pages, the pagination will retrieve the last page.
- $links: this is a boolean flag that manage if the pagination has to contain the links of the pages to render in frontend (you can check how it works at
librarires/Pagination/Utils::links
function). If you set the value to true, the resultant payload will contain an item calledlinks
that contain an array with the name of the pages to display.{ "data": [ ... ] //resultant objects "pages": { "limit": 100 // elements by page "pages": 1 // total of pages "total": 70 // total of elements in all the pages "page": 1 // current page "links": [ 1, "...", 2 ... ] } }
1.2.0.0
Features
- Add Swift Mailer library to implement email messages
- Add Json Schema middleware to validate requests
- Add JWT middleware to authenticate requests
- Add BaseModel to the Base namespace to manage global Models configurations on Eloquent
- Add Helpers namespace
- Add ExceptionsHelper Trait to standardize exception management
- Auto load dependencies for dependency container injection
- Auto load Route files
- Add schemas folder
- Add buildspect.yml and imagedefinitions.json files for AWS deploy with pipelines and Elastic Container Service
Changes
- Comments and code standardized to PSR4 and PSR11
- Rename dependency file twig to renderer
- Rename dependency file error-404 to notFoundHandler
- Rename dependency file error-500 to errorHandler
- Function parseDatabaseURL from database dependency removed and change to inherit code
- Change composer scripts for build, start, and run development container
Fix
- Install composer dependencies inside Dockerfile container