summaryrefslogtreecommitdiff
path: root/composer.json
blob: d3340eca9b7a57540ee0a0f35a33566d43e32c64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
{
    "name": "fisharebest/webtrees",
    "description": "webtrees online genealogy",
    "keywords": ["webtrees", "genealogy"],
    "license": "GPL-3.0-or-later",
    "autoload": {
        "psr-4": {
            "Fisharebest\\Webtrees\\": "app/"
        },
        "files": [
            "app/Helpers/functions.php"
        ]
    },
    "autoload-dev": {
        "classmap": [
            "tests/TestCase.php"
        ]
    },
    "config": {
        "platform": {
            "php" : "7.1.3"
        },
        "sort-packages": true,
        "process-timeout": 3600
    },
    "require": {
        "ext-curl": "*",
        "ext-gd": "*",
        "ext-iconv": "*",
        "ext-intl": "*",
        "ext-json": "*",
        "ext-pcre": "*",
        "ext-pdo": "*",
        "ext-session": "*",
        "ext-simplexml": "*",
        "ext-sqlite3": "*",
        "ext-xml": "*",
        "ext-zip": "*",
        "doctrine/dbal": "~2.9",
        "filp/whoops": "~2.3",
        "fisharebest/algorithm": "~1.3",
        "fisharebest/ext-calendar": "~2.5",
        "fisharebest/flysystem-chroot-adapter": "~1.0",
        "fisharebest/localization": "~1.13",
        "guzzlehttp/guzzle": "~6.0",
        "illuminate/cache": "^5.8.0",
        "illuminate/container": "^5.8.0",
        "illuminate/database": "^5.8.0",
        "illuminate/support": "^5.8.0",
        "league/commonmark": "~0.18",
        "league/flysystem": "~1.0",
        "league/flysystem-cached-adapter": "~1.0",
        "league/flysystem-ziparchive": "~1.0",
        "league/glide": "~1.3",
        "ramsey/uuid": "~3.8",
        "swiftmailer/swiftmailer": "~6.1",
        "symfony/expression-language": "~4.2",
        "symfony/http-foundation": "~4.2",
        "symfony/http-kernel": "~4.2",
        "symfony/polyfill-mbstring": "~1.10",
        "symfony/polyfill-php71": "~1.10",
        "symfony/polyfill-php72": "~1.10",
        "tecnickcom/tcpdf": "~6.2",
        "webuni/commonmark-table-extension": "~0.9"
    },
    "require-dev": {
        "ext-sqlite3": "*",
        "ext-pdo_sqlite": "*",
        "league/flysystem-memory": "*",
        "maximebf/debugbar": "*",
        "php-coveralls/php-coveralls": "*",
        "phpunit/phpunit": "*"
    },
    "suggest": {
        "ext-pdo_mysql": "Required to use MySQL for database storage",
        "ext-pdo_sqlite": "Required to use SQLite for database storage",
        "ext-pdo_pgsql": "Required to use PostgreSQ: for database storage",
        "ext-pdo_sqlsvr": "Required to use SQL Server for database storage"
    },
    "scripts": {
       "webtrees:build": [
           "@composer webtrees:mo",
           "git checkout language/en-US.mo",
           "rm -Rf webtrees/",
           "git archive --prefix=webtrees/ HEAD --format=tar | tar -x",
           "cp language/*.mo webtrees/language/",
           "zip --quiet --recurse-paths --move -9 webtrees.zip webtrees"
       ],
       "webtrees:check": [
            "### PHP-CODE-SNIFFER",
            "phpcs --standard=PSR12 -s --exclude=Generic.Files.LineLength,PSR2.ControlStructures.ControlStructureSpacing app routes",
            "### PHAN",
            "PHAN_DISABLE_XDEBUG_WARN=1 phan --target-php-version=7.1 --progress-bar --directory . --exclude-directory-list data,resources,routes,tests,vendor",
            "### PHPSTAN",
            "phpstan --level=7 analyze index.php app",
            "### PSALM",
            "psalm"
        ],
        "webtrees:tools": [
            "### PHAN",
            "@composer global require phan/phan=*",
            "### PSALM",
            "@composer global require vimeo/psalm=*"
        ],
        "webtrees:mo": [
            "for FILE in language/*.po; do msgfmt --output=$(dirname $FILE)/$(basename $FILE .po).mo $FILE; done",
            "rm -Rf data/cache/language*"
        ],
        "webtrees:po": [
            "sed -i.bak -e 's/\\(I18N::[^)]*[)]\\)/<?php echo \\1; ?>/g' resources/xml/reports/*.xml",
            "git grep -I --name-only --fixed-strings -e I18N:: -- '*.php' '*.xml' | xargs xgettext --package-name=webtrees --package-version=1.0 --msgid-bugs-address=i18n@webtrees.net --output=language/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",
            "find resources/xml/reports/ -name '*.xml' -exec mv {}.bak {} \\;",
            "find language -name '*.po' -exec msgmerge --no-wrap --sort-output --no-fuzzy-matching --quiet --output={} {} language/webtrees.pot \\;"
        ],
        "webtrees:png": [
            "find resources/css -name *.png -exec pngquant --ext .png --force --skip-if-larger --speed 1 {} \\;"
        ]
    },
    "scripts-descriptions": {
        "webtrees:build": "Create a distribution file (webtrees.zip)",
        "webtrees:check": "Run various static analysis tools",
        "webtrees:mo": "Compile the language files (*.mo)",
        "webtrees:po": "Update the language (webtrees.pot, *.po)",
        "webtrees:tools": "Install the tools needed to run webtrees-check"
    },
    "extra": {
        "branch-alias": {
            "dev-master": "2.0-dev"
        }
    }
}