xref: /webtrees/composer.json (revision dcb3a02248c0190dd5bd4f500e55c77d85f105b7)
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": [
19915db8c4SGreg Roach            "modules_v4/",
2074d6dc0eSGreg Roach            "tests/TestCase.php",
2174d6dc0eSGreg Roach            "tests/MockGlobalFunctions.php"
2284e2cf4eSGreg Roach        ]
2384e2cf4eSGreg Roach    },
247286a40cSGreg Roach    "config": {
257286a40cSGreg Roach        "platform": {
264459dc9aSGreg Roach            "php": "7.1.8"
2722acdb08SGreg Roach        },
28425578caSGreg Roach        "sort-packages": true,
29425578caSGreg Roach        "process-timeout": 3600
307286a40cSGreg Roach    },
31ed285daaSGreg Roach    "require": {
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": "*",
407286a40cSGreg Roach        "ext-simplexml": "*",
413b3cfeeaSGreg Roach        "ext-xml": "*",
425f9f5f94SRico Sonntag        "ext-zip": "*",
43ee4364daSGreg Roach        "aura/router": "~3.1",
44362be83aSGreg Roach        "doctrine/dbal": "~2.9",
4550d6f48cSGreg Roach        "ezyang/htmlpurifier": "~4.10",
466ccdf4f0SGreg Roach        "fig/http-message-util": "^1.1",
47d592f2ecSGreg Roach        "fisharebest/algorithm": "~1.3",
4893686a36SGreg Roach        "fisharebest/ext-calendar": "~2.5",
49d1315a43SGreg Roach        "fisharebest/flysystem-chroot-adapter": "~1.0",
5050b23b0dSGreg Roach        "fisharebest/localization": "~1.15",
51cc26b3c3SGreg Roach        "guzzlehttp/guzzle": "~6.0",
524525f50bSGreg Roach        "illuminate/cache": "~5.8",
534525f50bSGreg Roach        "illuminate/container": "~5.8",
544525f50bSGreg Roach        "illuminate/database": "~5.8",
554525f50bSGreg Roach        "illuminate/support": "~5.8",
56476e0b58SGreg Roach        "league/commonmark": "~1.0",
574a1f1d43SGreg Roach        "league/commonmark-ext-table": "*",
58d592f2ecSGreg Roach        "league/flysystem": "~1.0",
59d1315a43SGreg Roach        "league/flysystem-cached-adapter": "~1.0",
60d592f2ecSGreg Roach        "league/flysystem-ziparchive": "~1.0",
61e70f282eSGreg Roach        "league/glide": "~1.3",
624874f72dSGreg Roach        "middlewares/client-ip": "~1.3",
634459dc9aSGreg Roach        "nesbot/carbon": "~2.14",
646ccdf4f0SGreg Roach        "nyholm/psr7": "~1.1",
656ccdf4f0SGreg Roach        "nyholm/psr7-server": "~0.3",
666ccdf4f0SGreg Roach        "oscarotero/middleland": "~1.0",
676ccdf4f0SGreg Roach        "psr/http-message": "~1.0",
686ccdf4f0SGreg Roach        "psr/http-server-handler": "~1.0",
696ccdf4f0SGreg Roach        "psr/http-server-middleware": "~1.0",
70e70f282eSGreg Roach        "ramsey/uuid": "~3.8",
718b04670aSGreg Roach        "swiftmailer/swiftmailer": "~6.1",
72e70f282eSGreg Roach        "symfony/expression-language": "~4.2",
73e70f282eSGreg Roach        "symfony/http-foundation": "~4.2",
74e70f282eSGreg Roach        "symfony/http-kernel": "~4.2",
7508738c04SGreg Roach        "symfony/polyfill-mbstring": "~1.11",
7608738c04SGreg Roach        "symfony/polyfill-php72": "~1.11",
774a1f1d43SGreg Roach        "tecnickcom/tcpdf": "~6.2"
7810a8d14fSGreg Roach    },
79db7d25eeSGreg Roach    "require-dev": {
80c42d24a9SGreg Roach        "ext-pdo_sqlite": "*",
814525f50bSGreg Roach        "ext-sqlite3": "*",
82006094b9SGreg Roach        "composer/composer": "~1.8",
834525f50bSGreg Roach        "league/flysystem-memory": "~1.0",
844525f50bSGreg Roach        "maximebf/debugbar": "~1.15",
854525f50bSGreg Roach        "php-coveralls/php-coveralls": "~2.1",
864525f50bSGreg Roach        "phpunit/phpunit": "~7.0|~8.0"
87db7d25eeSGreg Roach    },
88c42d24a9SGreg Roach    "suggest": {
89c42d24a9SGreg Roach        "ext-pdo_mysql": "Required to use MySQL for database storage",
90c42d24a9SGreg Roach        "ext-pdo_sqlite": "Required to use SQLite for database storage",
91764facb7SGreg Roach        "ext-pdo_pgsql": "Required to use PostgreSQL for database storage",
92c42d24a9SGreg Roach        "ext-pdo_sqlsvr": "Required to use SQL Server for database storage"
93c42d24a9SGreg Roach    },
94db6a3ae9SGreg Roach    "scripts": {
953d9f187dSGreg Roach        "webtrees:build": [
96f872a3beSGreg Roach            "rm -Rf webtrees/",
97f872a3beSGreg Roach            "git archive --prefix=webtrees/ HEAD --format=tar | tar -x",
98006094b9SGreg Roach            "@composer webtrees:lang",
99006094b9SGreg Roach            "for FILE in resources/lang/*/messages.php; do cp $FILE webtrees/$FILE; done",
100bcfab406SGreg Roach            "zip --quiet --recurse-paths --move -9 webtrees.zip webtrees"
101f872a3beSGreg Roach        ],
102289701c8SGreg Roach        "webtrees:pre-commit-hook": [
103289701c8SGreg Roach            "@composer webtrees:phpcs",
104*dcb3a022SGreg Roach            "@composer webtrees:phpstan -- --level=0",
1055e23c3aaSGreg Roach            "@composer webtrees:phan -- --minimum-severity=6",
106289701c8SGreg Roach            "@composer webtrees:test"
107289701c8SGreg Roach        ],
1083d9f187dSGreg Roach        "webtrees:check": [
1094686330aSGreg Roach            "### PHP-CODE-SNIFFER",
110289701c8SGreg Roach            "@composer webtrees:phpcs",
1115781ea1fSGreg Roach            "### PHPSTAN",
112*dcb3a022SGreg Roach            "@composer webtrees:phpstan -- --level=1",
113*dcb3a022SGreg Roach            "### PHAN",
114*dcb3a022SGreg Roach            "@composer webtrees:phan -- --minimum-severity=5",
1155781ea1fSGreg Roach            "### PSALM",
1163df1e584SGreg Roach            "@composer webtrees:psalm"
1175781ea1fSGreg Roach        ],
118289701c8SGreg Roach        "webtrees:phpcs": [
11974d6dc0eSGreg Roach            "@composer global require squizlabs/php_codesniffer=* --quiet",
1202279b4f3SGreg Roach            "phpcs --standard=PSR12 -p -s --exclude=Generic.Files.LineLength index.php app modules_v4 tests"
1215781ea1fSGreg Roach        ],
122289701c8SGreg Roach        "webtrees:phan": [
12374d6dc0eSGreg Roach            "@composer global require phan/phan=*",
12474d6dc0eSGreg Roach            "@composer install --quiet",
1252279b4f3SGreg Roach            "phan --color --progress-bar --dead-code-detection --signature-compatibility --strict-type-checking --directory=app --directory=modules_v4 --directory=vendor --exclude-directory-list=vendor",
1265781ea1fSGreg Roach            "@composer install --no-dev --quiet"
1275781ea1fSGreg Roach        ],
128289701c8SGreg Roach        "webtrees:phpstan": [
129289701c8SGreg Roach            "@composer global require --quiet phpstan/phpstan=*",
130289701c8SGreg Roach            "@composer global require --quiet phpstan/extension-installer=*",
131289701c8SGreg Roach            "@composer global require --quiet phpstan/phpstan-deprecation-rules=*",
132289701c8SGreg Roach            "@composer global require --quiet phpstan/phpstan-strict-rules=*",
133289701c8SGreg Roach            "@composer global require --quiet phpstan/phpstan-phpunit=*",
134*dcb3a022SGreg Roach            "@composer install --quiet",
135*dcb3a022SGreg Roach            "phpstan analyze app modules_v4 index.php",
136*dcb3a022SGreg Roach            "@composer install --no-dev --quiet"
1375781ea1fSGreg Roach        ],
138289701c8SGreg Roach        "webtrees:psalm": [
139*dcb3a022SGreg Roach            "@composer global require --quiet vimeo/psalm",
1405781ea1fSGreg Roach            "@composer install --quiet",
1415781ea1fSGreg Roach            "psalm",
1425781ea1fSGreg Roach            "@composer install --no-dev --quiet"
143425578caSGreg Roach        ],
144289701c8SGreg Roach        "webtrees:test": [
145289701c8SGreg Roach            "@composer install --quiet",
146289701c8SGreg Roach            "@php vendor/bin/phpunit",
147289701c8SGreg Roach            "@composer install --no-dev --quiet"
148289701c8SGreg Roach        ],
14986b91143SGreg Roach        "webtrees:coverage": [
1505781ea1fSGreg Roach            "@composer install --dev --quiet",
15186b91143SGreg Roach            "vendor/bin/phpunit --coverage-html=tests/coverage",
1525781ea1fSGreg Roach            "@composer install --no-dev --quiet"
15386b91143SGreg Roach        ],
154006094b9SGreg Roach        "webtrees:lang": [
155006094b9SGreg Roach            "Fisharebest\\Webtrees\\Console\\ComposerScripts::languageFiles"
156006094b9SGreg Roach        ],
1573d9f187dSGreg Roach        "webtrees:po": [
158692edf9aSGreg Roach            "sed -i.bak -e 's/\\(I18N::[^)]*[)]\\)/<?php echo \\1; ?>/g' resources/xml/reports/*.xml",
159f7fac239SGreg 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",
160692edf9aSGreg Roach            "find resources/xml/reports/ -name '*.xml' -exec mv {}.bak {} \\;",
161362b8464SGreg Roach            "find resources/lang -name '*.po' -exec msgmerge --no-wrap --sort-output --no-fuzzy-matching --quiet --output={} {} resources/lang/webtrees.pot \\;"
16297c22350SGreg Roach        ],
16397c22350SGreg Roach        "webtrees:png": [
16408362db4SGreg Roach            "find resources/css -name *.png -exec pngquant --ext .png --force --skip-if-larger --speed 1 {} \\;",
16508362db4SGreg Roach            "find resources/css -name *.png -exec pngcrush -rem allb -brute -reduce {} {} \\;",
16608362db4SGreg Roach            "find resources/css -name *.png -exec optipng -o7 -zm1-9 {} \\;"
167db6a3ae9SGreg Roach        ]
168db6a3ae9SGreg Roach    },
169cb14bb54SGreg Roach    "scripts-descriptions": {
1703d9f187dSGreg Roach        "webtrees:build": "Create a distribution file (webtrees.zip)",
1713d9f187dSGreg Roach        "webtrees:check": "Run various static analysis tools",
17286b91143SGreg Roach        "webtrees:coverage": "Generate test coverage report",
173006094b9SGreg Roach        "webtrees:lang": "Compile the language files (messages.php)",
17474d6dc0eSGreg Roach        "webtrees:po": "Update the language (webtrees.pot, *.po)"
17508b342ecSGreg Roach    },
17608b342ecSGreg Roach    "extra": {
17708b342ecSGreg Roach        "branch-alias": {
17808b342ecSGreg Roach            "dev-master": "2.0-dev"
17908b342ecSGreg Roach        }
180ed285daaSGreg Roach    }
181ed285daaSGreg Roach}
182