xref: /webtrees/composer.json (revision fa6955069ce0f4a34d51f0784b616c2f3a707391)
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            "modules_v4/",
20            "tests/TestCase.php",
21            "tests/MockGlobalFunctions.php"
22        ]
23    },
24    "config": {
25        "platform": {
26            "php": "7.1.8"
27        },
28        "sort-packages": true,
29        "process-timeout": 3600
30    },
31    "require": {
32        "ext-curl": "*",
33        "ext-gd": "*",
34        "ext-iconv": "*",
35        "ext-intl": "*",
36        "ext-json": "*",
37        "ext-pcre": "*",
38        "ext-pdo": "*",
39        "ext-session": "*",
40        "ext-simplexml": "*",
41        "ext-xml": "*",
42        "ext-zip": "*",
43        "aura/router": "~3.1",
44        "doctrine/dbal": "~2.9",
45        "ezyang/htmlpurifier": "~4.12",
46        "fig/http-message-util": "^1.1",
47        "fisharebest/algorithm": "~1.5",
48        "fisharebest/ext-calendar": "~2.5",
49        "fisharebest/flysystem-chroot-adapter": "~1.0",
50        "fisharebest/localization": "~1.15",
51        "guzzlehttp/guzzle": "~6.5",
52        "illuminate/container": "~5.8",
53        "illuminate/database": "~5.8",
54        "illuminate/support": "~5.8",
55        "io-developer/php-whois": "~3.5",
56        "league/commonmark": "~1.4",
57        "league/flysystem": "~1.0",
58        "league/flysystem-cached-adapter": "~1.0",
59        "league/flysystem-ziparchive": "~1.0",
60        "league/glide": "~1.5",
61        "middlewares/client-ip": "~1.3",
62        "mlocati/ip-lib": "~1.9",
63        "nesbot/carbon": "~2.34",
64        "nyholm/psr7": "~1.2",
65        "nyholm/psr7-server": "~0.4",
66        "oscarotero/middleland": "~1.0",
67        "psr/cache": "~1.0",
68        "psr/http-message": "~1.0",
69        "psr/http-server-handler": "~1.0",
70        "psr/http-server-middleware": "~1.0",
71        "ramsey/uuid": "~3.9",
72        "swiftmailer/swiftmailer": "~6.2",
73        "symfony/cache": "~4.4",
74        "symfony/expression-language": "~4.4",
75        "symfony/polyfill-mbstring": "~1.17",
76        "tecnickcom/tcpdf": "^6.3.5"
77    },
78    "require-dev": {
79        "ext-pdo_sqlite": "*",
80        "ext-sqlite3": "*",
81        "composer/composer": "~1.10",
82        "league/flysystem-memory": "~1.0",
83        "maximebf/debugbar": "~1.16",
84        "php-coveralls/php-coveralls": "~2.2",
85        "phpunit/phpunit": "~7.5|~8.0"
86    },
87    "suggest": {
88        "ext-pdo_mysql": "Required to use MySQL for database storage",
89        "ext-pdo_sqlite": "Required to use SQLite for database storage",
90        "ext-pdo_pgsql": "Required to use PostgreSQL for database storage",
91        "ext-pdo_sqlsvr": "Required to use SQL Server for database storage"
92    },
93    "scripts": {
94        "webtrees:build": [
95            "rm -Rf webtrees/",
96            "git archive --prefix=webtrees/ HEAD --format=tar | tar -x",
97            "@composer webtrees:lang",
98            "for FILE in resources/lang/*/messages.php; do cp $FILE webtrees/$FILE; done",
99            "zip --quiet --recurse-paths --move -9 webtrees.zip webtrees"
100        ],
101        "webtrees:pre-commit-hook": [
102            "@composer webtrees:phpcs",
103            "@composer webtrees:phpstan",
104            "@composer webtrees:test"
105        ],
106        "webtrees:check": [
107            "### PHP-CODE-SNIFFER",
108            "@composer webtrees:phpcs",
109            "### PHPSTAN",
110            "@composer webtrees:phpstan",
111            "### PSALM",
112            "@composer webtrees:psalm"
113        ],
114        "webtrees:phpcs": [
115            "@composer global require squizlabs/php_codesniffer=* --quiet",
116            "~/.composer/vendor/bin/phpcs --standard=PSR12 --colors --extensions=php --exclude=Generic.Files.LineLength index.php app modules_v4 tests",
117            "~/.composer/vendor/bin/phpcs --colors --extensions=css resources/css"
118        ],
119        "webtrees:phpstan": [
120            "@composer global require --quiet phpstan/phpstan=*",
121            "@composer global require --quiet phpstan/extension-installer=*",
122            "@composer global require --quiet phpstan/phpstan-deprecation-rules=*",
123            "@composer global require --quiet phpstan/phpstan-strict-rules=*",
124            "@composer global require --quiet phpstan/phpstan-phpunit=*",
125            "@composer install --quiet",
126            "~/.composer/vendor/bin/phpstan analyze --level=max app modules_v4 index.php",
127            "@composer install --no-dev --quiet"
128        ],
129        "webtrees:psalm": [
130            "@composer global require --quiet vimeo/psalm",
131            "@composer install --quiet",
132            "~/.composer/vendor/bin/psalm",
133            "@composer install --no-dev --quiet"
134        ],
135        "webtrees:test": [
136            "@composer install --quiet",
137            "@php vendor/bin/phpunit",
138            "@composer install --no-dev --quiet"
139        ],
140        "webtrees:coverage": [
141            "@composer install --dev --quiet",
142            "vendor/bin/phpunit --coverage-html=tests/coverage",
143            "@composer install --no-dev --quiet"
144        ],
145        "webtrees:lang": [
146            "Fisharebest\\Webtrees\\Console\\ComposerScripts::languageFiles"
147        ],
148        "webtrees:po": [
149            "sed -i.bak -e 's/\\(I18N::[^)]*[)]\\)/<?php echo \\1; ?>/g' resources/xml/reports/*.xml",
150            "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",
151            "find resources/xml/reports/ -name '*.xml' -exec mv {}.bak {} \\;",
152            "find resources/lang -name '*.po' -exec msgmerge --no-wrap --sort-output --no-fuzzy-matching --quiet --output={} {} resources/lang/webtrees.pot \\;"
153        ],
154        "webtrees:png": [
155            "find resources/css -name *.png -exec pngquant --ext .png --force --skip-if-larger --speed 1 {} \\;",
156            "find resources/css -name *.png -exec pngcrush -rem allb -brute -reduce {} {} \\;",
157            "find resources/css -name *.png -exec optipng -o7 -zm1-9 {} \\;"
158        ]
159    },
160    "scripts-descriptions": {
161        "webtrees:build": "Create a distribution file (webtrees.zip)",
162        "webtrees:check": "Run various static analysis tools",
163        "webtrees:coverage": "Generate test coverage report",
164        "webtrees:lang": "Compile the language files (messages.php)",
165        "webtrees:po": "Update the language (webtrees.pot, *.po)"
166    }
167}
168