src/Plugin/Patches.php
public function resolvePatches(PackageEvent $event)
    {
        // No need to resolve patches more than once.
        if ($this->patchesResolved) {
            return;
        }

        // Let each resolver discover patches and add them to the PatchCollection.
        /** @var ResolverInterface $resolver */
        foreach ($this->getPatchResolvers() as $resolver) {
            if (!in_array(get_class($resolver), $this->getConfig('disable-resolvers'), true)) {
                $resolver->resolve($this->patchCollection, $event);
            } else {
                if ($this->io->isVerbose()) {
                    $this->io->write('<info>  - Skipping resolver ' . get_class($resolver) . '</info>');
                }
            }
        }

        // Make sure we only do this once.
        $this->patchesResolved = true;
    }
public function resolvePatches(PackageEvent $event)
    {
        // No need to resolve patches more than once.
        if ($this->patchesResolved) {
            return;
        }

        // Let each resolver discover patches and add them to the PatchCollection.
        /** @var ResolverInterface $resolver */
        foreach ($this->getPatchResolvers() as $resolver) {
            if (!in_array(get_class($resolver), $this->getConfig('disable-resolvers'), true)) {
                $resolver->resolve($this->patchCollection, $event);
            } else {
                if ($this->io->isVerbose()) {
                    $this->io->write('<info>  - Skipping resolver ' . get_class($resolver) . '</info>');
                }
            }
        }

        // Make sure we only do this once.
        $this->patchesResolved = true;
    }
public function resolvePatches ( PackageEvent $ event ) { // No need to resolve patches more than once. if ( $ this -> patchesResolved ) { return ; } // Let each resolver discover patches and add them to the PatchCollection. /** @var ResolverInterface $resolver */ foreach ( $ this -> getPatchResolvers ( ) as $ resolver ) { if ( ! in_array ( get_class ( $ resolver ) , $ this -> getConfig ( 'disable-resolvers' ) , true ) ) { $ resolver -> resolve ( $ this -> patchCollection , $ event ) ; } else { if ( $ this -> io -> isVerbose ( ) ) { $ this -> io -> write ( '<info>  - Skipping resolver ' . get_class ( $ resolver ) . '</info>' ) ; } } } // Make sure we only do this once. $ this -> patchesResolved = true ; }
Gather patches that need to be applied to the current set of packages.

Note that this work is done unconditionally if this plugin is enabled,
even if patching is disabled in any way. The point where patches are applied
is where the work will be skipped. It's done this way to ensure that
patching can be disabled temporarily in a way that doesn't affect the
contents of composer.lock.

@param PackageEvent $event
The PackageEvent passed by Composer
Gather patches that need to be applied to the current set of packages .