Join GitHub today
How to handle default values? #8
Composer has some values for properties that are not present in the composer.json. Some examples:
/config/vendor-dir -> vendor
The question is, what should the API return, in case they are not set written in the composer.json file, e.g.:
It returns the value that is set in the composer.json (or through API). However when the value isn't set: can return null to indicate that or the default value.
If null the developer can decide what to do and
Another idea is a parameter that should return the default value, even if not set:
which will return the default value, if value isn't set?