Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UHF-10462: Remove direct dependency to stage_file_proxy #33

Merged
merged 3 commits into from
Aug 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions src/Update/migrations.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,26 @@ function drupal_tools_update_7() : UpdateResult {

return new UpdateResult(['Updated composer/composer.']);
}

/**
* Remove dependency to drupal/stage_file_proxy if platform config is installed.
*
* Stage file is installed as helfi_platform_config dependency.
*/
function drupal_tools_update_8() : UpdateResult {
$command = ['composer', 'show', 'drupal/helfi_platform_config'];

$process = new Process($command);
$process->run();

if (!$process->isSuccessful()) {
return new UpdateResult(['drupal/helfi_platform_config is not installed. Skipping ...']);
}

$command = ['composer', 'remove', 'drupal/stage_file_proxy'];

$process = new Process($command);
$process->run();

return new UpdateResult(['Removed drupal/stage_file_proxy.']);
}
Loading