Skip to content
Snippets Groups Projects
Commit 4f622a42 authored by Sam Lerner's avatar Sam Lerner Committed by Cameron Prince
Browse files

Issue #3276494 by SamLerner: PHP Deprecated warnings when using drush and PHP 8

parent b26e342e
No related branches found
No related tags found
No related merge requests found
......@@ -55,8 +55,8 @@ function media_link_enhancements_entity_display_build_alter(&$build, $context) {
$mid = $url->getRouteParameters()['media'];
$media = \Drupal::entityTypeManager()->getStorage('media')->load($mid);
// Bail if there's no media object, media is unpublished or the bundle isn't
// allowed.
// Bail if there's no media object, media is unpublished or the bundle
// isn't allowed.
if (empty($media) || !$media->isPublished() || !$helper->checkBundle($media->bundle(), 'type_size_appending_bundles')) {
continue;
}
......
......@@ -91,7 +91,7 @@ class MediaLinkEnhancementsUrlGenerator extends UrlGenerator {
* @param \Symfony\Component\HttpFoundation\RequestStack $request_stack
* A request stack object.
* @param string[] $filter_protocols
* (optional) An array of protocols allowed for URL generation.
* An array of protocols allowed for URL generation.
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* The entity type manager.
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
......@@ -99,11 +99,7 @@ class MediaLinkEnhancementsUrlGenerator extends UrlGenerator {
* @param \Drupal\media_link_enhancements\MediaLinkEnhancementsHelperInterface $helper
* Helper service.
*/
// We ignore the next line because we can't maintain compatibility
// with the core class and also have the argument list as the last
// argument.
// @codingStandardsIgnoreLine
public function __construct(RouteProviderInterface $provider, OutboundPathProcessorInterface $path_processor, OutboundRouteProcessorInterface $route_processor, RequestStack $request_stack, array $filter_protocols = ['http', 'https'], EntityTypeManagerInterface $entity_type_manager, ConfigFactoryInterface $config_factory, MediaLinkEnhancementsHelperInterface $helper) {
public function __construct(RouteProviderInterface $provider, OutboundPathProcessorInterface $path_processor, OutboundRouteProcessorInterface $route_processor, RequestStack $request_stack, array $filter_protocols, EntityTypeManagerInterface $entity_type_manager, ConfigFactoryInterface $config_factory, MediaLinkEnhancementsHelperInterface $helper) {
$this->provider = $provider;
$this->context = new RequestContext();
$this->pathProcessor = $path_processor;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment