Skip to content

Commit 2476470

Browse files
authored
Fix usage with Composer <2.3 (#132)
Closes #124
1 parent c4cefbc commit 2476470

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.github/workflows/tests.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
jobs:
1111
unit-tests:
1212
runs-on: "ubuntu-latest"
13-
name: "Unit Tests on PHP ${{ matrix.php }}"
13+
name: "Unit Tests on PHP ${{ matrix.php }} and ${{ matrix.tools }}"
1414
strategy:
1515
fail-fast: false
1616
matrix:
@@ -20,6 +20,10 @@ jobs:
2020
- "7.4"
2121
- "8.0"
2222
- "8.1"
23+
tools: [ "composer" ]
24+
include:
25+
- php: "7.2"
26+
tools: "composer:v2.0"
2327

2428
steps:
2529
- name: "Check out repository code"
@@ -29,7 +33,7 @@ jobs:
2933
uses: "shivammathur/setup-php@v2"
3034
with:
3135
php-version: "${{ matrix.php }}"
32-
tools: "composer"
36+
tools: "${{ matrix.tools }}"
3337

3438
- name: "Install Composer dependencies"
3539
uses: "ramsey/composer-install@v2"

src/Command/BinCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ public function isProxyCommand(): bool
9494

9595
public function execute(InputInterface $input, OutputInterface $output): int
9696
{
97-
$config = Config::fromComposer($this->requireComposer());
97+
// Switch to requireComposer() once Composer 2.3 is set as the minimum
98+
$config = Config::fromComposer($this->getComposer());
9899
$currentWorkingDir = getcwd();
99100

100101
$this->logger->logDebug(

0 commit comments

Comments
 (0)