[META] Make Media Entity Vimeo compatible with Drupal 9.x

Created on 28 April 2020, over 4 years ago
Updated 2 March 2023, over 1 year ago

Add core_version_requirement: ^8 || ^9 to media_entity_vimeo.info.yml to designate that the module is compatible with Drupal 9.
See https://www.drupal.org/node/3070687 .

drupal-check & rector reports below :-

vendor/bin/drupal-check -ad web/modules/contrib/media_entity_vimeo
 5/5 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  Line   src/Plugin/Field/FieldFormatter/VimeoEmbedFormatter.php
 ------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  39     Property Drupal\media_entity_vimeo\Plugin\Field\FieldFormatter\VimeoEmbedFormatter::$fetcher has unknown class Drupal\media_entity_vimeo\Plugin\MediaEntity\Type\VimeoEmbedFetcher as its
         type.
  46     Property Drupal\media_entity_vimeo\Plugin\Field\FieldFormatter\VimeoEmbedFormatter::$fetcher (Drupal\media_entity_vimeo\Plugin\MediaEntity\Type\VimeoEmbedFetcher) does not accept
         Drupal\media_entity_vimeo\VimeoEmbedFetcher.
  54     Unsafe usage of new static().
         💡 Consider making the class or the constructor final.
  136    Method Drupal\Core\Field\PluginSettingsBase::getSettings() invoked with 1 parameter, 0 required.
  153    PHPDoc tag @var for variable $media_entity contains unknown class Drupal\media_entity\MediaInterface.
  156    Call to method getType() on an unknown class Drupal\media_entity\MediaInterface.
  159    PHPDoc tag @var for variable $item contains unknown class Drupal\media_entity_vimeo\Plugin\Field\FieldFormatter\MediaTypeInterface.
  164    Call to method fetchVimeoEmbed() on an unknown class Drupal\media_entity_vimeo\Plugin\MediaEntity\Type\VimeoEmbedFetcher.
 ------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 ------ --------------------------------------------------------------------------------
  Line   src/Plugin/MediaEntity/Type/Vimeo.php
 ------ --------------------------------------------------------------------------------
         Class Drupal\media_entity\MediaTypeBase not found and could not be autoloaded.
         💡 Learn more at https://phpstan.org/user-guide/autoloading
  28     Class Drupal\media_entity\MediaTypeBase not found and could not be autoloaded.
         💡 Learn more at https://phpstan.org/user-guide/autoloading
 ------ --------------------------------------------------------------------------------

 ------ ----------------------------------------------------------------------------------------------------------------------------
  Line   src/VimeoEmbedFetcher.php
 ------ ----------------------------------------------------------------------------------------------------------------------------
  63     Method Drupal\media_entity_vimeo\VimeoEmbedFetcher::fetchVimeoEmbed() should return array but return statement is missing.
 ------ ----------------------------------------------------------------------------------------------------------------------------


 [ERROR] Found 11 errors



php vendor/bin/rector process web/modules/contrib/media_entity_vimeo --dry-run
Rector 0.8.x-dev@8896f0a
Config file: rector.yml

 15/15 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

1 file with changes
===================

1) web/modules/contrib/media_entity_vimeo/media_entity_vimeo.module

    ---------- begin diff ----------
--- Original
+++ New
@@ -21,4 +21,4 @@
       ],
     ]
   ];
-}
\ No newline at end of file
+}
    ----------- end diff -----------


 [ERROR] Could not process "web/modules/contrib/media_entity_vimeo/src/Plugin/MediaEntity/Type/Vimeo.php" file, due to:
         "Analyze error: "Class Drupal\media_entity\MediaTypeBase not found and could not be autoloaded.". Include your
         files in "parameters > autoload_paths".
         See https://github.com/rectorphp/rector#extra-autoloading".
📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇮🇳India rahulrasgon

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024