Only generate deprecated notice if the deprecated filter is in use
Updates #30848

Signed-off-by: jessica <jessica@exobi.com>