xref: /webtrees/composer.json (revision 81083bd99d5befe23efe030034abf7249acecce6)
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.1.3"
22        },
23        "sort-packages": true,
24        "process-timeout": 3600
25    },
26    "require": {
27        "ext-curl": "*",
28        "ext-gd": "*",
29        "ext-iconv": "*",
30        "ext-intl": "*",
31        "ext-json": "*",
32        "ext-pcre": "*",
33        "ext-pdo": "*",
34        "ext-pdo_mysql": "*",
35        "ext-session": "*",
36        "ext-simplexml": "*",
37        "ext-xml": "*",
38        "ext-zip": "*",
39        "doctrine/dbal": "~2.9",
40        "filp/whoops": "~2.3",
41        "fisharebest/algorithm": "~1.3",
42        "fisharebest/ext-calendar": "~2.5",
43        "fisharebest/localization": "~1.12",
44        "guzzlehttp/guzzle": "~6.0",
45        "illuminate/container": "^5.7.17",
46        "illuminate/database": "^5.7.17",
47        "illuminate/support": "^5.7.17",
48        "league/commonmark": "~0.18",
49        "league/flysystem": "~1.0",
50        "league/flysystem-ziparchive": "~1.0",
51        "league/glide": "~1.3",
52        "ramsey/uuid": "~3.8",
53        "swiftmailer/swiftmailer": "~6.1",
54        "symfony/expression-language": "~4.2",
55        "symfony/http-foundation": "~4.2",
56        "symfony/http-kernel": "~4.2",
57        "symfony/polyfill-mbstring": "~1.10",
58        "symfony/polyfill-php71": "~1.10",
59        "symfony/polyfill-php72": "~1.10",
60        "tecnickcom/tcpdf": "~6.2",
61        "webuni/commonmark-table-extension": "~0.9"
62    },
63    "require-dev": {
64        "maximebf/debugbar": "*",
65        "mockery/mockery": "*",
66        "phpunit/phpunit": "*",
67        "php-coveralls/php-coveralls": "*"
68    },
69    "scripts": {
70       "webtrees:build": [
71           "@composer webtrees:mo",
72           "git checkout language/en-US.mo",
73           "rm -Rf webtrees/",
74           "git archive --prefix=webtrees/ HEAD --format=tar | tar -x",
75           "cp language/*.mo webtrees/language/",
76           "zip --quiet --recurse-paths --move -9 webtrees.zip webtrees"
77       ],
78       "webtrees:check": [
79            "### PHP-CODE-ANALYZER",
80            "phpca --since-version=7.1 app/",
81            "### PHP-CODE-FIXER",
82            "phpcf app/",
83            "### PAHOUT",
84            "pahout --php-version 7.1.3 --ignore-paths=data .",
85            "### PHP-PARALLEL-LINT",
86            "parallel-lint --no-progress --exclude vendor .",
87            "### PHP-CODE-SNIFFER",
88            "phpcs --standard=PSR12 -s --exclude=Generic.Files.LineLength,PSR2.ControlStructures.ControlStructureSpacing app routes",
89            "### PHAN",
90            "PHAN_DISABLE_XDEBUG_WARN=1 phan --target-php-version=7.1 --progress-bar --directory . --exclude-directory-list data,resources,routes,tests,vendor",
91            "### PHPSTAN",
92            "phpstan --level=7 analyze index.php app",
93            "### PSALM",
94            "psalm"
95        ],
96        "webtrees:tools": [
97            "### PAHOUT",
98            "@composer global require wata727/pahout=*",
99            "### PHAN",
100            "@composer global require phan/phan=*",
101            "### PHP-CODE-ANALYZER",
102            "@composer global require wapmorgan/php-code-analyzer=*",
103            "### PHP-CODE-FIXER",
104            "@composer global require wapmorgan/php-code-fixer=*",
105            "### PHP-PARALLEL-LINT",
106            "@composer global require jakub-onderka/php-parallel-lint=*",
107            "### PSALM",
108            "@composer global require vimeo/psalm=*"
109        ],
110        "webtrees:mo": [
111            "for FILE in language/*.po; do msgfmt --output=$(dirname $FILE)/$(basename $FILE .po).mo $FILE; done",
112            "rm -Rf data/cache/language*"
113        ],
114        "webtrees:po": [
115            "sed -i.bak -e 's/\\(I18N::[^)]*[)]\\)/<?php echo \\1; ?>/g' modules*/*/*.xml",
116            "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",
117            "find modules*/ -name '*.xml' -exec mv {}.bak {} \\;",
118            "find language -name '*.po' -exec msgmerge --no-wrap --sort-output --no-fuzzy-matching --quiet --output={} {} language/webtrees.pot \\;"
119        ]
120    },
121    "scripts-descriptions": {
122        "webtrees:build": "Create a distribution file (webtrees.zip)",
123        "webtrees:check": "Run various static analysis tools",
124        "webtrees:mo": "Compile the language files (*.mo)",
125        "webtrees:po": "Update the language (webtrees.pot, *.po)",
126        "webtrees:tools": "Install the tools needed to run webtrees-check"
127    }
128}
129