codingstyle
codingstyle copied to clipboard
[RFC] Some default composer options?
Just stubbed upon the sort-packages option in composer,
it make the list of required package always sorted alphabetically :sparkles:
What do you think?
Any other option we should add?
- notify-on-install: false
- bin-dir: "bin"
And the prefer-stable flag?
sort-packages: a nice side effect of this option would be that diffs are likely to be cleaner as the probability to add a package at the end of the list is lower. Thus requiring package foo/B when foo/A and foo/C are already installed would produce the following diff:
"require": {
"foo/A": "1.0",
+ "foo/B": "1.0",
"foo/C": "1.0"
},
instead of:
"require": {
"foo/A": "1.0",
- "foo/C": "1.0"
+ "foo/C": "1.0",
+ "foo/B": "1.0",
},
so :+1: for this one;
notify-on-install: the notify feature allows maintainers to have an idea of the popularity of their packages (number of install, etc). So even if numbers are quite wrong (because of ci systems, prod deployments, etc), IMO we should be fair and continue to inform packagist about packages we use. :-1: for me;
bin-dir: IMO, the bin dir should only contain scripts from the application, not the ones from our dependencies so :-1: ;
prefer-stable: :+1: for this one
sort-packages: :+1:
notify-on-install: :-1:
bin-dir: :-1:
prefer-stable: :+0: as it only make sens if you use the minimum-stability option
Other useful thing to add to the default composer:
- A default author (jolicode)
- A script section :
"scripts": {
"test": "",
"test-ci": ""
},
- Remove the TODO description or add fields with TODO
- A default php version we should be supporting at jolicode (require php 5.6 | 7.0)