-
-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix InformationOperation breaking on latest Composer 2.x
- Loading branch information
Showing
1 changed file
with
11 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,20 +2,18 @@ | |
|
||
namespace Symfony\Flex; | ||
|
||
use Composer\DependencyResolver\Operation\SolverOperation; | ||
use Composer\DependencyResolver\Operation\OperationInterface; | ||
use Composer\Package\PackageInterface; | ||
|
||
/** | ||
* @author Maxime Hélias <[email protected]> | ||
*/ | ||
class InformationOperation extends SolverOperation | ||
class InformationOperation implements OperationInterface | ||
{ | ||
private $package; | ||
|
||
public function __construct(PackageInterface $package, $reason = null) | ||
public function __construct(PackageInterface $package) | ||
{ | ||
parent::__construct($reason); | ||
|
||
$this->package = $package; | ||
} | ||
|
||
|
@@ -62,4 +60,12 @@ public function __toString() | |
{ | ||
return $this->show(false); | ||
} | ||
|
||
/** | ||
* Compatibility for Composer 1.x, not needed in Composer 2 | ||
*/ | ||
public function getReason() | ||
{ | ||
return null; | ||
} | ||
} |