Skip to content

Commit 0ba0123

Browse files
committed
chore: Clean up Composer build scripts
1 parent b008504 commit 0ba0123

File tree

2 files changed

+14
-42
lines changed

2 files changed

+14
-42
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
*~
12
*.d
23
*.dep
34
*.gcda
@@ -8,6 +9,7 @@
89
*.o
910
*.profraw
1011
*.tgz
12+
.idea
1113
.libs
1214
.phpunit.result.cache
1315
Makefile

composer.json

Lines changed: 12 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@
3737
},
3838
"config": {
3939
"allow-plugins": {
40-
"php-http/discovery": true,
40+
"captainhook/plugin-composer": true,
4141
"dealerdirect/phpcodesniffer-composer-installer": true,
42-
"ramsey/composer-repl": true,
43-
"phpstan/extension-installer": true,
4442
"ergebnis/composer-normalize": true,
45-
"captainhook/plugin-composer": true,
46-
"ramsey/devtools": true,
47-
"pestphp/pest-plugin": true
43+
"pestphp/pest-plugin": true,
44+
"php-http/discovery": true,
45+
"phpstan/extension-installer": true,
46+
"ramsey/composer-repl": true,
47+
"ramsey/devtools": true
4848
},
4949
"sort-packages": true
5050
},
@@ -109,57 +109,27 @@
109109
"./configure --enable-ecma_intl --enable-criterion --enable-code-coverage",
110110
"make -j$(nproc) dev"
111111
],
112-
"dev:build:local": [
113-
"./tools/tool-check",
114-
"make clean || true",
115-
"./tools/phpize",
116-
"PKG_CONFIG_PATH=$(brew --prefix icu4c)/lib/pkgconfig ./configure --enable-ecma_intl --enable-criterion --with-php-config=tools/php-config",
117-
"make -j$(nproc) dev"
118-
],
119-
"dev:build:local:coverage": [
120-
"./tools/tool-check",
121-
"make clean || true",
122-
"./tools/phpize",
123-
"PKG_CONFIG_PATH=$(brew --prefix icu4c)/lib/pkgconfig ./configure --enable-ecma_intl --enable-criterion --enable-code-coverage --with-php-config=tools/php-config",
124-
"make -j$(nproc) dev"
125-
],
126112
"dev:docker:run": [
127113
"Composer\\Config::disableProcessTimeout",
128114
"docker compose up -d --build",
129115
"docker exec -it php-ecma-intl-ext bash || true",
130116
"docker compose down"
131117
],
132-
"dev:test:criterion": "LC_ALL=C make -j$(nproc) criterion",
118+
"dev:test:criterion": [
119+
"Composer\\Config::disableProcessTimeout",
120+
"LC_ALL=C make -j$(nproc) criterion"
121+
],
133122
"dev:test:memcheck": "LC_ALL=C USE_ZEND_ALLOC=0 ZEND_DONT_UNLOAD_MODULES=1 php run-tests.php -q -m --show-diff --show-mem --color -n -d extension=\"$PWD/modules/ecma_intl.so\"",
134123
"dev:test:pest": "LC_ALL=C php -d extension=\"$PWD/modules/ecma_intl.so\" vendor/bin/pest",
135-
"dev:test:pest:local": [
136-
"./tools/tool-check",
137-
"LC_ALL=C ./tools/php -d extension=\"$PWD/modules/ecma_intl.so\" vendor/bin/pest"
138-
],
139-
"dev:test:phpt": "LC_ALL=C php run-tests.php -q --show-diff --color -n -d extension=\"$PWD/modules/ecma_intl.so\"",
140-
"dev:test:phpt:local": [
141-
"./tools/tool-check",
142-
"LC_ALL=C ./tools/php run-tests.php -q --show-diff --color -n -d extension=\"$PWD/modules/ecma_intl.so\""
143-
],
144-
"local": "@dev:build:local",
145-
"test:local": [
146-
"@dev:test:phpt:local",
147-
"@dev:test:criterion",
148-
"@dev:test:pest:local"
149-
]
124+
"dev:test:phpt": "LC_ALL=C php run-tests.php -q --show-diff --color -n -d extension=\"$PWD/modules/ecma_intl.so\""
150125
},
151126
"scripts-descriptions": {
152127
"build": "Alias for dev:build; compiles the extension",
153128
"dev:build": "Compiles the extension",
154-
"dev:build:local": "Compiles the extension using php, phpize, and php-config configured in ./tools",
155129
"dev:docker:run": "Creates, runs, and opens a shell to a container for local development and testing",
156130
"dev:test:criterion": "Runs Criterion unit tests",
157131
"dev:test:memcheck": "Runs PHPT tests through Valgrind to check for memory leaks.",
158132
"dev:test:pest": "Runs Pest tests",
159-
"dev:test:pest:local": "Runs Pest tests using php, phpize, and php-config configured in ./tools",
160-
"dev:test:phpt": "Runs PHPT tests",
161-
"dev:test:phpt:local": "Runs PHPT tests using php, phpize, and php-config configured in ./tools",
162-
"local": "Alias for dev:build:local",
163-
"test:local": "Runs all tests using php, phpize, and php-config configured in ./tools"
133+
"dev:test:phpt": "Runs PHPT tests"
164134
}
165135
}

0 commit comments

Comments
 (0)