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