xref: /webtrees/composer.json (revision b403cedd081696643a934eb21948c1f631a84d88)
1ed285daaSGreg Roach{
2a25f0a04SGreg Roach    "name": "fisharebest/webtrees",
3ed285daaSGreg Roach    "description": "webtrees online genealogy",
474d6dc0eSGreg Roach    "keywords": [
574d6dc0eSGreg Roach        "webtrees",
674d6dc0eSGreg Roach        "genealogy"
774d6dc0eSGreg Roach    ],
831b7ad55SGreg Roach    "license": "GPL-3.0-or-later",
9a25f0a04SGreg Roach    "autoload": {
100e62c4b8SGreg Roach        "psr-4": {
110e62c4b8SGreg Roach            "Fisharebest\\Webtrees\\": "app/"
121f3fb95cSGreg Roach        },
131f3fb95cSGreg Roach        "files": [
141f3fb95cSGreg Roach            "app/Helpers/functions.php"
151f3fb95cSGreg Roach        ]
16a25f0a04SGreg Roach    },
1784e2cf4eSGreg Roach    "autoload-dev": {
1884e2cf4eSGreg Roach        "classmap": [
1974d6dc0eSGreg Roach            "tests/TestCase.php",
2074d6dc0eSGreg Roach            "tests/MockGlobalFunctions.php"
2184e2cf4eSGreg Roach        ]
2284e2cf4eSGreg Roach    },
237286a40cSGreg Roach    "config": {
247286a40cSGreg Roach        "platform": {
25ea27dd66SGreg Roach            "php": "7.4"
2622acdb08SGreg Roach        },
27425578caSGreg Roach        "sort-packages": true,
28425578caSGreg Roach        "process-timeout": 3600
297286a40cSGreg Roach    },
30ed285daaSGreg Roach    "require": {
31d372c9f3SGreg Roach        "php": "7.4 - 8.0",
325f9f5f94SRico Sonntag        "ext-curl": "*",
337286a40cSGreg Roach        "ext-gd": "*",
347286a40cSGreg Roach        "ext-iconv": "*",
355f9f5f94SRico Sonntag        "ext-intl": "*",
368ae9e54eSRico Sonntag        "ext-json": "*",
377286a40cSGreg Roach        "ext-pcre": "*",
387286a40cSGreg Roach        "ext-pdo": "*",
397286a40cSGreg Roach        "ext-session": "*",
403b3cfeeaSGreg Roach        "ext-xml": "*",
415f9f5f94SRico Sonntag        "ext-zip": "*",
42ee4364daSGreg Roach        "aura/router": "~3.1",
431346bcc6SGreg Roach        "doctrine/dbal": "~3.1",
44ea27dd66SGreg Roach        "ezyang/htmlpurifier": "~4.13",
456ccdf4f0SGreg Roach        "fig/http-message-util": "^1.1",
468e8a9008SGreg Roach        "fisharebest/algorithm": "~1.5",
4793686a36SGreg Roach        "fisharebest/ext-calendar": "~2.5",
48f7cf8a15SGreg Roach        "fisharebest/flysystem-chroot-adapter": "~2.0",
4950b23b0dSGreg Roach        "fisharebest/localization": "~1.15",
507095af96SGreg Roach        "guzzlehttp/guzzle": "~7.3",
511346bcc6SGreg Roach        "illuminate/container": "~8.38",
521346bcc6SGreg Roach        "illuminate/database": "~8.38",
531346bcc6SGreg Roach        "illuminate/support": "~8.38",
546577bfc3SGreg Roach        "intervention/image": "^2.5",
55f7cf8a15SGreg Roach        "io-developer/php-whois": "~4.0",
56945bb51aSGreg Roach        "league/commonmark": "~1.6",
57544256bcSGreg Roach        "league/flysystem": "^2.0.7",
58f7cf8a15SGreg Roach        "league/flysystem-ziparchive": "~2.0",
59f7cf8a15SGreg Roach        "middlewares/client-ip": "~2.0",
60ea27dd66SGreg Roach        "mlocati/ip-lib": "~1.14",
61ea27dd66SGreg Roach        "nesbot/carbon": "~2.46",
62ea27dd66SGreg Roach        "nyholm/psr7": "~1.4",
63666268ebSGreg Roach        "nyholm/psr7-server": "~1.0",
646ccdf4f0SGreg Roach        "oscarotero/middleland": "~1.0",
65c692965aSGreg Roach        "psr/cache": "~1.0",
666ccdf4f0SGreg Roach        "psr/http-message": "~1.0",
676ccdf4f0SGreg Roach        "psr/http-server-handler": "~1.0",
686ccdf4f0SGreg Roach        "psr/http-server-middleware": "~1.0",
69f7cf8a15SGreg Roach        "ramsey/uuid": "~4.1",
70354a9dbaSGreg Roach        "sabre/vobject": "~4.3",
718e8a9008SGreg Roach        "swiftmailer/swiftmailer": "~6.2",
72f7cf8a15SGreg Roach        "symfony/cache": "~5.2",
73f7cf8a15SGreg Roach        "symfony/expression-language": "~5.2",
74ea27dd66SGreg Roach        "symfony/polyfill-mbstring": "~1.22",
75ea27dd66SGreg Roach        "symfony/polyfill-php80": "^1.22",
762912e743SGreg Roach        "tecnickcom/tcpdf": "^6.4.1"
7710a8d14fSGreg Roach    },
78db7d25eeSGreg Roach    "require-dev": {
795ee0e1c4SGreg Roach        "ext-dom": "*",
80c42d24a9SGreg Roach        "ext-pdo_sqlite": "*",
814525f50bSGreg Roach        "ext-sqlite3": "*",
82f7cf8a15SGreg Roach        "composer/composer": "~2.0",
83f7cf8a15SGreg Roach        "league/flysystem-memory": "~2.0",
848e8a9008SGreg Roach        "maximebf/debugbar": "~1.16",
851346bcc6SGreg Roach        "php-coveralls/php-coveralls": "~2.4",
86f7cf8a15SGreg Roach        "phpunit/phpunit": "~9.5"
87db7d25eeSGreg Roach    },
88c42d24a9SGreg Roach    "suggest": {
896577bfc3SGreg Roach        "ext-imagick": "Required to generate thumbnail images",
90c42d24a9SGreg Roach        "ext-pdo_mysql": "Required to use MySQL for database storage",
91c42d24a9SGreg Roach        "ext-pdo_sqlite": "Required to use SQLite for database storage",
92764facb7SGreg Roach        "ext-pdo_pgsql": "Required to use PostgreSQL for database storage",
93179fae31SGreg Roach        "ext-pdo_sqlsvr": "Required to use SQL Server for database storage",
94179fae31SGreg Roach        "ext-zlib": "Required to compress HTTP respnses"
95c42d24a9SGreg Roach    },
96db6a3ae9SGreg Roach    "scripts": {
973d9f187dSGreg Roach        "webtrees:build": [
98f872a3beSGreg Roach            "rm -Rf webtrees/",
99f872a3beSGreg Roach            "git archive --prefix=webtrees/ HEAD --format=tar | tar -x",
100*b403ceddSGreg Roach            "@composer install --no-dev --quiet",
101*b403ceddSGreg Roach            "cp -r vendor/ webtrees/vendor/",
102006094b9SGreg Roach            "@composer webtrees:lang",
103006094b9SGreg Roach            "for FILE in resources/lang/*/messages.php; do cp $FILE webtrees/$FILE; done",
104bcfab406SGreg Roach            "zip --quiet --recurse-paths --move -9 webtrees.zip webtrees"
105f872a3beSGreg Roach        ],
106289701c8SGreg Roach        "webtrees:pre-commit-hook": [
107289701c8SGreg Roach            "@composer webtrees:phpcs",
1089b152ff9SGreg Roach            "@composer webtrees:phpstan",
109289701c8SGreg Roach            "@composer webtrees:test"
110289701c8SGreg Roach        ],
1113d9f187dSGreg Roach        "webtrees:check": [
1124686330aSGreg Roach            "### PHP-CODE-SNIFFER",
113289701c8SGreg Roach            "@composer webtrees:phpcs",
1145781ea1fSGreg Roach            "### PHPSTAN",
1159b152ff9SGreg Roach            "@composer webtrees:phpstan",
1165781ea1fSGreg Roach            "### PSALM",
1173df1e584SGreg Roach            "@composer webtrees:psalm"
1185781ea1fSGreg Roach        ],
119289701c8SGreg Roach        "webtrees:phpcs": [
12074d6dc0eSGreg Roach            "@composer global require squizlabs/php_codesniffer=* --quiet",
12130e63383SGreg Roach            "~/.composer/vendor/bin/phpcs --standard=PSR12 --colors --extensions=php --exclude=Generic.Files.LineLength index.php app tests",
122bbae5905SGreg Roach            "~/.composer/vendor/bin/phpcs --colors --extensions=css resources/css"
1235781ea1fSGreg Roach        ],
124289701c8SGreg Roach        "webtrees:phpstan": [
125289701c8SGreg Roach            "@composer global require --quiet phpstan/phpstan=*",
126289701c8SGreg Roach            "@composer global require --quiet phpstan/extension-installer=*",
127289701c8SGreg Roach            "@composer global require --quiet phpstan/phpstan-deprecation-rules=*",
128289701c8SGreg Roach            "@composer global require --quiet phpstan/phpstan-strict-rules=*",
129289701c8SGreg Roach            "@composer global require --quiet phpstan/phpstan-phpunit=*",
130dcb3a022SGreg Roach            "@composer install --quiet",
13130e63383SGreg Roach            "~/.composer/vendor/bin/phpstan analyze --level=max index.php app",
132dcb3a022SGreg Roach            "@composer install --no-dev --quiet"
1335781ea1fSGreg Roach        ],
134289701c8SGreg Roach        "webtrees:psalm": [
135dcb3a022SGreg Roach            "@composer global require --quiet vimeo/psalm",
1365781ea1fSGreg Roach            "@composer install --quiet",
13761f22e38SGreg Roach            "~/.composer/vendor/bin/psalm",
1385781ea1fSGreg Roach            "@composer install --no-dev --quiet"
139425578caSGreg Roach        ],
140289701c8SGreg Roach        "webtrees:test": [
141289701c8SGreg Roach            "@composer install --quiet",
142289701c8SGreg Roach            "@php vendor/bin/phpunit",
143289701c8SGreg Roach            "@composer install --no-dev --quiet"
144289701c8SGreg Roach        ],
14586b91143SGreg Roach        "webtrees:coverage": [
1465781ea1fSGreg Roach            "@composer install --dev --quiet",
14786b91143SGreg Roach            "vendor/bin/phpunit --coverage-html=tests/coverage",
1485781ea1fSGreg Roach            "@composer install --no-dev --quiet"
14986b91143SGreg Roach        ],
150006094b9SGreg Roach        "webtrees:lang": [
151006094b9SGreg Roach            "Fisharebest\\Webtrees\\Console\\ComposerScripts::languageFiles"
152006094b9SGreg Roach        ],
153a192be9bSGreg Roach        "webtrees:missing-tests": [
154a192be9bSGreg Roach            "Fisharebest\\Webtrees\\Console\\ComposerScripts::missingTests"
155a192be9bSGreg Roach        ],
1563d9f187dSGreg Roach        "webtrees:po": [
157692edf9aSGreg Roach            "sed -i.bak -e 's/\\(I18N::[^)]*[)]\\)/<?php echo \\1; ?>/g' resources/xml/reports/*.xml",
158f7fac239SGreg Roach            "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",
159692edf9aSGreg Roach            "find resources/xml/reports/ -name '*.xml' -exec mv {}.bak {} \\;",
160362b8464SGreg Roach            "find resources/lang -name '*.po' -exec msgmerge --no-wrap --sort-output --no-fuzzy-matching --quiet --output={} {} resources/lang/webtrees.pot \\;"
16197c22350SGreg Roach        ],
16297c22350SGreg Roach        "webtrees:png": [
16308362db4SGreg Roach            "find resources/css -name *.png -exec pngquant --ext .png --force --skip-if-larger --speed 1 {} \\;",
16408362db4SGreg Roach            "find resources/css -name *.png -exec pngcrush -rem allb -brute -reduce {} {} \\;",
16508362db4SGreg Roach            "find resources/css -name *.png -exec optipng -o7 -zm1-9 {} \\;"
166db6a3ae9SGreg Roach        ]
167db6a3ae9SGreg Roach    },
168cb14bb54SGreg Roach    "scripts-descriptions": {
1693d9f187dSGreg Roach        "webtrees:build": "Create a distribution file (webtrees.zip)",
1703d9f187dSGreg Roach        "webtrees:check": "Run various static analysis tools",
17186b91143SGreg Roach        "webtrees:coverage": "Generate test coverage report",
172006094b9SGreg Roach        "webtrees:lang": "Compile the language files (messages.php)",
17374d6dc0eSGreg Roach        "webtrees:po": "Update the language (webtrees.pot, *.po)"
174ed285daaSGreg Roach    }
175ed285daaSGreg Roach}
176