xref: /webtrees/composer.json (revision 09fbf3e5f9dc85ceb2f640d1e44009ba64ba2b8d)
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    "autoload-dev": {
15        "classmap": [
16            "tests/TestCase.php"
17        ]
18    },
19    "config": {
20        "platform": {
21            "php" : "7.1.8"
22        },
23        "sort-packages": true,
24        "process-timeout": 3600
25    },
26    "require": {
27        "ext-curl": "*",
28        "ext-gd": "*",
29        "ext-iconv": "*",
30        "ext-intl": "*",
31        "ext-json": "*",
32        "ext-pcre": "*",
33        "ext-pdo": "*",
34        "ext-session": "*",
35        "ext-simplexml": "*",
36        "ext-xml": "*",
37        "ext-zip": "*",
38        "doctrine/dbal": "~2.9",
39        "filp/whoops": "~2.3",
40        "fisharebest/algorithm": "~1.3",
41        "fisharebest/ext-calendar": "~2.5",
42        "fisharebest/flysystem-chroot-adapter": "~1.0",
43        "fisharebest/localization": "~1.13",
44        "guzzlehttp/guzzle": "~6.0",
45        "illuminate/cache": "^5.8.0",
46        "illuminate/container": "^5.8.0",
47        "illuminate/database": "^5.8.0",
48        "illuminate/support": "^5.8.0",
49        "league/commonmark": "~0.18",
50        "league/flysystem": "~1.0",
51        "league/flysystem-cached-adapter": "~1.0",
52        "league/flysystem-ziparchive": "~1.0",
53        "league/glide": "~1.3",
54        "nesbot/carbon": "~2.14",
55        "ramsey/uuid": "~3.8",
56        "swiftmailer/swiftmailer": "~6.1",
57        "symfony/expression-language": "~4.2",
58        "symfony/http-foundation": "~4.2",
59        "symfony/http-kernel": "~4.2",
60        "symfony/polyfill-mbstring": "~1.10",
61        "symfony/polyfill-php71": "~1.10",
62        "symfony/polyfill-php72": "~1.10",
63        "tecnickcom/tcpdf": "~6.2",
64        "webuni/commonmark-table-extension": "~0.9"
65    },
66    "require-dev": {
67        "ext-sqlite3": "*",
68        "ext-pdo_sqlite": "*",
69        "league/flysystem-memory": "*",
70        "maximebf/debugbar": "*",
71        "php-coveralls/php-coveralls": "*",
72        "phpunit/phpunit": "*"
73    },
74    "suggest": {
75        "ext-pdo_mysql": "Required to use MySQL for database storage",
76        "ext-pdo_sqlite": "Required to use SQLite for database storage",
77        "ext-pdo_pgsql": "Required to use PostgreSQ: for database storage",
78        "ext-pdo_sqlsvr": "Required to use SQL Server for database storage"
79    },
80    "scripts": {
81       "webtrees:build": [
82           "@composer webtrees:mo",
83           "git checkout language/en-US.mo",
84           "rm -Rf webtrees/",
85           "git archive --prefix=webtrees/ HEAD --format=tar | tar -x",
86           "cp language/*.mo webtrees/language/",
87           "zip --quiet --recurse-paths --move -9 webtrees.zip webtrees"
88       ],
89       "webtrees:check": [
90            "### PHP-CODE-SNIFFER",
91            "phpcs --standard=PSR12 -s --exclude=Generic.Files.LineLength,PSR2.ControlStructures.ControlStructureSpacing app routes",
92            "### PHAN",
93            "PHAN_DISABLE_XDEBUG_WARN=1 phan --target-php-version=7.1 --progress-bar --directory . --exclude-directory-list data,resources,routes,tests,vendor",
94            "### PHPSTAN",
95            "phpstan --level=7 analyze index.php app",
96            "### PSALM",
97            "psalm"
98        ],
99        "webtrees:tools": [
100            "### PHAN",
101            "@composer global require phan/phan=*",
102            "### PSALM",
103            "@composer global require vimeo/psalm=*"
104        ],
105        "webtrees:mo": [
106            "for FILE in resources/lang/*/messages.po; do msgfmt --output=$(dirname $FILE)/$(basename $FILE .po).mo $FILE; done",
107            "rm -Rf data/cache/language*"
108        ],
109        "webtrees:po": [
110            "sed -i.bak -e 's/\\(I18N::[^)]*[)]\\)/<?php echo \\1; ?>/g' resources/xml/reports/*.xml",
111            "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=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",
112            "find resources/xml/reports/ -name '*.xml' -exec mv {}.bak {} \\;",
113            "find resources/lang -name '*.po' -exec msgmerge --no-wrap --sort-output --no-fuzzy-matching --quiet --output={} {} resources/lang/webtrees.pot \\;"
114        ],
115        "webtrees:png": [
116            "find resources/css -name *.png -exec pngquant --ext .png --force --skip-if-larger --speed 1 {} \\;"
117        ]
118    },
119    "scripts-descriptions": {
120        "webtrees:build": "Create a distribution file (webtrees.zip)",
121        "webtrees:check": "Run various static analysis tools",
122        "webtrees:mo": "Compile the language files (*.mo)",
123        "webtrees:po": "Update the language (webtrees.pot, *.po)",
124        "webtrees:tools": "Install the tools needed to run webtrees-check"
125    },
126    "extra": {
127        "branch-alias": {
128            "dev-master": "2.0-dev"
129        }
130    }
131}
132