Skip to content

Commit 9ba632c

Browse files
authored
Update dev build config
* Use Composer 2 in dev builds * Remove composer-bin-plugin
1 parent 9b6ba7a commit 9ba632c

File tree

7 files changed

+1474
-1876
lines changed

7 files changed

+1474
-1876
lines changed

.platform.app.yaml

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: app
2-
type: php:7.3
3-
disk: 128
2+
type: php:7.4
3+
4+
dependencies:
5+
php:
6+
composer/composer: "^2"
47

58
hooks:
69
build: |
@@ -9,7 +12,13 @@ hooks:
912
1013
export version=dev-"$PLATFORM_TREE_ID"
1114
12-
composer bin all install
15+
composer install -a --no-dev --no-interaction
16+
17+
composer install -d vendor-bin/box --no-interaction
18+
19+
mkdir -p vendor/bin
20+
ln -s "$(realpath vendor-bin/box/vendor/bin/box)" vendor/bin/box
21+
1322
./bin/platform self:build --no-composer-rebuild --yes --replace-version "$version" --output web/platform.phar
1423
1524
cat << EOF > .environment

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:7.3-cli
1+
FROM php:7.4-cli
22

33
ARG USER_ID
44
ARG GROUP_ID

composer.json

+1-5
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@
4343
},
4444
"require-dev": {
4545
"phpunit/phpunit": "^4.3 !=4.8.0",
46-
"drush/drush": "^8.0",
47-
"bamarni/composer-bin-plugin": "^1.2"
46+
"drush/drush": "^8.0"
4847
},
4948
"authors": [
5049
{
@@ -60,9 +59,6 @@
6059
"config": {
6160
"platform": {
6261
"php": "5.5.9"
63-
},
64-
"allow-plugins": {
65-
"bamarni/composer-bin-plugin": true
6662
}
6763
},
6864
"scripts": {

composer.lock

+1-51
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/test/build-and-install.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if [ ! -d vendor ]; then
99
composer install
1010
fi
1111
if [ ! -d vendor-bin/box/vendor ]; then
12-
composer bin all install
12+
composer -d vendor-bin/box install
1313
fi
1414

1515
function cleanup {

src/Command/Self/SelfBuildCommand.php

+4-7
Original file line numberDiff line numberDiff line change
@@ -99,28 +99,25 @@ protected function execute(InputInterface $input, OutputInterface $output)
9999
// Wipe the vendor directory to be extra sure.
100100
$shell->execute(['rm', '-rf', 'vendor'], CLI_ROOT, false);
101101

102-
// We cannot use --no-dev, as that would exclude the
103-
// composer-bin-plugin tool.
104102
$shell->execute([
105103
'composer',
106104
'install',
107105
'--classmap-authoritative',
108106
'--no-interaction',
109107
'--no-progress',
108+
'--no-dev',
110109
], CLI_ROOT, true, false);
111110

112-
// Install composer-bin-plugin dependencies.
111+
// Install Box.
113112
$shell->execute([
114113
'composer',
115-
'bin',
116-
'all',
117114
'install',
118115
'--no-interaction',
119116
'--no-progress',
120-
], CLI_ROOT, true, false);
117+
], CLI_ROOT . DIRECTORY_SEPARATOR . 'vendor-bin' . DIRECTORY_SEPARATOR . 'box', true, false);
121118
}
122119

123-
$boxArgs = [CLI_ROOT . '/vendor/bin/box', 'compile', '--no-interaction'];
120+
$boxArgs = [CLI_ROOT . '/vendor-bin/box/vendor/bin/box', 'compile', '--no-interaction'];
124121
if ($output->isVeryVerbose()) {
125122
$boxArgs[] = '-vvv';
126123
} elseif ($output->isVerbose()) {

0 commit comments

Comments
 (0)