ComposerFallback
API reference › Foxy › Fallback › ComposerFallback
Restores Composer’s lock file and installed dependencies after an asset failure.
Methods
Section titled “Methods”| Method | Description | Defined 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 |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”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
| Parameter | Type | Description |
|---|---|---|
$composer | Composer\ | The composer. |
$io | Composer\ | The IO. |
$config | Foxy\ | The config. |
$input | Symfony\ | The input. |
$fs | Composer\ | The composer filesystem. |
$installer | Composer\ | The installer. |
restore()
Section titled “restore() ”public function restore(): voidRestores the captured Composer state.
The default installer suppresses project scripts; an injected installer retains its event-dispatcher behavior.
Throws
save()
Section titled “save() ”public function save(): selfCaptures the lock file and vendor-directory state when Composer fallback is enabled.
Returns
self