Skip to content

Commit 1ae060d

Browse files
Seldaeknicolas-grekas
authored andcommitted
Fix InformationOperation breaking on latest Composer 2.x
1 parent 5c71110 commit 1ae060d

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/InformationOperation.php

+11-5
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,18 @@
22

33
namespace Symfony\Flex;
44

5-
use Composer\DependencyResolver\Operation\SolverOperation;
5+
use Composer\DependencyResolver\Operation\OperationInterface;
66
use Composer\Package\PackageInterface;
77

88
/**
99
* @author Maxime Hélias <[email protected]>
1010
*/
11-
class InformationOperation extends SolverOperation
11+
class InformationOperation implements OperationInterface
1212
{
1313
private $package;
1414

15-
public function __construct(PackageInterface $package, $reason = null)
15+
public function __construct(PackageInterface $package)
1616
{
17-
parent::__construct($reason);
18-
1917
$this->package = $package;
2018
}
2119

@@ -62,4 +60,12 @@ public function __toString()
6260
{
6361
return $this->show(false);
6462
}
63+
64+
/**
65+
* Compatibility for Composer 1.x, not needed in Composer 2.
66+
*/
67+
public function getReason()
68+
{
69+
return null;
70+
}
6571
}

0 commit comments

Comments
 (0)