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