ContextManager::__construct() incorrectly type-hints its first parameter to EntityTypeManager instead of EntityTypeManagerInterface, causing conflicts with alternate implementation of the EntityTypeManager like the one in devel/webprofiler.
TypeError: Argument 1 passed to Drupal\context\ContextManager::__construct() must be an instance of Drupal\Core\Entity\EntityTypeManager, instance of Drupal\webprofiler\Entity\EntityManagerWrapper given, called in /var/www/bmwmotorclub.docker.test/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 278 in Drupal\context\ContextManager->__construct() (line 80 of modules/contrib/context/src/ContextManager.php)
Comment | File | Size | Author |
---|---|---|---|
#4 | context-conflict_with_webprofiler-3034419-4.patch | 2.83 KB | robertom |
#2 | 3034419-context-entitytypemanager-typehint.patch | 1.28 KB | ReBa |
Comments
Comment #2
ReBa CreditAttribution: ReBa as a volunteer commentedLocally tested with version 4.x-dev, can somebody confirm?
Comment #3
ReBa CreditAttribution: ReBa as a volunteer commentedWrong priority, needs to be normal.
Comment #4
robertom CreditAttribution: robertom at bmeme commentedsame problem also with ViewIclusion condition.
attached the modified patch
Comment #5
malcolm_p CreditAttribution: malcolm_p commentedYep, this is a pretty simple fix that works for me as well. Hopefully we can get this RTBC and merged.
Comment #6
boshtian CreditAttribution: boshtian at Agiledrop - Your Trusted Drupal Teammates commentedYes, this solves the issue.
Comment #8
boshtian CreditAttribution: boshtian at Agiledrop - Your Trusted Drupal Teammates commented