Skip to content
PHP Ecosystem
Explore

ComposerFallback

API reference › Foxy › Fallback › ComposerFallback

final classFoxy\Fallback\ComposerFallback
ImplementsFallbackInterface
Sourcesrc/Fallback/ComposerFallback.php

Restores Composer’s lock file and installed dependencies after an asset failure.

MethodDescriptionDefined by
__construct()Creates a Composer state fallback.ComposerFallback
restore()Restores the captured Composer state.ComposerFallback
save()Captures the lock file and vendor-directory state when Composer fallback is enabled.ComposerFallback
public function __construct(Composer\Composer $composer, Composer\IO\IOInterface $io, Foxy\Config\Config $config, Symfony\Component\Console\Input\InputInterface $input, Composer\Util\Filesystem|null $fs = null, Composer\Installer|null $installer = null)

Creates a Composer state fallback.

Parameters

ParameterTypeDescription
$composerComposer\ComposerThe composer.
$ioComposer\IO\IOInterfaceThe IO.
$configFoxy\Config\ConfigThe config.
$inputSymfony\Component\Console\Input\InputInterfaceThe input.
$fsComposer\Util\Filesystem|nullThe composer filesystem.
$installerComposer\Installer|nullThe installer.
public function restore(): void

Restores the captured Composer state.

The default installer suppresses project scripts; an injected installer retains its event-dispatcher behavior.

Throws

public function save(): self

Captures the lock file and vendor-directory state when Composer fallback is enabled.

Returns

self