xref: /webtrees/composer.json (revision 557edc6474b92c23923f1472519b2caf1e5c5d91)
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.10",
46        "fig/http-message-util": "^1.1",
47        "fisharebest/algorithm": "~1.3",
48        "fisharebest/ext-calendar": "~2.5",
49        "fisharebest/flysystem-chroot-adapter": "~1.0",
50        "fisharebest/localization": "~1.15",
51        "guzzlehttp/guzzle": "~6.0",
52        "illuminate/cache": "~5.8",
53        "illuminate/container": "~5.8",
54        "illuminate/database": "~5.8",
55        "illuminate/support": "~5.8",
56        "league/commonmark": "~1.0",
57        "league/commonmark-ext-table": "*",
58        "league/flysystem": "~1.0",
59        "league/flysystem-cached-adapter": "~1.0",
60        "league/flysystem-ziparchive": "~1.0",
61        "league/glide": "~1.3",
62        "middlewares/client-ip": "~1.3",
63        "nesbot/carbon": "~2.14",
64        "nyholm/psr7": "~1.1",
65        "nyholm/psr7-server": "~0.3",
66        "oscarotero/middleland": "~1.0",
67        "psr/http-message": "~1.0",
68        "psr/http-server-handler": "~1.0",
69        "psr/http-server-middleware": "~1.0",
70        "ramsey/uuid": "~3.8",
71        "swiftmailer/swiftmailer": "~6.1",
72        "symfony/expression-language": "~4.4",
73        "symfony/polyfill-mbstring": "~1.11",
74        "symfony/polyfill-php72": "~1.11",
75        "tecnickcom/tcpdf": "~6.2"
76    },
77    "require-dev": {
78        "ext-pdo_sqlite": "*",
79        "ext-sqlite3": "*",
80        "composer/composer": "~1.8",
81        "league/flysystem-memory": "~1.0",
82        "maximebf/debugbar": "~1.15",
83        "php-coveralls/php-coveralls": "~2.1",
84        "phpunit/phpunit": "~7.0|~8.0"
85    },
86    "suggest": {
87        "ext-pdo_mysql": "Required to use MySQL for database storage",
88        "ext-pdo_sqlite": "Required to use SQLite for database storage",
89        "ext-pdo_pgsql": "Required to use PostgreSQL for database storage",
90        "ext-pdo_sqlsvr": "Required to use SQL Server for database storage"
91    },
92    "scripts": {
93        "webtrees:build": [
94            "rm -Rf webtrees/",
95            "git archive --prefix=webtrees/ HEAD --format=tar | tar -x",
96            "@composer webtrees:lang",
97            "for FILE in resources/lang/*/messages.php; do cp $FILE webtrees/$FILE; done",
98            "zip --quiet --recurse-paths --move -9 webtrees.zip webtrees"
99        ],
100        "webtrees:pre-commit-hook": [
101            "@composer webtrees:phpcs",
102            "@composer webtrees:phpstan -- --level=0",
103            "@composer webtrees:phan -- --minimum-severity=6",
104            "@composer webtrees:test"
105        ],
106        "webtrees:check": [
107            "### PHP-CODE-SNIFFER",
108            "@composer webtrees:phpcs",
109            "### PHPSTAN",
110            "@composer webtrees:phpstan -- --level=1",
111            "### PHAN",
112            "@composer webtrees:phan -- --minimum-severity=5",
113            "### PSALM",
114            "@composer webtrees:psalm"
115        ],
116        "webtrees:phpcs": [
117            "@composer global require squizlabs/php_codesniffer=* --quiet",
118            "phpcs --standard=PSR12 -p -s --exclude=Generic.Files.LineLength index.php app modules_v4 tests"
119        ],
120        "webtrees:phan": [
121            "@composer global require phan/phan=*",
122            "@composer install --quiet",
123            "phan --color --progress-bar --dead-code-detection --signature-compatibility --strict-type-checking --directory=app --directory=modules_v4 --directory=vendor --exclude-directory-list=vendor",
124            "@composer install --no-dev --quiet"
125        ],
126        "webtrees:phpstan": [
127            "@composer global require --quiet phpstan/phpstan=*",
128            "@composer global require --quiet phpstan/extension-installer=*",
129            "@composer global require --quiet phpstan/phpstan-deprecation-rules=*",
130            "@composer global require --quiet phpstan/phpstan-strict-rules=*",
131            "@composer global require --quiet phpstan/phpstan-phpunit=*",
132            "@composer install --quiet",
133            "phpstan analyze app modules_v4 index.php",
134            "@composer install --no-dev --quiet"
135        ],
136        "webtrees:psalm": [
137            "@composer global require --quiet vimeo/psalm",
138            "@composer install --quiet",
139            "psalm",
140            "@composer install --no-dev --quiet"
141        ],
142        "webtrees:test": [
143            "@composer install --quiet",
144            "@php vendor/bin/phpunit",
145            "@composer install --no-dev --quiet"
146        ],
147        "webtrees:coverage": [
148            "@composer install --dev --quiet",
149            "vendor/bin/phpunit --coverage-html=tests/coverage",
150            "@composer install --no-dev --quiet"
151        ],
152        "webtrees:lang": [
153            "Fisharebest\\Webtrees\\Console\\ComposerScripts::languageFiles"
154        ],
155        "webtrees:po": [
156            "sed -i.bak -e 's/\\(I18N::[^)]*[)]\\)/<?php echo \\1; ?>/g' resources/xml/reports/*.xml",
157            "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",
158            "find resources/xml/reports/ -name '*.xml' -exec mv {}.bak {} \\;",
159            "find resources/lang -name '*.po' -exec msgmerge --no-wrap --sort-output --no-fuzzy-matching --quiet --output={} {} resources/lang/webtrees.pot \\;"
160        ],
161        "webtrees:png": [
162            "find resources/css -name *.png -exec pngquant --ext .png --force --skip-if-larger --speed 1 {} \\;",
163            "find resources/css -name *.png -exec pngcrush -rem allb -brute -reduce {} {} \\;",
164            "find resources/css -name *.png -exec optipng -o7 -zm1-9 {} \\;"
165        ]
166    },
167    "scripts-descriptions": {
168        "webtrees:build": "Create a distribution file (webtrees.zip)",
169        "webtrees:check": "Run various static analysis tools",
170        "webtrees:coverage": "Generate test coverage report",
171        "webtrees:lang": "Compile the language files (messages.php)",
172        "webtrees:po": "Update the language (webtrees.pot, *.po)"
173    },
174    "extra": {
175        "branch-alias": {
176            "dev-master": "2.0-dev"
177        }
178    }
179}
180