Skip to content

Commit 4de048f

Browse files
authored
Merge pull request #493 from asgrim/437-bundled-php-exts-with-brew
437: add build provider warning for Homebrew
2 parents 908c186 + 1ea6262 commit 4de048f

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/DependencyResolver/ResolveDependencyWithComposer.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,15 @@ private function assertBuildProviderProvidersBundledExtensions(TargetPlatform $t
142142
));
143143
}
144144

145+
if ($buildProvider === 'Homebrew') {
146+
$identifiedBuildProvider = true;
147+
$this->io->write(sprintf(
148+
'<comment>%sThe bundled extension %s is likely already installed with Homebrew, and you should use that version.</comment>',
149+
$note,
150+
$piePackage->extensionName()->name(),
151+
));
152+
}
153+
145154
if ($identifiedBuildProvider && ! $forceInstallPackageVersion) {
146155
throw BundledPhpExtensionRefusal::forPackage($piePackage);
147156
}

test/end-to-end/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@ FROM homebrew/brew AS test_pie_installs_build_tools_with_brew
2626
RUN brew install php
2727
COPY --from=build_pie_phar /app/pie.phar /usr/local/bin/pie
2828
USER root
29-
RUN apt-get update && apt-get install -y unzip libbz2-dev
29+
RUN apt-get update && apt-get install -y unzip
3030
RUN apt-get remove --allow-remove-essential -y apt
3131
USER linuxbrew
32-
RUN brew install bzip2
33-
RUN pie install --auto-install-build-tools -v php/bz2
32+
RUN pie install --auto-install-build-tools -v asgrim/example-pie-extension
3433
RUN pie show

0 commit comments

Comments
 (0)