src/Installer/PluginInstaller.php
public static function postAutoloadDump(\Composer\Script\Event $event)
    {
        $io = $event->getIO();
        $composer = $event->getComposer();

        $vendorDir = $composer->getConfig()->get('vendor-dir');
        $pluginConfig = static::getPluginConfig($vendorDir);

        if (!static::checkAutoloadDump($composer)) {
            if (file_exists($pluginConfig) || is_link($pluginConfig)) {
                $io->write('<info>Deleting Pico plugins file</info>');

                $filesystem = new \Composer\Util\Filesystem();
                $filesystem->unlink($pluginConfig);
            }

            return;
        }

        if (!file_exists($pluginConfig) && !is_link($pluginConfig)) {
            $io->write('<info>Creating Pico plugins file</info>');
        } else {
            $io->write('<info>Updating Pico plugins file</info>');
        }

        $rootPackage = static::getRootPackage($composer);
        $packages = $composer->getRepositoryManager()->getLocalRepository()->getPackages();

        $plugins = $pluginClassNames = array();
        foreach ($packages as $package) {
            if ($package->getType() !== static::PACKAGE_TYPE_PLUGIN) {
                continue;
            }

            $packageName = $package->getName();
            $plugins[$packageName] = static::getInstallName($package, $rootPackage);
            $pluginClassNames[$packageName] = static::getPluginClassNames($package, $rootPackage);
        }

        static::writePluginConfig($pluginConfig, $plugins, $pluginClassNames);
    }
public static function postAutoloadDump(\Composer\Script\Event $event)
    {
        $io = $event->getIO();
        $composer = $event->getComposer();

        $vendorDir = $composer->getConfig()->get('vendor-dir');
        $pluginConfig = static::getPluginConfig($vendorDir);

        if (!static::checkAutoloadDump($composer)) {
            if (file_exists($pluginConfig) || is_link($pluginConfig)) {
                $io->write('<info>Deleting Pico plugins file</info>');

                $filesystem = new \Composer\Util\Filesystem();
                $filesystem->unlink($pluginConfig);
            }

            return;
        }

        if (!file_exists($pluginConfig) && !is_link($pluginConfig)) {
            $io->write('<info>Creating Pico plugins file</info>');
        } else {
            $io->write('<info>Updating Pico plugins file</info>');
        }

        $rootPackage = static::getRootPackage($composer);
        $packages = $composer->getRepositoryManager()->getLocalRepository()->getPackages();

        $plugins = $pluginClassNames = array();
        foreach ($packages as $package) {
            if ($package->getType() !== static::PACKAGE_TYPE_PLUGIN) {
                continue;
            }

            $packageName = $package->getName();
            $plugins[$packageName] = static::getInstallName($package, $rootPackage);
            $pluginClassNames[$packageName] = static::getPluginClassNames($package, $rootPackage);
        }

        static::writePluginConfig($pluginConfig, $plugins, $pluginClassNames);
    }
Called whenever Composer (re)generates the autoloader

Recreates the `pico-plugin.php` in Composer's vendor dir, containing
a mapping of Composer package to Pico plugin class names.

@param \Composer\Script\Event $event
@return void