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-7882: Remove media_entity_soundcloud dependency #440

Merged
merged 1 commit into from
Feb 17, 2023
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ permissions:
- 'create paragraph library item'
- 'create remote entities'
- 'create remote_video media'
- 'create soundcloud media'
- 'create terms in keywords'
- 'create url aliases'
- 'delete all revisions'
Expand All @@ -53,7 +52,6 @@ permissions:
- 'delete any media'
- 'delete any page content'
- 'delete any remote_video media'
- 'delete any soundcloud media'
- 'delete content translations'
- 'delete landing_page revisions'
- 'delete media'
Expand All @@ -62,7 +60,6 @@ permissions:
- 'delete own landing_page content'
- 'delete own page content'
- 'delete own remote_video media'
- 'delete own soundcloud media'
- 'delete page revisions'
- 'delete remote entities'
- 'delete terms in keywords'
Expand All @@ -71,13 +68,11 @@ permissions:
- 'edit any landing_page content'
- 'edit any page content'
- 'edit any remote_video media'
- 'edit any soundcloud media'
- 'edit own file media'
- 'edit own image media'
- 'edit own landing_page content'
- 'edit own page content'
- 'edit own remote_video media'
- 'edit own soundcloud media'
- 'edit paragraph library item'
- 'edit remote entities'
- 'edit terms in keywords'
Expand All @@ -98,7 +93,6 @@ permissions:
- 'translate menu_link_content'
- 'translate page node'
- 'translate remote_video media'
- 'translate soundcloud media'
- 'update any media'
- 'update content translations'
- 'update media'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ permissions:
- 'create page content'
- 'create paragraph library item'
- 'create remote_video media'
- 'create soundcloud media'
- 'create terms in keywords'
- 'create url aliases'
- 'delete media'
Expand All @@ -34,19 +33,16 @@ permissions:
- 'delete own landing_page content'
- 'delete own page content'
- 'delete own remote_video media'
- 'delete own soundcloud media'
- 'edit any file media'
- 'edit any image media'
- 'edit any landing_page content'
- 'edit any page content'
- 'edit any remote_video media'
- 'edit any soundcloud media'
- 'edit own file media'
- 'edit own image media'
- 'edit own landing_page content'
- 'edit own page content'
- 'edit own remote_video media'
- 'edit own soundcloud media'
- 'edit paragraph library item'
- 'edit terms in keywords'
- 'revert landing_page revisions'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ permissions:
- 'create paragraph library item'
- 'create remote entities'
- 'create remote_video media'
- 'create soundcloud media'
- 'create terms in keywords'
- 'create url aliases'
- 'delete any file media'
Expand All @@ -40,7 +39,6 @@ permissions:
- 'delete any media'
- 'delete any page content'
- 'delete any remote_video media'
- 'delete any soundcloud media'
- 'delete content translations'
- 'delete landing_page revisions'
- 'delete media'
Expand All @@ -49,7 +47,6 @@ permissions:
- 'delete own landing_page content'
- 'delete own page content'
- 'delete own remote_video media'
- 'delete own soundcloud media'
- 'delete page revisions'
- 'delete remote entities'
- 'delete terms in keywords'
Expand All @@ -58,13 +55,11 @@ permissions:
- 'edit any landing_page content'
- 'edit any page content'
- 'edit any remote_video media'
- 'edit any soundcloud media'
- 'edit own file media'
- 'edit own image media'
- 'edit own landing_page content'
- 'edit own page content'
- 'edit own remote_video media'
- 'edit own soundcloud media'
- 'edit paragraph library item'
- 'edit remote entities'
- 'edit terms in keywords'
Expand All @@ -83,7 +78,6 @@ permissions:
- 'translate menu_link_content'
- 'translate page node'
- 'translate remote_video media'
- 'translate soundcloud media'
- 'update any media'
- 'update content translations'
- 'update media'
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion helfi_features/helfi_media/helfi_media.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ dependencies:
- 'drupal:responsive_image'
- 'focal_point:focal_point'
- 'image_style_quality:image_style_quality'
- 'media_entity_soundcloud:media_entity_soundcloud'
- 'oembed_providers:oembed_providers'
- 'update_helper:update_helper'
package: HELfi
Expand Down
20 changes: 20 additions & 0 deletions helfi_features/helfi_media/helfi_media.install
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,23 @@ function helfi_media_update_9009() {
ConfigHelper::updateExistingConfig($updateLocation, 'system.image');
}
}

/**
* Uninstall media_entity_soundcloud module.
*/
function helfi_media_update_9011() : void {
if (!Drupal::moduleHandler()->moduleExists('media_entity_soundcloud')) {
return;
}
$count = \Drupal::database()->select('media')
->condition('bundle', 'soundcloud')
->countQuery()
->execute()
->fetchField();

if ($count > 0) {
\Drupal::messenger()->addWarning('The "media_entity_soundcloud" dependency will be removed from helfi_platform_config module in next major release. To continue using it, run "composer require drupal/media_entity_soundcloud" in your project root.');
return;
}
Drupal::service('module_installer')->uninstall(['media_entity_soundcloud']);
}