xref: /webtrees/composer.json (revision b66f5d1a598af9dae3642e6df8d62dc086ee8a44)
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",
20*b66f5d1aSGreg Roach            "tests/MockGlobalFunctions.php",
21*b66f5d1aSGreg Roach            "tests/app/Elements/AbstractElementTestCase.php"
2284e2cf4eSGreg Roach        ]
2384e2cf4eSGreg Roach    },
247286a40cSGreg Roach    "config": {
257286a40cSGreg Roach        "platform": {
26f44cff08SGreg Roach            "php": "8.1.0"
2722acdb08SGreg Roach        },
28425578caSGreg Roach        "sort-packages": true,
29425578caSGreg Roach        "process-timeout": 3600
307286a40cSGreg Roach    },
31ed285daaSGreg Roach    "require": {
32f44cff08SGreg Roach        "php": "8.1 - 8.2",
33eaab6746SGreg Roach        "ext-ctype": "*",
345f9f5f94SRico Sonntag        "ext-curl": "*",
357b202fa1SRico Sonntag        "ext-exif": "*",
367b202fa1SRico Sonntag        "ext-fileinfo": "*",
377286a40cSGreg Roach        "ext-gd": "*",
387286a40cSGreg Roach        "ext-iconv": "*",
395f9f5f94SRico Sonntag        "ext-intl": "*",
408ae9e54eSRico Sonntag        "ext-json": "*",
417b202fa1SRico Sonntag        "ext-mbstring": "*",
427286a40cSGreg Roach        "ext-pcre": "*",
437286a40cSGreg Roach        "ext-pdo": "*",
447286a40cSGreg Roach        "ext-session": "*",
457b202fa1SRico Sonntag        "ext-simplexml": "*",
463b3cfeeaSGreg Roach        "ext-xml": "*",
47fa590c71SGreg Roach        "aura/router": "3.2.0",
488b9834a2SGreg Roach        "doctrine/dbal": "3.5.3",
49711bae39SGreg Roach        "ezyang/htmlpurifier": "4.16.0",
501f7b3ff5SGreg Roach        "fig/http-message-util": "1.1.5",
51d7d5645bSGreg Roach        "fisharebest/algorithm": "1.6.0",
5207f1e892SGreg Roach        "fisharebest/ext-calendar": "2.6.0",
539168a53cSGreg Roach        "fisharebest/flysystem-chroot-adapter": "3.0.0",
545b8771b0SGreg Roach        "fisharebest/localization": "1.17.0",
5560dee0e8SGreg Roach        "guzzlehttp/guzzle": "7.5.0",
568b9834a2SGreg Roach        "illuminate/container": "9.50.2",
578b9834a2SGreg Roach        "illuminate/database": "9.50.2",
588b9834a2SGreg Roach        "illuminate/support": "9.50.2",
59e5a82967SGreg Roach        "intervention/image": "2.7.2",
608b9834a2SGreg Roach        "io-developer/php-whois": "4.1.10",
61eb62060aSGreg Roach        "league/commonmark": "2.3.8",
628b9834a2SGreg Roach        "league/flysystem": "3.12.2",
632699d89cSGreg Roach        "league/flysystem-path-prefixing": "3.10.4",
64fcbc5515SGreg Roach        "league/flysystem-ziparchive": "3.12.0",
651f7b3ff5SGreg Roach        "middlewares/client-ip": "2.0.1",
66148ebf9dSGreg Roach        "mlocati/ip-lib": "1.18.0",
678b9834a2SGreg Roach        "nesbot/carbon": "2.66.0",
6861485ae9SGreg Roach        "nyholm/psr7": "1.5.1",
691f7b3ff5SGreg Roach        "nyholm/psr7-server": "1.0.2",
701f7b3ff5SGreg Roach        "oscarotero/middleland": "1.0.1",
719168a53cSGreg Roach        "psr/cache": "3.0.0",
721f7b3ff5SGreg Roach        "psr/http-message": "1.0.1",
731f7b3ff5SGreg Roach        "psr/http-server-handler": "1.0.1",
741f7b3ff5SGreg Roach        "psr/http-server-middleware": "1.0.1",
758b9834a2SGreg Roach        "ramsey/uuid": "4.7.3",
768b9834a2SGreg Roach        "sabre/vobject": "4.5.3",
778b9834a2SGreg Roach        "symfony/cache": "6.2.5",
788b9834a2SGreg Roach        "symfony/expression-language": "6.2.5",
798b9834a2SGreg Roach        "symfony/mailer": "6.2.5",
805b8771b0SGreg Roach        "symfony/polyfill-mbstring": "1.27.0",
81f44cff08SGreg Roach        "tecnickcom/tcpdf": "6.6.2"
8210a8d14fSGreg Roach    },
83db7d25eeSGreg Roach    "require-dev": {
845ee0e1c4SGreg Roach        "ext-dom": "*",
859f37cd25SGreg Roach        "ext-libxml": "*",
86c42d24a9SGreg Roach        "ext-pdo_sqlite": "*",
874525f50bSGreg Roach        "ext-sqlite3": "*",
888b9834a2SGreg Roach        "composer/composer": "2.5.2",
8932bf54bcSGreg Roach        "league/flysystem-memory": "3.10.3",
90711bae39SGreg Roach        "php-coveralls/php-coveralls": "2.5.3",
918b9834a2SGreg Roach        "phpunit/phpunit": "10.0.4"
92db7d25eeSGreg Roach    },
93c42d24a9SGreg Roach    "suggest": {
946577bfc3SGreg Roach        "ext-imagick": "Required to generate thumbnail images",
95c42d24a9SGreg Roach        "ext-pdo_mysql": "Required to use MySQL for database storage",
96c42d24a9SGreg Roach        "ext-pdo_sqlite": "Required to use SQLite for database storage",
97764facb7SGreg Roach        "ext-pdo_pgsql": "Required to use PostgreSQL for database storage",
987a468185SGreg Roach        "ext-pdo_sqlsrv": "Required to use SQL Server for database storage",
997a194a1dSGreg Roach        "ext-zip": "Required to compress downloads and use the upgrade wizard",
1007b202fa1SRico Sonntag        "ext-zlib": "Required to compress HTTP responses"
101c42d24a9SGreg Roach    },
102db6a3ae9SGreg Roach    "scripts": {
1033d9f187dSGreg Roach        "webtrees:build": [
104f872a3beSGreg Roach            "rm -Rf webtrees/",
105f872a3beSGreg Roach            "git archive --prefix=webtrees/ HEAD --format=tar | tar -x",
106b403ceddSGreg Roach            "@composer install --no-dev --quiet",
107b403ceddSGreg Roach            "cp -r vendor/ webtrees/vendor/",
108006094b9SGreg Roach            "@composer webtrees:lang",
109006094b9SGreg Roach            "for FILE in resources/lang/*/messages.php; do cp $FILE webtrees/$FILE; done",
110538cf0f4SGreg Roach            "zip --quiet --recurse-paths --move -9 webtrees-`git describe`.zip webtrees"
111f872a3beSGreg Roach        ],
112289701c8SGreg Roach        "webtrees:pre-commit-hook": [
113289701c8SGreg Roach            "@composer webtrees:phpcs",
1149b152ff9SGreg Roach            "@composer webtrees:phpstan",
115289701c8SGreg Roach            "@composer webtrees:test"
116289701c8SGreg Roach        ],
1173d9f187dSGreg Roach        "webtrees:check": [
1184686330aSGreg Roach            "### PHP-CODE-SNIFFER",
119289701c8SGreg Roach            "@composer webtrees:phpcs",
1205781ea1fSGreg Roach            "### PHPSTAN",
1219b152ff9SGreg Roach            "@composer webtrees:phpstan",
1225781ea1fSGreg Roach            "### PSALM",
1233df1e584SGreg Roach            "@composer webtrees:psalm"
1245781ea1fSGreg Roach        ],
125289701c8SGreg Roach        "webtrees:phpcs": [
12674d6dc0eSGreg Roach            "@composer global require squizlabs/php_codesniffer=* --quiet",
127bd29d468SGreg Roach            "~/.composer/vendor/bin/phpcs --colors --extensions=php   --standard=PSR12 --exclude=Generic.Files.LineLength index.php app tests",
128a2b3008fSGreg Roach            "#~/.composer/vendor/bin/phpcs --colors --extensions=phtml --standard=PSR12 --exclude=Generic.Files.LineLength resources/views",
129bbae5905SGreg Roach            "~/.composer/vendor/bin/phpcs --colors --extensions=css resources/css"
1305781ea1fSGreg Roach        ],
131289701c8SGreg Roach        "webtrees:phpstan": [
132289701c8SGreg Roach            "@composer global require --quiet phpstan/phpstan=*",
133289701c8SGreg Roach            "@composer global require --quiet phpstan/extension-installer=*",
134289701c8SGreg Roach            "@composer global require --quiet phpstan/phpstan-deprecation-rules=*",
135289701c8SGreg Roach            "@composer global require --quiet phpstan/phpstan-strict-rules=*",
136289701c8SGreg Roach            "@composer global require --quiet phpstan/phpstan-phpunit=*",
137dcb3a022SGreg Roach            "@composer install --quiet",
138ef475b14SGreg Roach            "~/.composer/vendor/bin/phpstan analyze --memory-limit=-1 --xdebug --level=max index.php app",
139dcb3a022SGreg Roach            "@composer install --no-dev --quiet"
1405781ea1fSGreg Roach        ],
14147ab6ec4SGreg Roach        "webtrees:phpstan-baseline": [
14247ab6ec4SGreg Roach            "@composer global require --quiet phpstan/phpstan=*",
14347ab6ec4SGreg Roach            "@composer global require --quiet phpstan/extension-installer=*",
14447ab6ec4SGreg Roach            "@composer global require --quiet phpstan/phpstan-deprecation-rules=*",
14547ab6ec4SGreg Roach            "@composer global require --quiet phpstan/phpstan-strict-rules=*",
14647ab6ec4SGreg Roach            "@composer global require --quiet phpstan/phpstan-phpunit=*",
14747ab6ec4SGreg Roach            "@composer install --quiet",
14847ab6ec4SGreg Roach            "~/.composer/vendor/bin/phpstan analyze --level=max --generate-baseline=phpstan-baseline.neon index.php app",
14947ab6ec4SGreg Roach            "@composer install --no-dev --quiet"
15047ab6ec4SGreg Roach        ],
151289701c8SGreg Roach        "webtrees:psalm": [
152dcb3a022SGreg Roach            "@composer global require --quiet vimeo/psalm",
1535781ea1fSGreg Roach            "@composer install --quiet",
1541c6adce8SGreg Roach            "~/.composer/vendor/bin/psalm --threads=8 --php-version=8.1",
1555781ea1fSGreg Roach            "@composer install --no-dev --quiet"
156425578caSGreg Roach        ],
157289701c8SGreg Roach        "webtrees:test": [
158289701c8SGreg Roach            "@composer install --quiet",
159289701c8SGreg Roach            "@php vendor/bin/phpunit",
160289701c8SGreg Roach            "@composer install --no-dev --quiet"
161289701c8SGreg Roach        ],
16286b91143SGreg Roach        "webtrees:coverage": [
1635781ea1fSGreg Roach            "@composer install --dev --quiet",
16486b91143SGreg Roach            "vendor/bin/phpunit --coverage-html=tests/coverage",
1655781ea1fSGreg Roach            "@composer install --no-dev --quiet"
16686b91143SGreg Roach        ],
167006094b9SGreg Roach        "webtrees:lang": [
168006094b9SGreg Roach            "Fisharebest\\Webtrees\\Console\\ComposerScripts::languageFiles"
169006094b9SGreg Roach        ],
1703d9f187dSGreg Roach        "webtrees:po": [
171692edf9aSGreg Roach            "sed -i.bak -e 's/\\(I18N::[^)]*[)]\\)/<?php echo \\1; ?>/g' resources/xml/reports/*.xml",
172f7fac239SGreg 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",
173692edf9aSGreg Roach            "find resources/xml/reports/ -name '*.xml' -exec mv {}.bak {} \\;",
174362b8464SGreg Roach            "find resources/lang -name '*.po' -exec msgmerge --no-wrap --sort-output --no-fuzzy-matching --quiet --output={} {} resources/lang/webtrees.pot \\;"
17597c22350SGreg Roach        ],
17697c22350SGreg Roach        "webtrees:png": [
17708362db4SGreg Roach            "find resources/css -name *.png -exec pngquant --ext .png --force --skip-if-larger --speed 1 {} \\;",
17808362db4SGreg Roach            "find resources/css -name *.png -exec pngcrush -rem allb -brute -reduce {} {} \\;",
17908362db4SGreg Roach            "find resources/css -name *.png -exec optipng -o7 -zm1-9 {} \\;"
180db6a3ae9SGreg Roach        ]
181db6a3ae9SGreg Roach    },
182cb14bb54SGreg Roach    "scripts-descriptions": {
1833d9f187dSGreg Roach        "webtrees:build": "Create a distribution file (webtrees.zip)",
1843d9f187dSGreg Roach        "webtrees:check": "Run various static analysis tools",
18586b91143SGreg Roach        "webtrees:coverage": "Generate test coverage report",
186006094b9SGreg Roach        "webtrees:lang": "Compile the language files (messages.php)",
18774d6dc0eSGreg Roach        "webtrees:po": "Update the language (webtrees.pot, *.po)"
188ed285daaSGreg Roach    }
189ed285daaSGreg Roach}
190