Problem/Motivation

There are changes in 11.4 and Visitors used service class instead of interface for the argument.

TypeError: Drupal\visitors\Service\VisibilityService::__construct(): Argument #4 ($path_matcher) must be of type Drupal\Core\Path\PathMatcher, Drupal\path_alias\AliasPathMatcher given, called in /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 262 in Drupal\visitors\Service\VisibilityService->__construct() (line 94 of /var/www/html/src/Service/VisibilityService.php).

Drupal\Component\DependencyInjection\Container->createService() (Line: 173)
Drupal\Component\DependencyInjection\Container->get() (Line: 429)
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() (Line: 240)
Drupal\Component\DependencyInjection\Container->createService() (Line: 173)
Drupal\Component\DependencyInjection\Container->get() (Line: 203)
Drupal::service() (Line: 50)
visitors_page_attachments() (Line: 315)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 340)
Drupal\Core\Extension\ModuleHandler->invokeAllWith() (Line: 312)
Drupal\Core\Render\MainContent\HtmlRenderer->invokePageAttachmentHooks() (Line: 289)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 638)
Drupal\Core\Render\Renderer::Drupal\Core\Render\{closure}()
Fiber->start() (Line: 639)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 288)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare() (Line: 131)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 69)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray() (Line: 246)
Symfony\Component\EventDispatcher\EventDispatcher::Symfony\Component\EventDispatcher\{closure}() (Line: 206)
Symfony\Component\EventDispatcher\EventDispatcher->callListeners() (Line: 56)
Symfony\Component\EventDispatcher\EventDispatcher->dispatch() (Line: 188)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 30)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 118)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 92)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 61)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 54)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 753)
Drupal\Core\DrupalKernel->handle() (Line: 34)
Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run() (Line: 32)
require('/var/www/html/vendor/autoload_runtime.php') (Line: 22)

Steps to reproduce

Use the \Drupal\Core\Path\PathMatcherInterface

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork visitors-3609339

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

bluegeek9 created an issue. See original summary.

  • bluegeek9 committed c2ff9f15 on 8.x-2.x
    fix: #3609339 VisibilityService::__construct(): Argument #4 ()
    
bluegeek9’s picture

Assigned: bluegeek9 » Unassigned
Status: Active » Fixed
//www.flaticon.com/free-icons/thank-you Thank you for your contribution! Your continued support makes this project sustainable.
There are multiple ways to show appreciation, including:
  • Triage issues and adding more context to existing issues.
  • Writing documentation or patches for this project.
  • Flagging Visitors as a favorite on the project page to help others discover it and show your support.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.