PHP/ Composer
Library
Learnings
Baseline Composer
This is a boilerplate Composer for a global
install, to provide common function for all projects. This includes testing, sniffing, etc.
1{
2 "require": {
3 "asm89/twig-lint": "@stable",
4 "squizlabs/php_codesniffer": "*",
5 "friendsofphp/php-cs-fixer": "^2.9",
6 "behat/behat": "^3.4",
7 "behat/mink": "^1.7",
8 "behat/mink-goutte-driver": "^1.2",
9 "behat/mink-selenium2-driver": "^1.3",
10 "behat/mink-extension": "^2.3",
11 "consolidation/robo": "~1",
12 "henrikbjorn/lurker": ">=1.3"
13 },
14 "require-dev": {
15 "phpstan/phpstan": "^0.9.1",
16 "leanphp/behat-code-coverage": "^3.4"
17 },
18 "repositories": [
19 {
20 "name": "henrikbjorn/lurker",
21 "type": "vcs",
22 "url": "https://github.com/lesichkovm/lurker"
23 }
24 ]
25}
- Twig-lint as Twig's my go-to template library
- PHP Code Sniffer, PS CS Fixer and PHP Stan for PHP static analysis
- Behat + Mink for BDD
- Robo for automation (just starting with this one)
- Lurker is the 'watcher' for Robo. Since the original
henrikbjorn
repo is abandoned and doesn't work with modern Symfony libraries,lesichkovm
has forked it. But robo requireshenrikbjorn
's version, so therepositories
object reorients it
@todo: Consider require-dev vs. require section. Since this is for a global dev environment, it honestly should all be in Require. Shouldn't it? Or would it be best practice to put all of that in require-dev to be a good copy-paste into any repos that's self-contained?