-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Closed
Description
Description
Hey, PHP guys! 🤝
I'm going to upgrade PhpSlimCodegen to meet community and my personal requirements.
I'm not familiar with spec 3.0, so all text below related to 2.0 version.
- Automated UnitTests generation for every model and every endpoint(checks at least response status code and response data types)
- Mock API server generation (
exampleproperties from responses will be used as mock data). It should covers autogenerated UnitTests automatically, I think.
Few updates that I would do later:
- Move all generated API Route controllers from
index.phpinto separated PHP classes for more modular testing and easy maintain [Slim] Improve codebase decouple #438 - Add generation of Authentication middleware stubs (Basic [Slim] Add Basic authentication middleware #606 and apiKey at least)
PHP Technical Committee
cc @jebentier @dkarlovi @mandrean @jfastnacht @ackintosh
Questions to PHP Committee
I will try to create basic template which any developer can modify by edit mustache markdown, but we need to decide how advanced it should be by default:
- What PHP version should we target? Is it too soon to use type annotation with PHP7 and modern syntax shortcuts? (
[]instead ofarray(),$_GET['user'] ?? 'nobody'instead ofisset($_GET['user']) ? $_GET['user'] : 'nobody') - What PHPUnit version should we target?
- Should we use Faker library for mock data or it's too much?
- I would like to use .ENV config file with phpdotenv library. I've met a problem Partial loading of .env file on production server vlucas/phpdotenv#266 few times, but I don't see any decent alternatives beside builtin
parse_ini_filefunction with external .INI file as a config.
etherealjoy