xref: /webtrees/composer.json (revision 86b91143d52bad4840ab12131ed783b46e0c3412)
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": {
214459dc9aSGreg Roach            "php" : "7.1.8"
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-session": "*",
357286a40cSGreg Roach        "ext-simplexml": "*",
363b3cfeeaSGreg Roach        "ext-xml": "*",
375f9f5f94SRico Sonntag        "ext-zip": "*",
38362be83aSGreg Roach        "doctrine/dbal": "~2.9",
396ccdf4f0SGreg Roach        "fig/http-message-util": "^1.1",
40d592f2ecSGreg Roach        "fisharebest/algorithm": "~1.3",
4193686a36SGreg Roach        "fisharebest/ext-calendar": "~2.5",
42d1315a43SGreg Roach        "fisharebest/flysystem-chroot-adapter": "~1.0",
435bfba019SGreg Roach        "fisharebest/localization": "~1.13",
44cc26b3c3SGreg Roach        "guzzlehttp/guzzle": "~6.0",
454525f50bSGreg Roach        "illuminate/cache": "~5.8",
464525f50bSGreg Roach        "illuminate/container": "~5.8",
474525f50bSGreg Roach        "illuminate/database": "~5.8",
484525f50bSGreg Roach        "illuminate/support": "~5.8",
49e70f282eSGreg Roach        "league/commonmark": "~0.18",
50d592f2ecSGreg Roach        "league/flysystem": "~1.0",
51d1315a43SGreg Roach        "league/flysystem-cached-adapter": "~1.0",
52d592f2ecSGreg Roach        "league/flysystem-ziparchive": "~1.0",
53e70f282eSGreg Roach        "league/glide": "~1.3",
544459dc9aSGreg Roach        "nesbot/carbon": "~2.14",
556ccdf4f0SGreg Roach        "nyholm/psr7": "~1.1",
566ccdf4f0SGreg Roach        "nyholm/psr7-server": "~0.3",
576ccdf4f0SGreg Roach        "oscarotero/middleland": "~1.0",
586ccdf4f0SGreg Roach        "psr/http-message": "~1.0",
596ccdf4f0SGreg Roach        "psr/http-server-handler": "~1.0",
606ccdf4f0SGreg Roach        "psr/http-server-middleware": "~1.0",
61e70f282eSGreg Roach        "ramsey/uuid": "~3.8",
628b04670aSGreg Roach        "swiftmailer/swiftmailer": "~6.1",
63e70f282eSGreg Roach        "symfony/expression-language": "~4.2",
64e70f282eSGreg Roach        "symfony/http-foundation": "~4.2",
65e70f282eSGreg Roach        "symfony/http-kernel": "~4.2",
6608738c04SGreg Roach        "symfony/polyfill-mbstring": "~1.11",
6708738c04SGreg Roach        "symfony/polyfill-php72": "~1.11",
6822acdb08SGreg Roach        "tecnickcom/tcpdf": "~6.2",
69e70f282eSGreg Roach        "webuni/commonmark-table-extension": "~0.9"
7010a8d14fSGreg Roach    },
71db7d25eeSGreg Roach    "require-dev": {
72c42d24a9SGreg Roach        "ext-pdo_sqlite": "*",
734525f50bSGreg Roach        "ext-sqlite3": "*",
744525f50bSGreg Roach        "league/flysystem-memory": "~1.0",
754525f50bSGreg Roach        "maximebf/debugbar": "~1.15",
764525f50bSGreg Roach        "php-coveralls/php-coveralls": "~2.1",
774525f50bSGreg Roach        "phpunit/phpunit": "~7.0|~8.0"
78db7d25eeSGreg Roach    },
79c42d24a9SGreg Roach    "suggest": {
80c42d24a9SGreg Roach        "ext-pdo_mysql": "Required to use MySQL for database storage",
81c42d24a9SGreg Roach        "ext-pdo_sqlite": "Required to use SQLite for database storage",
82764facb7SGreg Roach        "ext-pdo_pgsql": "Required to use PostgreSQL for database storage",
83c42d24a9SGreg Roach        "ext-pdo_sqlsvr": "Required to use SQL Server for database storage"
84c42d24a9SGreg Roach    },
85db6a3ae9SGreg Roach    "scripts": {
863d9f187dSGreg Roach       "webtrees:build": [
87f872a3beSGreg Roach           "rm -Rf webtrees/",
88f872a3beSGreg Roach           "git archive --prefix=webtrees/ HEAD --format=tar | tar -x",
8982f8fca5SGreg Roach            "for FILE in resources/lang/*/messages.po; do msgfmt --output=webtrees/$(dirname $FILE)/$(basename $FILE .po).mo $FILE; done",
90bcfab406SGreg Roach           "zip --quiet --recurse-paths --move -9 webtrees.zip webtrees"
91f872a3beSGreg Roach       ],
923d9f187dSGreg Roach       "webtrees:check": [
934686330aSGreg Roach            "### PHP-CODE-SNIFFER",
94c00af032SGreg Roach            "phpcs --standard=PSR12 -s --exclude=Generic.Files.LineLength,PSR2.ControlStructures.ControlStructureSpacing app routes",
95425578caSGreg Roach            "### PHAN",
9603bd29eaSGreg Roach            "PHAN_DISABLE_XDEBUG_WARN=1 phan --target-php-version=7.1 --progress-bar --directory . --exclude-directory-list data,resources,routes,tests,vendor",
97771ae10aSGreg Roach            "### PHPSTAN",
9808198125SGreg Roach            "phpstan --level=7 analyze index.php app",
99425578caSGreg Roach            "### PSALM",
10003bd29eaSGreg Roach            "psalm"
101425578caSGreg Roach        ],
102*86b91143SGreg Roach       "webtrees:coverage": [
103*86b91143SGreg Roach            "composer install --dev --quiet",
104*86b91143SGreg Roach            "vendor/bin/phpunit --coverage-html=tests/coverage",
105*86b91143SGreg Roach            "composer install --no-dev --quiet"
106*86b91143SGreg Roach        ],
1073d9f187dSGreg Roach        "webtrees:tools": [
108425578caSGreg Roach            "### PHAN",
109425578caSGreg Roach            "@composer global require phan/phan=*",
110425578caSGreg Roach            "### PSALM",
111425578caSGreg Roach            "@composer global require vimeo/psalm=*"
112425578caSGreg Roach        ],
1133d9f187dSGreg Roach        "webtrees:mo": [
114362b8464SGreg Roach            "for FILE in resources/lang/*/messages.po; do msgfmt --output=$(dirname $FILE)/$(basename $FILE .po).mo $FILE; done",
115db6a3ae9SGreg Roach            "rm -Rf data/cache/language*"
116cb14bb54SGreg Roach        ],
1173d9f187dSGreg Roach        "webtrees:po": [
118692edf9aSGreg Roach            "sed -i.bak -e 's/\\(I18N::[^)]*[)]\\)/<?php echo \\1; ?>/g' resources/xml/reports/*.xml",
119362b8464SGreg 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=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",
120692edf9aSGreg Roach            "find resources/xml/reports/ -name '*.xml' -exec mv {}.bak {} \\;",
121362b8464SGreg Roach            "find resources/lang -name '*.po' -exec msgmerge --no-wrap --sort-output --no-fuzzy-matching --quiet --output={} {} resources/lang/webtrees.pot \\;"
12297c22350SGreg Roach        ],
12397c22350SGreg Roach        "webtrees:png": [
12497c22350SGreg Roach            "find resources/css -name *.png -exec pngquant --ext .png --force --skip-if-larger --speed 1 {} \\;"
125db6a3ae9SGreg Roach        ]
126db6a3ae9SGreg Roach    },
127cb14bb54SGreg Roach    "scripts-descriptions": {
1283d9f187dSGreg Roach        "webtrees:build": "Create a distribution file (webtrees.zip)",
1293d9f187dSGreg Roach        "webtrees:check": "Run various static analysis tools",
130*86b91143SGreg Roach        "webtrees:coverage": "Generate test coverage report",
1313d9f187dSGreg Roach        "webtrees:mo": "Compile the language files (*.mo)",
1323d9f187dSGreg Roach        "webtrees:po": "Update the language (webtrees.pot, *.po)",
1333d9f187dSGreg Roach        "webtrees:tools": "Install the tools needed to run webtrees-check"
13408b342ecSGreg Roach    },
13508b342ecSGreg Roach    "extra": {
13608b342ecSGreg Roach        "branch-alias": {
13708b342ecSGreg Roach            "dev-master": "2.0-dev"
13808b342ecSGreg Roach        }
139ed285daaSGreg Roach    }
140ed285daaSGreg Roach}
141