xref: /webtrees/composer.json (revision 5254a68afb63ebac346daaa82fe6970d5b34961b)
1{
2    "name": "fisharebest/webtrees",
3    "description": "webtrees online genealogy",
4    "keywords": ["webtrees", "genealogy"],
5    "license": "GPL-3.0-or-later",
6    "autoload": {
7        "psr-4": {
8            "Fisharebest\\Webtrees\\": "app/"
9        },
10        "files": [
11            "app/Helpers/functions.php"
12        ]
13    },
14    "autoload-dev": {
15        "classmap": [
16            "tests/TestCase.php"
17        ]
18    },
19    "config": {
20        "platform": {
21            "php" : "7.0.8"
22        },
23        "sort-packages": true,
24        "process-timeout": 3600
25    },
26    "require": {
27        "ext-gd": "*",
28        "ext-iconv": "*",
29        "ext-json": "*",
30        "ext-pcre": "*",
31        "ext-pdo": "*",
32        "ext-pdo_mysql": "*",
33        "ext-session": "*",
34        "ext-simplexml": "*",
35        "ext-xml": "*",
36        "filp/whoops": "~2.1",
37        "fisharebest/algorithm": "~1.3",
38        "fisharebest/ext-calendar": "~2.3",
39        "fisharebest/localization": "~1.10",
40        "guzzlehttp/guzzle": "~6.0",
41        "league/commonmark": "~0.17",
42        "league/flysystem": "~1.0",
43        "league/flysystem-ziparchive": "~1.0",
44        "league/glide": "~1.2",
45        "ramsey/uuid": "~3.6",
46        "swiftmailer/swiftmailer": "~5.0",
47        "symfony/expression-language": "~3.3",
48        "symfony/http-foundation": "~3.3",
49        "symfony/http-kernel": "~3.3",
50        "symfony/polyfill-mbstring": "~1.4",
51        "symfony/polyfill-php71": "~1.4",
52        "symfony/polyfill-php72": "~1.4",
53        "tecnickcom/tcpdf": "~6.2",
54        "webuni/commonmark-table-extension": "~0.7"
55    },
56    "require-dev": {
57        "maximebf/debugbar": "*",
58        "mockery/mockery": "*",
59        "phpunit/phpunit": "*",
60        "php-coveralls/php-coveralls": "*"
61    },
62    "scripts": {
63       "webtrees-build": [
64           "@composer webtrees-mo",
65           "git checkout language/en-US.mo",
66           "rm -Rf webtrees/",
67           "git archive --prefix=webtrees/ HEAD --format=tar | tar -x",
68           "cp language/*.mo webtrees/language/",
69           "zip --quiet --recurse-paths --move -9 webtrees.zip webtrees"
70       ],
71       "webtrees-check": [
72            "### PHP-CODE-ANALYZER",
73            "phpca --since-version=7.0 app/",
74            "### PHP-CODE-FIXER",
75            "phpcf app/",
76            "### PAHOUT",
77            "pahout --php-version 7.0.8 --ignore-paths=data .",
78            "### PHP-PARALLEL-LINT",
79            "parallel-lint --no-progress --exclude vendor .",
80            "### PHP-CODE-SNIFFER",
81            "phpcs --standard=PSR12 -s --exclude=Generic.Files.LineLength,PSR2.ControlStructures.ControlStructureSpacing,PSR2.ControlStructures.SwitchDeclaration app routes",
82            "### PHAN",
83            "phan --directory . --exclude-directory-list data,resources,routes,tests,vendor",
84            "### PHPSTAN",
85            "phpstan --level=7 analyze app",
86            "### PSALM",
87            "psalm --threads=8"
88        ],
89        "webtrees-tools": [
90            "### PAHOUT",
91            "@composer global require wata727/pahout=*",
92            "### PHAN",
93            "@composer global require phan/phan=*",
94            "### PHP-CODE-ANALYZER",
95            "@composer global require wapmorgan/php-code-analyzer=*",
96            "### PHP-CODE-FIXER",
97            "@composer global require wapmorgan/php-code-fixer=*",
98            "### PHP-PARALLEL-LINT",
99            "@composer global require jakub-onderka/php-parallel-lint=*",
100            "### PSALM",
101            "@composer global require vimeo/psalm=*"
102        ],
103        "webtrees-mo": [
104            "for FILE in language/*.po; do msgfmt --output=$(dirname $FILE)/$(basename $FILE .po).mo $FILE; done",
105            "rm -Rf data/cache/language*"
106        ],
107        "webtrees-po": [
108            "sed -i.bak -e 's/\\(I18N::[^)]*[)]\\)/<?php echo \\1; ?>/g' modules*/*/*.xml",
109            "git grep -I --name-only --fixed-strings -e I18N:: -- '*.php' '*.xml' | xargs xgettext --package-name=webtrees --package-version=1.0 --msgid-bugs-address=i18n@webtrees.net --output=language/webtrees.pot --no-wrap --language=PHP --add-comments=I18N --from-code=utf-8 --keyword --keyword=translate:1 --keyword=translateContext:1c,2 --keyword=plural:1,2",
110            "find modules*/ -name '*.xml' -exec mv {}.bak {} \\;",
111            "find language -name '*.po' -exec msgmerge --no-wrap --sort-output --no-fuzzy-matching --quiet --output={} {} language/webtrees.pot \\;"
112        ]
113    },
114    "scripts-descriptions": {
115        "webtrees-build": "Create a distribution file (webtrees.zip)",
116        "webtrees-check": "Run various static analysis tools",
117        "webtrees-mo": "Compile the language files (*.mo)",
118        "webtrees-po": "Update the language (webtrees.pot, *.po)",
119        "webtrees-tools": "Install the tools needed to run webtrees-check"
120    },
121    "extra": {
122        "branch-alias": {
123            "dev-master": "2.0-dev"
124        }
125    }
126}
127