public function __construct(Composer
$composer, IOInterface
$io) { $this->composer =
$composer;
$this->io =
$io;
$this->manageOptions =
new ManageOptions($composer);
$this->manageAllowedPackages =
new AllowedPackages($composer,
$io,
$this->manageOptions
);
} /**
* Registers post-package events if the 'require' command was called.
*/
public function requireWasCalled() { // In order to differentiate between post-package events called after
// 'composer require' vs. the same events called at other times, we will
// only install our handler when a 'require' event is detected.
$this->postPackageListeners
[] =
$this->manageAllowedPackages;
}