xref: /webtrees/composer.json (revision 385c46697af8fae494715017c1b2cd1063e063fd)
1{
2    "name": "fisharebest/webtrees",
3    "description": "webtrees online genealogy",
4    "keywords": [
5        "webtrees",
6        "genealogy"
7    ],
8    "license": "GPL-3.0-or-later",
9    "autoload": {
10        "psr-4": {
11            "Fisharebest\\Webtrees\\": "app/"
12        },
13        "files": [
14            "app/Helpers/functions.php"
15        ]
16    },
17    "autoload-dev": {
18        "classmap": [
19            "tests/TestCase.php",
20            "tests/MockGlobalFunctions.php"
21        ]
22    },
23    "config": {
24        "platform": {
25            "php": "7.1.8"
26        },
27        "sort-packages": true,
28        "process-timeout": 3600
29    },
30    "require": {
31        "ext-curl": "*",
32        "ext-gd": "*",
33        "ext-iconv": "*",
34        "ext-intl": "*",
35        "ext-json": "*",
36        "ext-pcre": "*",
37        "ext-pdo": "*",
38        "ext-session": "*",
39        "ext-simplexml": "*",
40        "ext-xml": "*",
41        "ext-zip": "*",
42        "doctrine/dbal": "~2.9",
43        "ezyang/htmlpurifier": "~4.10",
44        "fig/http-message-util": "^1.1",
45        "fisharebest/algorithm": "~1.3",
46        "fisharebest/ext-calendar": "~2.5",
47        "fisharebest/flysystem-chroot-adapter": "~1.0",
48        "fisharebest/localization": "~1.13",
49        "guzzlehttp/guzzle": "~6.0",
50        "illuminate/cache": "~5.8",
51        "illuminate/container": "~5.8",
52        "illuminate/database": "~5.8",
53        "illuminate/support": "~5.8",
54        "league/commonmark": "~0.18",
55        "league/flysystem": "~1.0",
56        "league/flysystem-cached-adapter": "~1.0",
57        "league/flysystem-ziparchive": "~1.0",
58        "league/glide": "~1.3",
59        "nesbot/carbon": "~2.14",
60        "nyholm/psr7": "~1.1",
61        "nyholm/psr7-server": "~0.3",
62        "oscarotero/middleland": "~1.0",
63        "psr/http-message": "~1.0",
64        "psr/http-server-handler": "~1.0",
65        "psr/http-server-middleware": "~1.0",
66        "ramsey/uuid": "~3.8",
67        "swiftmailer/swiftmailer": "~6.1",
68        "symfony/expression-language": "~4.2",
69        "symfony/http-foundation": "~4.2",
70        "symfony/http-kernel": "~4.2",
71        "symfony/polyfill-mbstring": "~1.11",
72        "symfony/polyfill-php72": "~1.11",
73        "tecnickcom/tcpdf": "~6.2",
74        "webuni/commonmark-table-extension": "~0.9"
75    },
76    "require-dev": {
77        "ext-pdo_sqlite": "*",
78        "ext-sqlite3": "*",
79        "league/flysystem-memory": "~1.0",
80        "maximebf/debugbar": "~1.15",
81        "php-coveralls/php-coveralls": "~2.1",
82        "phpunit/phpunit": "~7.0|~8.0"
83    },
84    "suggest": {
85        "ext-pdo_mysql": "Required to use MySQL for database storage",
86        "ext-pdo_sqlite": "Required to use SQLite for database storage",
87        "ext-pdo_pgsql": "Required to use PostgreSQL for database storage",
88        "ext-pdo_sqlsvr": "Required to use SQL Server for database storage"
89    },
90    "scripts": {
91        "webtrees:build": [
92            "rm -Rf webtrees/",
93            "git archive --prefix=webtrees/ HEAD --format=tar | tar -x",
94            "for FILE in resources/lang/*/messages.po; do msgfmt --output=webtrees/$(dirname $FILE)/$(basename $FILE .po).mo $FILE; done",
95            "zip --quiet --recurse-paths --move -9 webtrees.zip webtrees"
96        ],
97        "webtrees:check": [
98            "### PHP-CODE-SNIFFER",
99            "@composer global require squizlabs/php_codesniffer=* --quiet",
100            "@composer global update squizlabs/php_codesniffer --quiet",
101            "phpcs --standard=PSR12 -p -s --exclude=Generic.Files.LineLength,PSR2.ControlStructures.ControlStructureSpacing app modules_v4 routes tests/app tests/feature",
102            "### PHAN",
103            "@composer global require phan/phan=*",
104            "@composer global update phan/phan",
105            "@composer install --quiet",
106            "PHAN_DISABLE_XDEBUG_WARN=1 phan --color --dead-code-detection --target-php-version=7.1 --progress-bar --signature-compatibility --strict-type-checking --directory app --directory vendor --exclude-directory-list vendor",
107            "@composer install --no-dev --quiet",
108            "### PHPSTAN",
109            "@composer global require phpstan/phpstan=*",
110            "@composer global update phpstan/phpstan",
111            "phpstan --level=7 analyze index.php app",
112            "### PSALM",
113            "psalm"
114        ],
115        "webtrees:coverage": [
116            "composer install --dev --quiet",
117            "vendor/bin/phpunit --coverage-html=tests/coverage",
118            "composer install --no-dev --quiet"
119        ],
120        "webtrees:mo": [
121            "for FILE in resources/lang/*/messages.po; do msgfmt --output=$(dirname $FILE)/$(basename $FILE .po).mo $FILE; done",
122            "rm -Rf data/cache/language*"
123        ],
124        "webtrees:po": [
125            "sed -i.bak -e 's/\\(I18N::[^)]*[)]\\)/<?php echo \\1; ?>/g' resources/xml/reports/*.xml",
126            "git grep -I --name-only --fixed-strings -e I18N:: -- '*.php' '*.phtml' '*.xml' | xargs xgettext --package-name=webtrees --package-version=1.0 --msgid-bugs-address=i18n@webtrees.net --output=resources/lang/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",
127            "find resources/xml/reports/ -name '*.xml' -exec mv {}.bak {} \\;",
128            "find resources/lang -name '*.po' -exec msgmerge --no-wrap --sort-output --no-fuzzy-matching --quiet --output={} {} resources/lang/webtrees.pot \\;"
129        ],
130        "webtrees:png": [
131            "find resources/css -name *.png -exec pngquant --ext .png --force --skip-if-larger --speed 1 {} \\;"
132        ]
133    },
134    "scripts-descriptions": {
135        "webtrees:build": "Create a distribution file (webtrees.zip)",
136        "webtrees:check": "Run various static analysis tools",
137        "webtrees:coverage": "Generate test coverage report",
138        "webtrees:mo": "Compile the language files (*.mo)",
139        "webtrees:po": "Update the language (webtrees.pot, *.po)"
140    },
141    "extra": {
142        "branch-alias": {
143            "dev-master": "2.0-dev"
144        }
145    }
146}
147