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