-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for configuration file #22
Comments
* Keyword `not` completed in #5 * Capture additional todos and requirements in #20, #21. * Captured comment in #21. * Note todo for test case allOf, issue #19. * Make TODOs for #15, #22, #23 in the code. * Tag #15 re: anyOf. * Issue #18: Initial boilerplate for file printer. * Update PanDeAgua boilerplate. * Promote all MediaNoche code except typematcher function. * Set Setup as a shared fixture in SRC :/ Sadly, can't seem to be able to leave this fixture under tests. PHPUnit does not see the namespaced class import, probably due to PHPUnit autoloading. * OMG: Wrong namespace ! I have been using \Test instead of \Tests all this time? composer.json autload is the source of thruth here. * Move all schemas from fixture to schema dir. * Demote Setup from src to tests where it belongs. * Make test namespace singular in composer autoload. * Make test directory consistent with namespace. * Git ignore only current schema path, but not sub paths. * Changed tests directory to singular test. * Update test path for PHPStan. * Initial print file implementation. * Disable namespace resolution and specify output directory. * Promote file printer to class. * Initial pan de agua comments. * Assert output file contains source class. * Swap out default printer for PSR printer. * Let the user decide both on nullable and readonly attributes. * Only set default value if present in source schema. * Address illegal characters for PHP symbols. * Cleanup some namespaces. * Update test paths on media noche. * Change test target to public file. * Update test path on Github Actions. * Create tmp output dir on github pipeline. * Create tmp output dir on github pipeline.
Thought about TOML, just for fun. But...
Fun consideration, but pass. |
I've gone ahead with PHP Longer-term, a typed settings object is safer to pass around methods, and more efficient for writing tests, since typed objects have less edge cases than schema-less, free form arrays (PHP ini files). I'll chalk this up in the not letting the perfect (typed settings using YAML) get in the way of the perfectly mediocre (free form arrays) column, somewhere near the iterative, progressive feature implementation column. |
Merged in #30. |
* PHPCS allow embedded enums in class files. * Initial enumeration schema and test boilerplate. * Initial handling for Enum properties. - Initial enum type reference looks good. - All tests green. - Coverage still 99%. - Now need to dump the actual enum type somewhere. * Do not test for enums on the basic test cases. * Add null value and type to enum test case. * Register new enum method. * Sidecar enum instances for eventual processing. * Cleanup: issues #22 and #23 delivered in initial release. * Dump non-property values into sidecar without breaking any test. * Cleanup anyOf dead code/comment. * Accept EnumType for printing in `printFile()`. * Update the first media noche test `cebeToNetteObject` * Finally allow EnumTypes in `sourceSchema` without breaking tests. All tests green, baby. Let's go! * Update nullable test. * Reset sidecar on instantiation.
Allow the type generation to be fine-tuned with default configuration placed in a file. It could be Nette Neon, it could be YAML. Who knows?
PHPStan uses neon, but some people might question that choice. The obvious alternative is Symfony YAML.
I haven't decided yet.
The text was updated successfully, but these errors were encountered: