A minimal skeleton for chubbyphp-framework
A simple skeleton to build api's based on the chubbyphp-framework.
- php: ^7.4
- chubbyphp/chubbyphp-api-http: ^4.1.1
- chubbyphp/chubbyphp-clean-directories: ^1.1.1
- chubbyphp/chubbyphp-cors: ^1.3
- chubbyphp/chubbyphp-deserialization: ^3.1.1
- chubbyphp/chubbyphp-framework: ^3.5
- chubbyphp/chubbyphp-framework-router-fastroute: ^1.2
- chubbyphp/chubbyphp-laminas-config: ^1.2.1
- chubbyphp/chubbyphp-laminas-config-doctrine: ^1.2.3
- chubbyphp/chubbyphp-laminas-config-factory: ^1.1.1
- chubbyphp/chubbyphp-negotiation: ^1.8.1
- chubbyphp/chubbyphp-serialization: ^3.1.1
- chubbyphp/chubbyphp-validation: ^3.12.1
- doctrine/orm: ^2.9.1
- monolog/monolog: ^2.2
- ramsey/uuid: ^4.1.1
- slim/psr7: ^1.4
- swagger-api/swagger-ui: ^3.48
- symfony/console: ^5.2.8
Add the following environment variable to your system, for example within
export USER_ID=$(id -u) export GROUP_ID=$(id -g)
docker-compose up -d docker-compose exec php bash
composer create-project chubbyphp/petstore myproject "dev-chubbyphp"
Collections are sortable, filterable paginated lists of models.
Factories to create collections, model or whatever you need to be created.
Mappings are used for deserialization, orm, serialization and validation defintions. They are all done in PHP.
Models, entities, documents what ever fits your purpose the best.
Repositories get data from storages like databases, elasticsearch, redis or whereever your models are stored or cached.
RequestHandler alias Controller, or Controller actions to be more precise. There is a directory with generic crud controllers. If you like the idea adapt them for your generic use case, if not drop them. I highly recommend to not extend them.
Service factories are the glue code of the dependeny injection container.
Dominik Zogg 2021