Problem/Motivation

If both the CAS module and the Tracer module v 1.1.0 and up (dependency of the Webprofiler module) are installed, you cannot clear cache as the when the service container is compiled, a ServiceNotFoundException is thrown in the CAS module's DeprecatedEventConstants.php class when it tries to load the `event_dispatcher` service:

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "event_dispatcher". in Symfony\Component\DependencyInjection\ContainerBuilder->getDefinition() (line 1042 of /vendor/symfony/dependency-injection/ContainerBuilder.php).

I guess this is because the Tracer module also has a compiler pass that decorates the event dispatcher which executes before CAS' compiler pass. I don't know why decorating a service prevents the service from being loaded in this compiler pass though?

Steps to reproduce

Install both CAS 3.0.0-beta4 and Tracer 1.2.1. Clear cache. Observe ServiceNotFoundException.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork cas-3545528

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

bkosborne created an issue. See original summary.

giaczug made their first commit to this issue’s fork.

giaczug’s picture

Status: Active » Needs review
lussoluca’s picture

giaczug’s picture

Assigned: Unassigned » giaczug
bkosborne’s picture

Status: Needs review » Active

Thanks guaczug - I'll merge that in, but it seems unrelated to this issue and is instead a resolution for #3549585: PHPStan failure in tests.

bkosborne’s picture

Also I tried giving you issue credit in #3549585: PHPStan failure in tests but for some reason your username is not selectable when adding a new contributor

giaczug’s picture

Status: Active » Needs review

Hi @bkosborne,
thanks for your reply!

Let me try to clarify my changes more precisely:

  1. I created a fork of the main project repository: cas-3545528
  2. I created a branch named issue-cas-3545528
  3. Them, I made two commits:
    1. fix: #3545528 Conflict with Tracer module due to compiler pass
    2. fix: #3545528 Replace deprecated DrupalSqlBase in migration source

Therefore:

  1. The first commit should resolve the current issue #3545528
  2. The second one, as you rightly pointed out, should instead be related to the issue #3549585

Can you confirm that this is correct?

bkosborne’s picture

Status: Needs review » Fixed

Sorry, yes, that's correct. I'm not sure why I didn't see the other commit yesterday. Thank you. I'll close this as fixed and update the release notes too.

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.

giaczug’s picture

Thank you bkosborne,
I also see that you have assigned me credits!
So has the issue with my username not being selectable been resolved?

bkosborne’s picture

Yes! not sure what happened there yesterday.

Status: Fixed » Closed (fixed)

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