-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Config value object instead of manually reading the file #47
base: master
Are you sure you want to change the base?
Conversation
I think a config object is a very good idea – it gives a good place for input sanitisation (e.g. I think relative directory paths should always have no leading slash and should have a trailing slash), defaults, and documentation. I think unit/integration tests could be tidied up with a subclass with sensible defaults which could be extended. Your stringly typed approach misses out on a lot of benefits that could be gained with explicit getters and setters. And I'm hoping with the project PHP update and Pslam, you agree. I've built a class with all the composer/extra/mozart options as properties. I'm very much in draft status, but for discussion: I've been playing around with JsonMapper/JsonMapper but now I think cweiske/jsonmapper is worth a look – both for how I've also looked at Composer's own Factory::create() to parse I was also looking at Composer's |
I'd probably want to leave this out of 0.6.0, but haven't decided or full tested yet.