update works

This commit is contained in:
2022-05-18 14:54:25 +02:00
parent 7e493bde43
commit 5313a72f61
5 changed files with 24 additions and 17 deletions

View File

@ -1,11 +1,13 @@
[`Symfony 6.0`](https://symfony.com/) implementation on `PHP 8.1` with usage of [API Platform](https://api-platform.com/), a very powerful API crud generator that supports PHP 8 attributes. This project tries to be the most "API Platform" way to do it, with usage of [Data providers](https://api-platform.com/docs/core/data-providers/), [Data persiters](https://api-platform.com/docs/core/data-persisters/), [DTOs](https://api-platform.com/docs/core/dto/), simple action controllers with only one `__invoke` known as `ADR` pattern.
[`Symfony 6.0`](https://symfony.com/) implementation on `PHP 8.1` that supports PHP 8 attributes. I excluded the usage of [API Platform](https://api-platform.com/) here, which is a very powerful API crud generator but really not well suited for real customized API in my taste.
It was for me the less pleasant experience of all project, as I spent most of the time to fight against the tool instead of really develop the app, but it was the main purpose of this project, as I have already known the classical way to do it. `API Platform` is certainly a very powerful and flexible beast, but with some nasty caveats. It was nevertheless very instructive.
Contrary to Laravel, the usage of **DataMapper** pattern ORM involve classic POPO models. The additional usage of plain PHP DTO classes facilitates the OpenAPI spec models generation without writing all schemas by hand. On the downside the Nelmio package is far more verbose than the Laravel OpenAPI version.
Main packages involved :
* [API Platform](https://api-platform.com/) as main API framework superset for symfony
* [Doctrine](https://www.doctrine-project.org/) as `DataMapper` ORM
* [Doctrine](https://www.doctrine-project.org/) as **DataMapper** ORM
* [SensioFrameworkExtraBundle](https://github.com/sensiolabs/SensioFrameworkExtraBundle) for ParamConverter helper with Doctrine
* [FOSRestBundle](https://github.com/FriendsOfSymfony/FOSRestBundle) only for some helpers as DTO automatic converters and validation
* [NelmioApiDocBundle](https://github.com/nelmio/NelmioApiDocBundle) as **OpenAPI** generator
* [Symfony JWT Bundle](https://github.com/lexik/LexikJWTAuthenticationBundle) implementation
* [Alice](https://github.com/nelmio/alice) as fixtures generator that relies on [PHP Faker](https://fakerphp.github.io/)
* [PHP CS Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) as formatter