Skip to content

Commit

Permalink
Fix usage with Composer <2.3 (#132)
Browse files Browse the repository at this point in the history
Closes #124
  • Loading branch information
theofidry authored Jul 14, 2022
1 parent c4cefbc commit 2476470
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
unit-tests:
runs-on: "ubuntu-latest"
name: "Unit Tests on PHP ${{ matrix.php }}"
name: "Unit Tests on PHP ${{ matrix.php }} and ${{ matrix.tools }}"
strategy:
fail-fast: false
matrix:
Expand All @@ -20,6 +20,10 @@ jobs:
- "7.4"
- "8.0"
- "8.1"
tools: [ "composer" ]
include:
- php: "7.2"
tools: "composer:v2.0"

steps:
- name: "Check out repository code"
Expand All @@ -29,7 +33,7 @@ jobs:
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php }}"
tools: "composer"
tools: "${{ matrix.tools }}"

- name: "Install Composer dependencies"
uses: "ramsey/composer-install@v2"
Expand Down
3 changes: 2 additions & 1 deletion src/Command/BinCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ public function isProxyCommand(): bool

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

$this->logger->logDebug(
Expand Down

0 comments on commit 2476470

Please sign in to comment.