Commit a47d0e14 authored by Pravin Gaikwad's avatar Pravin Gaikwad
Browse files

Issue #3288499: Automated Drupal 10 compatibility fixes

parent 3078240f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@
    "source": "https://git.drupalcode.org/project/media_entity_soundcloud"
  },
  "require": {
    "drupal/core": "^8 || ^9"
    "drupal/core": "^9.3 || ^10"
  },
  "autoload": {
    "psr-4": {
+1 −2
Original line number Diff line number Diff line
name: Media Entity Soundcloud
type: module
description: Media entity soundcloud provider.
core: 8.x
core_version_requirement: ^8 || ^9
core_version_requirement: ^9.3 || ^10
package: Media
dependencies:
  - drupal:media
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ use Drupal\Core\File\FileSystemInterface;
 * Implements hook_install().
 */
function media_entity_soundcloud_install() {
  $source = drupal_get_path('module', 'media_entity_soundcloud') . '/images/icons';
  $source = \Drupal::service('extension.list.module')->getPath('media_entity_soundcloud') . '/images/icons';
  $destination = \Drupal::config('media.settings')->get('icon_base_uri');
  $file_system = \Drupal::service('file_system');
  $file_system->prepareDirectory($destination, FileSystemInterface::CREATE_DIRECTORY | FileSystemInterface::MODIFY_PERMISSIONS);
+3 −3
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ class SoundcloudForm extends AddFormBase {
  /**
   * {@inheritDoc}
   */
  protected function buildInputElement(array $form, \Drupal\Core\Form\FormStateInterface $form_state) {
  protected function buildInputElement(array $form, FormStateInterface $form_state) {
    $container = [
      '#type' => 'container',
    ];
@@ -128,7 +128,7 @@ class SoundcloudForm extends AddFormBase {
  /**
   * {@inheritDoc}
   */
  public function addButtonSubmit(array $form, \Drupal\Core\Form\FormStateInterface $form_state) {
  public function addButtonSubmit(array $form, FormStateInterface $form_state) {
    $this->processInputValues([$form_state->getValue('soundcloud_url')], $form, $form_state);
  }

+2 −2
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ class SoundcloudEmbedFormatterTest extends BrowserTestBase {
  /**
   * {@inheritdoc}
   */
  protected function setUp() {
  protected function setUp(): void {
    parent::setUp();

    // Setup standalone media urls from the settings.
@@ -87,7 +87,7 @@ class SoundcloudEmbedFormatterTest extends BrowserTestBase {

    $page = $this->getSession()->getPage();
    $page->fillField('name[0][value]', 'Soundcloud');
    $page->fillField('field_media_soundcloud[0][value]', 'https://soundcloud.com/winguy/billie-jean-remix-ft');
    $page->fillField('field_media_soundcloud[0][value]', 'https://soundcloud.com/pooriaputak/laelaha');
    $page->pressButton('Save');

    // Assert "has been created" text.