xref: /webtrees/composer.json (revision eb62060aabb1029c872adb00b4ca0ea2eef95331)
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": {
259168a53cSGreg Roach            "php": "8.0.2"
2622acdb08SGreg Roach        },
27425578caSGreg Roach        "sort-packages": true,
28425578caSGreg Roach        "process-timeout": 3600
297286a40cSGreg Roach    },
30ed285daaSGreg Roach    "require": {
319168a53cSGreg Roach        "php": "8.0 - 8.2",
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",
475b8771b0SGreg Roach        "doctrine/dbal": "3.5.1",
48711bae39SGreg Roach        "ezyang/htmlpurifier": "4.16.0",
491f7b3ff5SGreg Roach        "fig/http-message-util": "1.1.5",
50d7d5645bSGreg Roach        "fisharebest/algorithm": "1.6.0",
5107f1e892SGreg Roach        "fisharebest/ext-calendar": "2.6.0",
529168a53cSGreg Roach        "fisharebest/flysystem-chroot-adapter": "3.0.0",
535b8771b0SGreg Roach        "fisharebest/localization": "1.17.0",
5460dee0e8SGreg Roach        "guzzlehttp/guzzle": "7.5.0",
55*eb62060aSGreg Roach        "illuminate/container": "9.43.0",
56*eb62060aSGreg Roach        "illuminate/database": "9.43.0",
57*eb62060aSGreg Roach        "illuminate/support": "9.43.0",
58e5a82967SGreg Roach        "intervention/image": "2.7.2",
59ce08f95aSGreg Roach        "io-developer/php-whois": "4.1.7",
60*eb62060aSGreg Roach        "league/commonmark": "2.3.8",
612699d89cSGreg Roach        "league/flysystem": "3.11.0",
6232bf54bcSGreg Roach        "league/flysystem-ziparchive": "3.10.3",
632699d89cSGreg Roach        "league/flysystem-path-prefixing": "3.10.4",
641f7b3ff5SGreg Roach        "middlewares/client-ip": "2.0.1",
65148ebf9dSGreg Roach        "mlocati/ip-lib": "1.18.0",
662699d89cSGreg Roach        "nesbot/carbon": "2.64.0",
6761485ae9SGreg Roach        "nyholm/psr7": "1.5.1",
681f7b3ff5SGreg Roach        "nyholm/psr7-server": "1.0.2",
691f7b3ff5SGreg Roach        "oscarotero/middleland": "1.0.1",
709168a53cSGreg Roach        "psr/cache": "3.0.0",
711f7b3ff5SGreg Roach        "psr/http-message": "1.0.1",
721f7b3ff5SGreg Roach        "psr/http-server-handler": "1.0.1",
731f7b3ff5SGreg Roach        "psr/http-server-middleware": "1.0.1",
7432bf54bcSGreg Roach        "ramsey/uuid": "4.6.0",
755b8771b0SGreg Roach        "sabre/vobject": "4.5.1",
762699d89cSGreg Roach        "symfony/cache": "6.0.16",
7732bf54bcSGreg Roach        "symfony/expression-language": "6.0.14",
782699d89cSGreg Roach        "symfony/mailer": "6.0.16",
795b8771b0SGreg Roach        "symfony/polyfill-mbstring": "1.27.0",
802699d89cSGreg Roach        "tecnickcom/tcpdf": "6.6.0"
8110a8d14fSGreg Roach    },
82db7d25eeSGreg Roach    "require-dev": {
835ee0e1c4SGreg Roach        "ext-dom": "*",
849f37cd25SGreg Roach        "ext-libxml": "*",
85c42d24a9SGreg Roach        "ext-pdo_sqlite": "*",
864525f50bSGreg Roach        "ext-sqlite3": "*",
875b8771b0SGreg Roach        "composer/composer": "2.4.4",
8832bf54bcSGreg Roach        "league/flysystem-memory": "3.10.3",
89711bae39SGreg Roach        "php-coveralls/php-coveralls": "2.5.3",
90*eb62060aSGreg Roach        "phpunit/phpunit": "9.5.27"
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",
977a468185SGreg Roach        "ext-pdo_sqlsrv": "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",
126bd29d468SGreg Roach            "~/.composer/vendor/bin/phpcs --colors --extensions=php   --standard=PSR12 --exclude=Generic.Files.LineLength index.php app tests",
127a2b3008fSGreg Roach            "#~/.composer/vendor/bin/phpcs --colors --extensions=phtml --standard=PSR12 --exclude=Generic.Files.LineLength resources/views",
128bbae5905SGreg Roach            "~/.composer/vendor/bin/phpcs --colors --extensions=css resources/css"
1295781ea1fSGreg Roach        ],
130289701c8SGreg Roach        "webtrees:phpstan": [
131289701c8SGreg Roach            "@composer global require --quiet phpstan/phpstan=*",
132289701c8SGreg Roach            "@composer global require --quiet phpstan/extension-installer=*",
133289701c8SGreg Roach            "@composer global require --quiet phpstan/phpstan-deprecation-rules=*",
134289701c8SGreg Roach            "@composer global require --quiet phpstan/phpstan-strict-rules=*",
135289701c8SGreg Roach            "@composer global require --quiet phpstan/phpstan-phpunit=*",
136dcb3a022SGreg Roach            "@composer install --quiet",
137ef475b14SGreg Roach            "~/.composer/vendor/bin/phpstan analyze --memory-limit=-1 --xdebug --level=max index.php app",
138dcb3a022SGreg Roach            "@composer install --no-dev --quiet"
1395781ea1fSGreg Roach        ],
14047ab6ec4SGreg Roach        "webtrees:phpstan-baseline": [
14147ab6ec4SGreg Roach            "@composer global require --quiet phpstan/phpstan=*",
14247ab6ec4SGreg Roach            "@composer global require --quiet phpstan/extension-installer=*",
14347ab6ec4SGreg Roach            "@composer global require --quiet phpstan/phpstan-deprecation-rules=*",
14447ab6ec4SGreg Roach            "@composer global require --quiet phpstan/phpstan-strict-rules=*",
14547ab6ec4SGreg Roach            "@composer global require --quiet phpstan/phpstan-phpunit=*",
14647ab6ec4SGreg Roach            "@composer install --quiet",
14747ab6ec4SGreg Roach            "~/.composer/vendor/bin/phpstan analyze --level=max --generate-baseline=phpstan-baseline.neon index.php app",
14847ab6ec4SGreg Roach            "@composer install --no-dev --quiet"
14947ab6ec4SGreg Roach        ],
150289701c8SGreg Roach        "webtrees:psalm": [
151dcb3a022SGreg Roach            "@composer global require --quiet vimeo/psalm",
1525781ea1fSGreg Roach            "@composer install --quiet",
1531c6adce8SGreg Roach            "~/.composer/vendor/bin/psalm --threads=8 --php-version=8.1",
1545781ea1fSGreg Roach            "@composer install --no-dev --quiet"
155425578caSGreg Roach        ],
156289701c8SGreg Roach        "webtrees:test": [
157289701c8SGreg Roach            "@composer install --quiet",
158289701c8SGreg Roach            "@php vendor/bin/phpunit",
159289701c8SGreg Roach            "@composer install --no-dev --quiet"
160289701c8SGreg Roach        ],
16186b91143SGreg Roach        "webtrees:coverage": [
1625781ea1fSGreg Roach            "@composer install --dev --quiet",
16386b91143SGreg Roach            "vendor/bin/phpunit --coverage-html=tests/coverage",
1645781ea1fSGreg Roach            "@composer install --no-dev --quiet"
16586b91143SGreg Roach        ],
166006094b9SGreg Roach        "webtrees:lang": [
167006094b9SGreg Roach            "Fisharebest\\Webtrees\\Console\\ComposerScripts::languageFiles"
168006094b9SGreg Roach        ],
1693d9f187dSGreg Roach        "webtrees:po": [
170692edf9aSGreg Roach            "sed -i.bak -e 's/\\(I18N::[^)]*[)]\\)/<?php echo \\1; ?>/g' resources/xml/reports/*.xml",
171f7fac239SGreg 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",
172692edf9aSGreg Roach            "find resources/xml/reports/ -name '*.xml' -exec mv {}.bak {} \\;",
173362b8464SGreg Roach            "find resources/lang -name '*.po' -exec msgmerge --no-wrap --sort-output --no-fuzzy-matching --quiet --output={} {} resources/lang/webtrees.pot \\;"
17497c22350SGreg Roach        ],
17597c22350SGreg Roach        "webtrees:png": [
17608362db4SGreg Roach            "find resources/css -name *.png -exec pngquant --ext .png --force --skip-if-larger --speed 1 {} \\;",
17708362db4SGreg Roach            "find resources/css -name *.png -exec pngcrush -rem allb -brute -reduce {} {} \\;",
17808362db4SGreg Roach            "find resources/css -name *.png -exec optipng -o7 -zm1-9 {} \\;"
179db6a3ae9SGreg Roach        ]
180db6a3ae9SGreg Roach    },
181cb14bb54SGreg Roach    "scripts-descriptions": {
1823d9f187dSGreg Roach        "webtrees:build": "Create a distribution file (webtrees.zip)",
1833d9f187dSGreg Roach        "webtrees:check": "Run various static analysis tools",
18486b91143SGreg Roach        "webtrees:coverage": "Generate test coverage report",
185006094b9SGreg Roach        "webtrees:lang": "Compile the language files (messages.php)",
18674d6dc0eSGreg Roach        "webtrees:po": "Update the language (webtrees.pot, *.po)"
187ed285daaSGreg Roach    }
188ed285daaSGreg Roach}
189