xref: /webtrees/composer.json (revision 4d99955e5797e1e12688b8d0592d207a63b2c6c6)
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.15",
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": "~1.0",
55        "league/commonmark-ext-table": "*",
56        "league/flysystem": "~1.0",
57        "league/flysystem-cached-adapter": "~1.0",
58        "league/flysystem-ziparchive": "~1.0",
59        "league/glide": "~1.3",
60        "nesbot/carbon": "~2.14",
61        "nyholm/psr7": "~1.1",
62        "nyholm/psr7-server": "~0.3",
63        "oscarotero/middleland": "~1.0",
64        "psr/http-message": "~1.0",
65        "psr/http-server-handler": "~1.0",
66        "psr/http-server-middleware": "~1.0",
67        "ramsey/uuid": "~3.8",
68        "swiftmailer/swiftmailer": "~6.1",
69        "symfony/expression-language": "~4.2",
70        "symfony/http-foundation": "~4.2",
71        "symfony/http-kernel": "~4.2",
72        "symfony/polyfill-mbstring": "~1.11",
73        "symfony/polyfill-php72": "~1.11",
74        "tecnickcom/tcpdf": "~6.2"
75    },
76    "require-dev": {
77        "ext-pdo_sqlite": "*",
78        "ext-sqlite3": "*",
79        "composer/composer": "~1.8",
80        "league/flysystem-memory": "~1.0",
81        "maximebf/debugbar": "~1.15",
82        "php-coveralls/php-coveralls": "~2.1",
83        "phpunit/phpunit": "~7.0|~8.0"
84    },
85    "suggest": {
86        "ext-pdo_mysql": "Required to use MySQL for database storage",
87        "ext-pdo_sqlite": "Required to use SQLite for database storage",
88        "ext-pdo_pgsql": "Required to use PostgreSQL for database storage",
89        "ext-pdo_sqlsvr": "Required to use SQL Server for database storage"
90    },
91    "scripts": {
92        "webtrees:build": [
93            "rm -Rf webtrees/",
94            "git archive --prefix=webtrees/ HEAD --format=tar | tar -x",
95            "@composer webtrees:lang",
96            "for FILE in resources/lang/*/messages.php; do cp $FILE webtrees/$FILE; done",
97            "zip --quiet --recurse-paths --move -9 webtrees.zip webtrees"
98        ],
99        "webtrees:check": [
100            "### PHP-CODE-SNIFFER",
101            "@composer global require squizlabs/php_codesniffer=* --quiet",
102            "@composer global update squizlabs/php_codesniffer --quiet",
103            "phpcs --standard=PSR12 -p -s --exclude=Generic.Files.LineLength,PSR2.ControlStructures.ControlStructureSpacing index.php app modules_v4 routes tests/app tests/feature",
104            "### PHAN",
105            "@composer global require phan/phan=*",
106            "@composer global update phan/phan",
107            "@composer install --quiet",
108            "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 index.php",
109            "@composer install --no-dev --quiet",
110            "### PHPSTAN",
111            "@composer global require phpstan/phpstan=*",
112            "@composer global update phpstan/phpstan",
113            "phpstan --level=7 analyze index.php app",
114            "### PSALM",
115            "psalm"
116        ],
117        "webtrees:coverage": [
118            "composer install --dev --quiet",
119            "vendor/bin/phpunit --coverage-html=tests/coverage",
120            "composer install --no-dev --quiet"
121        ],
122        "webtrees:lang": [
123            "Fisharebest\\Webtrees\\Console\\ComposerScripts::languageFiles"
124        ],
125        "webtrees:po": [
126            "sed -i.bak -e 's/\\(I18N::[^)]*[)]\\)/<?php echo \\1; ?>/g' resources/xml/reports/*.xml",
127            "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",
128            "find resources/xml/reports/ -name '*.xml' -exec mv {}.bak {} \\;",
129            "find resources/lang -name '*.po' -exec msgmerge --no-wrap --sort-output --no-fuzzy-matching --quiet --output={} {} resources/lang/webtrees.pot \\;"
130        ],
131        "webtrees:png": [
132            "find resources/css -name *.png -exec pngquant --ext .png --force --skip-if-larger --speed 1 {} \\;"
133        ]
134    },
135    "scripts-descriptions": {
136        "webtrees:build": "Create a distribution file (webtrees.zip)",
137        "webtrees:check": "Run various static analysis tools",
138        "webtrees:coverage": "Generate test coverage report",
139        "webtrees:lang": "Compile the language files (messages.php)",
140        "webtrees:po": "Update the language (webtrees.pot, *.po)"
141    },
142    "extra": {
143        "branch-alias": {
144            "dev-master": "2.0-dev"
145        }
146    }
147}
148