- Issue created by @joum
- First commit to issue fork.
While working on a project using this module, I stumbled on some PHP errors:
PHP Fatal error: Declaration of Drupal\video_embed_html5\Plugin\video_embed_field\Provider\Html5::getName() must be compatible with Drupal\video_embed_field\ProviderPluginBase::getName($title_format = null, $use_title_fallback = true) in /var/www/html/docroot/modules/contrib/video_embed_html5/src/Plugin/video_embed_field/Provider/Html5.php on line 246
and
PHP Fatal error: Declaration of Drupal\video_embed_html5\Plugin\video_embed_field\Provider\Html5::renderEmbedCode($width, $height, $autoplay): array must be compatible with Drupal\video_embed_field\ProviderPluginInterface::renderEmbedCode($width, $height, $autoplay, $title_format = null, $use_title_fallback = true) in /var/www/html/docroot/modules/contrib/video_embed_html5/src/Plugin/video_embed_field/Provider/Html5.php on line 122
These errors started happening after I updated the video_embed_field module to 3.0.0-beta1. I think this means that a new release for video_embed_html5 is necessary so that it becomes fully compatible with versions 3+ of video_embed_field.
Errors appear in pages using video_embed_field HTML5 plugin provided by this module.
I managed to fix this in my use case by creating a quick and dirty patch to address my specific problem by changing the method signatures in the plugin class to match the latest interface definition on the video_embed_field module, but it surely must not have sufficient coverage. Haven't forked the issue and/or created an MR for it. Added the patch below for reference in case someone is interested.
Maybe a proper v3-compatible version/release is necessary, but I didn't find any movement in that direction when checking the issue queue. Hoping this issue will kickstart the discussion.
Active
2.0
Code