# Deprecation patterns ignored while testing this module. Core's own
# core/.deprecation-ignore.txt is appended to this file by the phpunit
# (next major) job, so both sets apply; see .gitlab-ci.yml.
#
# Format: https://www.drupal.org/node/3285162
#
# A deprecation naming Drupal\pdv is normally a real finding and belongs
# fixed, not ignored. The one family below is the exception, and only
# because core treats its own modules the same way.
#
# cspell:disable
# Cross-module return type deprecations. Symfony's DebugClassLoader asks
# every implementation of an untyped interface method to declare the
# return type the interface will take one day. The interfaces are core's
# and core has not typed them yet: calculateDependencies(),
# onDependencyRemoval(), label(), create() and render() raise most of
# these. Core carries the very same pattern for its own modules, with
# the note that downstream implementations should add return types
# first, so this is a deferred cleanup rather than a Drupal 12 problem.
%Method "[^"]+::[^"]+\(\)" might add "[^"]+" as a native return type declaration in the future. Do the same in (?:implementation|child class) "Drupal\\pdv[a-z_]*\\[^"]+" now to avoid errors or add an explicit @return annotation to suppress this message%

# The same family, raised against development dependencies rather than
# pdv. Nothing here is pdv's to fix; drop a project once it declares the
# return types itself.
%Method "[^"]+::[^"]+\(\)" might add "[^"]+" as a native return type declaration in the future. Do the same in (?:implementation|child class) "Drupal\\(audit_trail|consumers|eca|key|message|modeler_api|simple_oauth|webform)[a-z_]*\\[^"]+" now to avoid errors or add an explicit @return annotation to suppress this message%

# Contributed dependencies that still declare their plugins with
# annotations rather than attributes. All of these name a dependency's
# plugin id, never one of pdv's; drop a line once that project converts.
%Using @(EntityType|FieldType|Constraint) annotation for plugin with ID (key|key_config_override|consumer|message|message_template|modeler_api_data_model|oauth2_token|oauth2_token_type|oauth2_scope|oauth2_scope_reference|Oauth2ScopeReference|Oauth2RedirectUri) is deprecated and is removed from drupal:13.0.0.%
%Not supporting attribute discovery in Drupal\\key\\Plugin\\KeyPluginManager is deprecated in drupal:11.2.0 and is removed from drupal:12.0.0.%

# drupal/key caches key values through drupal_static() in
# Key::getKeyValue(), which core 11.5 deprecates. The next-major lane runs
# core with that deprecation, so every test that reads a key raises it. Drop
# this once key caches through \Drupal::cache('memory').
%Calling drupal_static\(\) with "getKeyValue" as argument is deprecated%

# A dependency's procedural hook that has not declared the attribute core 11.3
# wants on it. Removed in drupal:13.0.0, not 12, and named for the project it
# belongs to; drop the line once webform converts.
%webform_requirements without a #\[LegacyRequirementsHook\] attribute is deprecated in drupal:11\.3\.0 and removed in drupal:13\.0\.0\.%

# webform's own plugins, surfaced only because the next-major lane now runs the
# tests that boot it rather than skipping them. Both families are named for
# webform, are its to convert, and neither is a Drupal 12 blocker for this
# module: the annotations go in 13.0, and the managers still work in 12 while
# warning. Drop these two lines once webform converts.
%Using @(EntityType|FieldType|Action) annotation for plugin with ID webform[a-z_]* is deprecated and is removed from drupal:13\.0\.0\.%
%Not supporting attribute discovery in Drupal\\webform\\Plugin\\Webform[A-Za-z]+Manager is deprecated in drupal:11\.2\.0 and is removed from drupal:12\.0\.0\.%
# Plugins still declared with an annotation, now that the next-major lane
# patches key and webform to OFFER an attribute class. Providing one is what
# stops core 12 refusing the manager outright; the cost is that core then
# deprecates every plugin still discovered by annotation, and the lane runs
# with --fail-on-deprecation. None of them is a Drupal 12 blocker: the
# annotations go in 13.0 and discovery works in 12 meanwhile.
#
# Read the second pattern honestly: it matches FOUR plugins of pdv's own, not
# just its dependencies' - pdv_vault_transit and pdv_test_wrap on key, and
# pdv_file and pdv_record_map on webform. They stay annotations deliberately.
# The current lane installs the RELEASED key and webform, where
# Drupal\key\Attribute\KeyType and Drupal\webform\Attribute\WebformElement do
# not exist, so declaring pdv's plugins with attributes would make them
# undiscoverable there. Convert them, and delete these two lines, the day both
# projects ship those classes in a release.
%Using @Webform(Element|Handler|Variant|Exporter|SourceEntity) annotation for plugin with ID [A-Za-z0-9_]+ is deprecated and is removed from drupal:13\.0\.0\. Use a Drupal\\webform\\Attribute\\Webform[A-Za-z]+ attribute instead\.%
%Using @Key(Type|Provider|Input) annotation for plugin with ID [A-Za-z0-9_]+ is deprecated and is removed from drupal:13\.0\.0\. Use a Drupal\\key\\Attribute\\Key[A-Za-z]+ attribute instead\.%
# cspell:enable
