fix: proxy context-aware methods to target block#34
Conversation
Override context methods on ProxyBlock to delegate to the target block, and warn in the form when context mapping is only available after save.
There was a problem hiding this comment.
Code Review
This pull request implements context mapping support for the ProxyBlock plugin and updates the TargetBlockFormProcessor to handle context definitions. The code reviewer identified several critical issues in ProxyBlock.php, including a fatal runtime error caused by using the null coalescing assignment operator (??=) on a method return value, a bug where the literal string 'name' is passed instead of the $name variable in getContextDefinition(), and an incorrect fallback array key (context_definition instead of context_definitions) in getContextDefinitions(). Additionally, it was recommended to use $this->t() instead of the global t() function in TargetBlockFormProcessor.php for translation consistency.
…ix-proper-context-proxy # Conflicts: # src/Plugin/Block/ProxyBlock.php
|
🎉 This PR is included in version 1.6.5 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
ProxyBlockso context lookups, mappings, and definitions delegate to the configured target block.Test plan