Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
We need to refine context definitions when checking integrity. This needs to cover refined context for used context, such that it is verified proper context is going to be passed. Then, this needs to cover refined context for provided context such that subsequent plugins pickup the right context.
Comments
Comment #2
fagoTest case proving the problem: https://github.com/fago/rules/pull/422
Comment #3
fagoIn order for being able to solve this and all related issues, I re-worked all the metadata processing code to have one central logic that is used by the metadata state preparations and integrity checks. As integrity checking requires metadata state preparations I incorporated it in checkIntegrity() as this greatly simplifies tree traversal while checking integrity.
Quite some re-factoring, but that should be a solid base for solving all the related issues and allowing the addition of metadata assertions.
Note: While working on this, I ran into exceptions due to #2677162: Context::getContextValue() violates ContextInterface by throwing an unexpected exception once refineContextDefinitions() was used. A review there would be helpful also!
Comment #4
fagooh, https://github.com/fago/rules/pull/422 is a bit bigger now ;)
Comment #6
fagoMerged.