xref: /webtrees/composer.json (revision c9beb871618c93e73b7fa1822beb196eeebd4dd5)
1ed285daaSGreg Roach{
2a25f0a04SGreg Roach    "name": "fisharebest/webtrees",
3ed285daaSGreg Roach    "description": "webtrees online genealogy",
4ed285daaSGreg Roach    "keywords": ["webtrees", "genealogy"],
531b7ad55SGreg Roach    "license": "GPL-3.0-or-later",
6a25f0a04SGreg Roach    "autoload": {
70e62c4b8SGreg Roach        "psr-4": {
80e62c4b8SGreg Roach            "Fisharebest\\Webtrees\\": "app/"
91f3fb95cSGreg Roach        },
101f3fb95cSGreg Roach        "files": [
111f3fb95cSGreg Roach            "app/Helpers/functions.php"
121f3fb95cSGreg Roach        ]
13a25f0a04SGreg Roach    },
1484e2cf4eSGreg Roach    "autoload-dev": {
1584e2cf4eSGreg Roach        "classmap": [
1684e2cf4eSGreg Roach            "tests/TestCase.php"
1784e2cf4eSGreg Roach        ]
1884e2cf4eSGreg Roach    },
197286a40cSGreg Roach    "config": {
207286a40cSGreg Roach        "platform": {
21e70f282eSGreg Roach            "php" : "7.1.3"
2222acdb08SGreg Roach        },
23425578caSGreg Roach        "sort-packages": true,
24425578caSGreg Roach        "process-timeout": 3600
257286a40cSGreg Roach    },
26ed285daaSGreg Roach    "require": {
275f9f5f94SRico Sonntag        "ext-curl": "*",
287286a40cSGreg Roach        "ext-gd": "*",
297286a40cSGreg Roach        "ext-iconv": "*",
305f9f5f94SRico Sonntag        "ext-intl": "*",
318ae9e54eSRico Sonntag        "ext-json": "*",
327286a40cSGreg Roach        "ext-pcre": "*",
337286a40cSGreg Roach        "ext-pdo": "*",
347286a40cSGreg Roach        "ext-pdo_mysql": "*",
357286a40cSGreg Roach        "ext-session": "*",
367286a40cSGreg Roach        "ext-simplexml": "*",
377286a40cSGreg Roach        "ext-xml": "*",
385f9f5f94SRico Sonntag        "ext-zip": "*",
39362be83aSGreg Roach        "doctrine/dbal": "~2.9",
40e70f282eSGreg Roach        "filp/whoops": "~2.3",
41d592f2ecSGreg Roach        "fisharebest/algorithm": "~1.3",
4293686a36SGreg Roach        "fisharebest/ext-calendar": "~2.5",
4362bb28bdSGreg Roach        "fisharebest/localization": "~1.12",
44cc26b3c3SGreg Roach        "guzzlehttp/guzzle": "~6.0",
45*c9beb871SGreg Roach        "illuminate/database": "^5.7.17",
46*c9beb871SGreg Roach        "illuminate/support": "^5.7.17",
47e70f282eSGreg Roach        "league/commonmark": "~0.18",
48d592f2ecSGreg Roach        "league/flysystem": "~1.0",
49d592f2ecSGreg Roach        "league/flysystem-ziparchive": "~1.0",
50e70f282eSGreg Roach        "league/glide": "~1.3",
51e70f282eSGreg Roach        "ramsey/uuid": "~3.8",
528b04670aSGreg Roach        "swiftmailer/swiftmailer": "~6.1",
53e70f282eSGreg Roach        "symfony/expression-language": "~4.2",
54e70f282eSGreg Roach        "symfony/http-foundation": "~4.2",
55e70f282eSGreg Roach        "symfony/http-kernel": "~4.2",
56e70f282eSGreg Roach        "symfony/polyfill-mbstring": "~1.10",
57e70f282eSGreg Roach        "symfony/polyfill-php71": "~1.10",
58e70f282eSGreg Roach        "symfony/polyfill-php72": "~1.10",
5922acdb08SGreg Roach        "tecnickcom/tcpdf": "~6.2",
60e70f282eSGreg Roach        "webuni/commonmark-table-extension": "~0.9"
6110a8d14fSGreg Roach    },
62db7d25eeSGreg Roach    "require-dev": {
63bd52fa32SGreg Roach        "maximebf/debugbar": "*",
64db7d25eeSGreg Roach        "mockery/mockery": "*",
6595d954e1SGreg Roach        "phpunit/phpunit": "*",
6695d954e1SGreg Roach        "php-coveralls/php-coveralls": "*"
67db7d25eeSGreg Roach    },
68db6a3ae9SGreg Roach    "scripts": {
693d9f187dSGreg Roach       "webtrees:build": [
7036eae03fSGreg Roach           "@composer webtrees:mo",
71bcfab406SGreg Roach           "git checkout language/en-US.mo",
72f872a3beSGreg Roach           "rm -Rf webtrees/",
73f872a3beSGreg Roach           "git archive --prefix=webtrees/ HEAD --format=tar | tar -x",
74bcfab406SGreg Roach           "cp language/*.mo webtrees/language/",
75bcfab406SGreg Roach           "zip --quiet --recurse-paths --move -9 webtrees.zip webtrees"
76f872a3beSGreg Roach       ],
773d9f187dSGreg Roach       "webtrees:check": [
78425578caSGreg Roach            "### PHP-CODE-ANALYZER",
79e70f282eSGreg Roach            "phpca --since-version=7.1 app/",
80425578caSGreg Roach            "### PHP-CODE-FIXER",
81425578caSGreg Roach            "phpcf app/",
82c58d56c4SGreg Roach            "### PAHOUT",
83e70f282eSGreg Roach            "pahout --php-version 7.1.3 --ignore-paths=data .",
84771ae10aSGreg Roach            "### PHP-PARALLEL-LINT",
85771ae10aSGreg Roach            "parallel-lint --no-progress --exclude vendor .",
864686330aSGreg Roach            "### PHP-CODE-SNIFFER",
87c00af032SGreg Roach            "phpcs --standard=PSR12 -s --exclude=Generic.Files.LineLength,PSR2.ControlStructures.ControlStructureSpacing app routes",
88425578caSGreg Roach            "### PHAN",
893d9f187dSGreg Roach            "PHAN_DISABLE_XDEBUG_WARN=1 phan --target-php-version=7.0 --processes=32 --progress-bar --directory . --exclude-directory-list data,resources,routes,tests,vendor",
90771ae10aSGreg Roach            "### PHPSTAN",
9108198125SGreg Roach            "phpstan --level=7 analyze index.php app",
92425578caSGreg Roach            "### PSALM",
93425578caSGreg Roach            "psalm --threads=8"
94425578caSGreg Roach        ],
953d9f187dSGreg Roach        "webtrees:tools": [
96c58d56c4SGreg Roach            "### PAHOUT",
97c58d56c4SGreg Roach            "@composer global require wata727/pahout=*",
98425578caSGreg Roach            "### PHAN",
99425578caSGreg Roach            "@composer global require phan/phan=*",
100425578caSGreg Roach            "### PHP-CODE-ANALYZER",
101425578caSGreg Roach            "@composer global require wapmorgan/php-code-analyzer=*",
102425578caSGreg Roach            "### PHP-CODE-FIXER",
103425578caSGreg Roach            "@composer global require wapmorgan/php-code-fixer=*",
104425578caSGreg Roach            "### PHP-PARALLEL-LINT",
105425578caSGreg Roach            "@composer global require jakub-onderka/php-parallel-lint=*",
106425578caSGreg Roach            "### PSALM",
107425578caSGreg Roach            "@composer global require vimeo/psalm=*"
108425578caSGreg Roach        ],
1093d9f187dSGreg Roach        "webtrees:mo": [
110869661cfSGreg Roach            "for FILE in language/*.po; do msgfmt --output=$(dirname $FILE)/$(basename $FILE .po).mo $FILE; done",
111db6a3ae9SGreg Roach            "rm -Rf data/cache/language*"
112cb14bb54SGreg Roach        ],
1133d9f187dSGreg Roach        "webtrees:po": [
114cb14bb54SGreg Roach            "sed -i.bak -e 's/\\(I18N::[^)]*[)]\\)/<?php echo \\1; ?>/g' modules*/*/*.xml",
115cb14bb54SGreg Roach            "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=language/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",
116cb14bb54SGreg Roach            "find modules*/ -name '*.xml' -exec mv {}.bak {} \\;",
117cb14bb54SGreg Roach            "find language -name '*.po' -exec msgmerge --no-wrap --sort-output --no-fuzzy-matching --quiet --output={} {} language/webtrees.pot \\;"
118db6a3ae9SGreg Roach        ]
119db6a3ae9SGreg Roach    },
120cb14bb54SGreg Roach    "scripts-descriptions": {
1213d9f187dSGreg Roach        "webtrees:build": "Create a distribution file (webtrees.zip)",
1223d9f187dSGreg Roach        "webtrees:check": "Run various static analysis tools",
1233d9f187dSGreg Roach        "webtrees:mo": "Compile the language files (*.mo)",
1243d9f187dSGreg Roach        "webtrees:po": "Update the language (webtrees.pot, *.po)",
1253d9f187dSGreg Roach        "webtrees:tools": "Install the tools needed to run webtrees-check"
126cb14bb54SGreg Roach    },
12710a8d14fSGreg Roach    "extra": {
12810a8d14fSGreg Roach        "branch-alias": {
129db6a3ae9SGreg Roach            "dev-master": "2.0-dev"
13010a8d14fSGreg Roach        }
131ed285daaSGreg Roach    }
132ed285daaSGreg Roach}
133