-
Notifications
You must be signed in to change notification settings - Fork 20
Closed
Description
I wonder, sometimes I need more context while determining if a node in a scope is deprecated. Mostly to 'undeprecate' sometime. Would you mind if node was added as context/information to DeprecatedScopeResolver::isScopeDeprecated
?
I'm trying to target the deprecated_function()
in the following code:
\Drupal\Component\Utility\DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '10.1.0', fn() => deprecated_function_call(), fn() => count([]));
DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '10.1.0', fn() => deprecated_function_call(), fn() => count([]));
DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '10.1.0', function() {
deprecated_function_call();
}, function() {
count([]);
});
I also tried other avenues, like, trying to pragmaticly add lines to ignore through a visitor. I could also use NodeVisitor
and then NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN
, but that means no code checks in all of the children.
I'm kinda stumped right now, but would love to be able to only exclude deprecations from those node (be it anonimous functions, or whatever).
Metadata
Metadata
Assignees
Labels
No labels