public function onPostPackageInstall(PackageEvent $event)
    {
        $op = $event->getOperation();
        if ($op instanceof InstallOperation) {
            $package = $op->getPackage()->getName();
            if ($package === self::PACKAGE_NAME) {
                $this->logger->info('composer-merge-plugin installed');
                $this->state->setFirstInstall(true);
                $this->state->setLocked(
                    $event->getComposer()->getLocker()->isLocked()
                );
            }
        }
    }
public function onPostPackageInstall(PackageEvent $event)
    {
        $op = $event->getOperation();
        if ($op instanceof InstallOperation) {
            $package = $op->getPackage()->getName();
            if ($package === self::PACKAGE_NAME) {
                $this->logger->info('composer-merge-plugin installed');
                $this->state->setFirstInstall(true);
                $this->state->setLocked(
                    $event->getComposer()->getLocker()->isLocked()
                );
            }
        }
    }
public function onPostPackageInstall ( PackageEvent $ event ) { $ op = $ event -> getOperation ( ) ; if ( $ op instanceof InstallOperation ) { $ package = $ op -> getPackage ( ) -> getName ( ) ; if ( $ package === self :: PACKAGE_NAME ) { $ this -> logger -> info ( 'composer-merge-plugin installed' ) ; $ this -> state -> setFirstInstall ( true ) ; $ this -> state -> setLocked ( $ event -> getComposer ( ) -> getLocker ( ) -> isLocked ( ) ) ; } } }
Handle an event callback following installation of a new package by
checking to see if the package that was installed was our plugin.

@param PackageEvent $event
Handle an event callback following installation of a new package by checking to see if the package that was installed was our plugin .