xref: /webtrees/composer.json (revision 07f1e892529eb3c499d21ffbf897baa6556230b7)
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": {
31f0cc62bdSGreg Roach        "php": "7.4 - 8.1",
32eaab6746SGreg Roach        "ext-ctype": "*",
335f9f5f94SRico Sonntag        "ext-curl": "*",
347b202fa1SRico Sonntag        "ext-exif": "*",
357b202fa1SRico Sonntag        "ext-fileinfo": "*",
367286a40cSGreg Roach        "ext-gd": "*",
377286a40cSGreg Roach        "ext-iconv": "*",
385f9f5f94SRico Sonntag        "ext-intl": "*",
398ae9e54eSRico Sonntag        "ext-json": "*",
407b202fa1SRico Sonntag        "ext-mbstring": "*",
417286a40cSGreg Roach        "ext-pcre": "*",
427286a40cSGreg Roach        "ext-pdo": "*",
437286a40cSGreg Roach        "ext-session": "*",
447b202fa1SRico Sonntag        "ext-simplexml": "*",
453b3cfeeaSGreg Roach        "ext-xml": "*",
46fa590c71SGreg Roach        "aura/router": "3.2.0",
4748d4e05cSGreg Roach        "doctrine/dbal": "3.3.6",
48148ebf9dSGreg Roach        "ezyang/htmlpurifier": "4.14.0",
491f7b3ff5SGreg Roach        "fig/http-message-util": "1.1.5",
50d7d5645bSGreg Roach        "fisharebest/algorithm": "1.6.0",
51*07f1e892SGreg Roach        "fisharebest/ext-calendar": "2.6.0",
521f7b3ff5SGreg Roach        "fisharebest/flysystem-chroot-adapter": "2.0.0",
531f7b3ff5SGreg Roach        "fisharebest/localization": "1.15.1",
5403b856c6SGreg Roach        "guzzlehttp/guzzle": "7.4.3",
55*07f1e892SGreg Roach        "illuminate/container": "8.83.16",
56*07f1e892SGreg Roach        "illuminate/database": "8.83.16",
57*07f1e892SGreg Roach        "illuminate/support": "8.83.16",
58e5a82967SGreg Roach        "intervention/image": "2.7.2",
59148ebf9dSGreg Roach        "io-developer/php-whois": "4.1.6",
60*07f1e892SGreg Roach        "league/commonmark": "2.3.3",
6148d4e05cSGreg Roach        "league/flysystem": "2.4.5",
6273c15bedSGreg Roach        "league/flysystem-ziparchive": "2.3.1",
631f7b3ff5SGreg Roach        "middlewares/client-ip": "2.0.1",
64148ebf9dSGreg Roach        "mlocati/ip-lib": "1.18.0",
65c8d5803fSGreg Roach        "nesbot/carbon": "2.58.0",
666191ab59SGreg Roach        "nyholm/psr7": "1.5.0",
671f7b3ff5SGreg Roach        "nyholm/psr7-server": "1.0.2",
681f7b3ff5SGreg Roach        "oscarotero/middleland": "1.0.1",
691f7b3ff5SGreg Roach        "psr/cache": "1.0.1",
701f7b3ff5SGreg Roach        "psr/http-message": "1.0.1",
711f7b3ff5SGreg Roach        "psr/http-server-handler": "1.0.1",
721f7b3ff5SGreg Roach        "psr/http-server-middleware": "1.0.1",
733c88589eSGreg Roach        "ramsey/uuid": "4.2.3",
7497bc5a01SGreg Roach        "sabre/vobject": "4.4.1",
75*07f1e892SGreg Roach        "symfony/cache": "5.4.9",
7648d4e05cSGreg Roach        "symfony/expression-language": "5.4.8",
7748d4e05cSGreg Roach        "symfony/mailer": "5.4.8",
78*07f1e892SGreg Roach        "symfony/polyfill-mbstring": "1.26.0",
79*07f1e892SGreg Roach        "symfony/polyfill-php80": "1.26.0",
80148ebf9dSGreg Roach        "tecnickcom/tcpdf": "6.4.4"
8110a8d14fSGreg Roach    },
82db7d25eeSGreg Roach    "require-dev": {
835ee0e1c4SGreg Roach        "ext-dom": "*",
849f37cd25SGreg Roach        "ext-libxml": "*",
85c42d24a9SGreg Roach        "ext-pdo_sqlite": "*",
864525f50bSGreg Roach        "ext-sqlite3": "*",
87c337aea6SGreg Roach        "composer/composer": "2.3.5",
8847492cc1SGreg Roach        "league/flysystem-memory": "2.0.6",
8947492cc1SGreg Roach        "php-coveralls/php-coveralls": "2.5.2",
90a788b0b7SGreg Roach        "phpunit/phpunit": "9.5.20"
91db7d25eeSGreg Roach    },
92c42d24a9SGreg Roach    "suggest": {
936577bfc3SGreg Roach        "ext-imagick": "Required to generate thumbnail images",
94c42d24a9SGreg Roach        "ext-pdo_mysql": "Required to use MySQL for database storage",
95c42d24a9SGreg Roach        "ext-pdo_sqlite": "Required to use SQLite for database storage",
96764facb7SGreg Roach        "ext-pdo_pgsql": "Required to use PostgreSQL for database storage",
97179fae31SGreg Roach        "ext-pdo_sqlsvr": "Required to use SQL Server for database storage",
987a194a1dSGreg Roach        "ext-zip": "Required to compress downloads and use the upgrade wizard",
997b202fa1SRico Sonntag        "ext-zlib": "Required to compress HTTP responses"
100c42d24a9SGreg Roach    },
101db6a3ae9SGreg Roach    "scripts": {
1023d9f187dSGreg Roach        "webtrees:build": [
103f872a3beSGreg Roach            "rm -Rf webtrees/",
104f872a3beSGreg Roach            "git archive --prefix=webtrees/ HEAD --format=tar | tar -x",
105b403ceddSGreg Roach            "@composer install --no-dev --quiet",
106b403ceddSGreg Roach            "cp -r vendor/ webtrees/vendor/",
107006094b9SGreg Roach            "@composer webtrees:lang",
108006094b9SGreg Roach            "for FILE in resources/lang/*/messages.php; do cp $FILE webtrees/$FILE; done",
109538cf0f4SGreg Roach            "zip --quiet --recurse-paths --move -9 webtrees-`git describe`.zip webtrees"
110f872a3beSGreg Roach        ],
111289701c8SGreg Roach        "webtrees:pre-commit-hook": [
112289701c8SGreg Roach            "@composer webtrees:phpcs",
1139b152ff9SGreg Roach            "@composer webtrees:phpstan",
114289701c8SGreg Roach            "@composer webtrees:test"
115289701c8SGreg Roach        ],
1163d9f187dSGreg Roach        "webtrees:check": [
1174686330aSGreg Roach            "### PHP-CODE-SNIFFER",
118289701c8SGreg Roach            "@composer webtrees:phpcs",
1195781ea1fSGreg Roach            "### PHPSTAN",
1209b152ff9SGreg Roach            "@composer webtrees:phpstan",
1215781ea1fSGreg Roach            "### PSALM",
1223df1e584SGreg Roach            "@composer webtrees:psalm"
1235781ea1fSGreg Roach        ],
124289701c8SGreg Roach        "webtrees:phpcs": [
12574d6dc0eSGreg Roach            "@composer global require squizlabs/php_codesniffer=* --quiet",
12630e63383SGreg Roach            "~/.composer/vendor/bin/phpcs --standard=PSR12 --colors --extensions=php --exclude=Generic.Files.LineLength index.php app tests",
127bbae5905SGreg Roach            "~/.composer/vendor/bin/phpcs --colors --extensions=css resources/css"
1285781ea1fSGreg Roach        ],
129289701c8SGreg Roach        "webtrees:phpstan": [
130289701c8SGreg Roach            "@composer global require --quiet phpstan/phpstan=*",
131289701c8SGreg Roach            "@composer global require --quiet phpstan/extension-installer=*",
132289701c8SGreg Roach            "@composer global require --quiet phpstan/phpstan-deprecation-rules=*",
133289701c8SGreg Roach            "@composer global require --quiet phpstan/phpstan-strict-rules=*",
134289701c8SGreg Roach            "@composer global require --quiet phpstan/phpstan-phpunit=*",
135dcb3a022SGreg Roach            "@composer install --quiet",
13663f92349SGreg Roach            "~/.composer/vendor/bin/phpstan analyze --memory-limit=-1 --level=max index.php app",
137dcb3a022SGreg Roach            "@composer install --no-dev --quiet"
1385781ea1fSGreg Roach        ],
13947ab6ec4SGreg Roach        "webtrees:phpstan-baseline": [
14047ab6ec4SGreg Roach            "@composer global require --quiet phpstan/phpstan=*",
14147ab6ec4SGreg Roach            "@composer global require --quiet phpstan/extension-installer=*",
14247ab6ec4SGreg Roach            "@composer global require --quiet phpstan/phpstan-deprecation-rules=*",
14347ab6ec4SGreg Roach            "@composer global require --quiet phpstan/phpstan-strict-rules=*",
14447ab6ec4SGreg Roach            "@composer global require --quiet phpstan/phpstan-phpunit=*",
14547ab6ec4SGreg Roach            "@composer install --quiet",
14647ab6ec4SGreg Roach            "~/.composer/vendor/bin/phpstan analyze --level=max --generate-baseline=phpstan-baseline.neon index.php app",
14747ab6ec4SGreg Roach            "@composer install --no-dev --quiet"
14847ab6ec4SGreg Roach        ],
149289701c8SGreg Roach        "webtrees:psalm": [
150dcb3a022SGreg Roach            "@composer global require --quiet vimeo/psalm",
1515781ea1fSGreg Roach            "@composer install --quiet",
1521c6adce8SGreg Roach            "~/.composer/vendor/bin/psalm --threads=8 --php-version=8.1",
1535781ea1fSGreg Roach            "@composer install --no-dev --quiet"
154425578caSGreg Roach        ],
155289701c8SGreg Roach        "webtrees:test": [
156289701c8SGreg Roach            "@composer install --quiet",
157289701c8SGreg Roach            "@php vendor/bin/phpunit",
158289701c8SGreg Roach            "@composer install --no-dev --quiet"
159289701c8SGreg Roach        ],
16086b91143SGreg Roach        "webtrees:coverage": [
1615781ea1fSGreg Roach            "@composer install --dev --quiet",
16286b91143SGreg Roach            "vendor/bin/phpunit --coverage-html=tests/coverage",
1635781ea1fSGreg Roach            "@composer install --no-dev --quiet"
16486b91143SGreg Roach        ],
165006094b9SGreg Roach        "webtrees:lang": [
166006094b9SGreg Roach            "Fisharebest\\Webtrees\\Console\\ComposerScripts::languageFiles"
167006094b9SGreg Roach        ],
168a192be9bSGreg Roach        "webtrees:missing-tests": [
169a192be9bSGreg Roach            "Fisharebest\\Webtrees\\Console\\ComposerScripts::missingTests"
170a192be9bSGreg Roach        ],
1713d9f187dSGreg Roach        "webtrees:po": [
172692edf9aSGreg Roach            "sed -i.bak -e 's/\\(I18N::[^)]*[)]\\)/<?php echo \\1; ?>/g' resources/xml/reports/*.xml",
173f7fac239SGreg 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",
174692edf9aSGreg Roach            "find resources/xml/reports/ -name '*.xml' -exec mv {}.bak {} \\;",
175362b8464SGreg Roach            "find resources/lang -name '*.po' -exec msgmerge --no-wrap --sort-output --no-fuzzy-matching --quiet --output={} {} resources/lang/webtrees.pot \\;"
17697c22350SGreg Roach        ],
17797c22350SGreg Roach        "webtrees:png": [
17808362db4SGreg Roach            "find resources/css -name *.png -exec pngquant --ext .png --force --skip-if-larger --speed 1 {} \\;",
17908362db4SGreg Roach            "find resources/css -name *.png -exec pngcrush -rem allb -brute -reduce {} {} \\;",
18008362db4SGreg Roach            "find resources/css -name *.png -exec optipng -o7 -zm1-9 {} \\;"
181db6a3ae9SGreg Roach        ]
182db6a3ae9SGreg Roach    },
183cb14bb54SGreg Roach    "scripts-descriptions": {
1843d9f187dSGreg Roach        "webtrees:build": "Create a distribution file (webtrees.zip)",
1853d9f187dSGreg Roach        "webtrees:check": "Run various static analysis tools",
18686b91143SGreg Roach        "webtrees:coverage": "Generate test coverage report",
187006094b9SGreg Roach        "webtrees:lang": "Compile the language files (messages.php)",
18874d6dc0eSGreg Roach        "webtrees:po": "Update the language (webtrees.pot, *.po)"
189ed285daaSGreg Roach    }
190ed285daaSGreg Roach}
191