# Deprecation patterns ignored while testing this module. Core's own
# core/.deprecation-ignore.txt is appended to this file by the phpunit job,
# so both sets apply; see .gitlab-ci.yml.
#
# Format: https://www.drupal.org/node/3285162
#
# cspell:disable
# Forward compatibility warnings for return types that classes OUTSIDE this
# project do not declare yet, on methods they inherit from core. They are
# raised here because the next-major lane installs those projects and runs
# with --fail-on-deprecation, and none of them can be fixed from this
# repository: domain and its submodules are a runtime dependency, and ctools,
# pathauto and token are development dependencies. Deliberately scoped to
# those namespaces, so the same warning on one of this project's own classes
# still fails the lane.
%Method "[^"]+::[^"]+\(\)" might add "[^"]+" as a native return type declaration in the future\. Do the same in (?:implementation|child class) "Drupal\\(ctools|domain|domain_access|domain_alias|domain_config|domain_config_language|domain_config_language_ui|domain_config_ui|domain_content|domain_source|pathauto|token)\\[^"]+" now to avoid errors or add an explicit @return annotation to suppress this message%

# The same thing on the argument side: core's ExecutableInterface::execute()
# gains an "object|null $object" argument, and the action plugins those
# projects ship have not declared it. Again scoped to their namespaces only.
%The "Drupal\\(ctools|domain|domain_access|domain_alias|domain_config|domain_config_language|domain_config_language_ui|domain_config_ui|domain_content|domain_source|pathauto|token)\\[^"]+::[^"]+\(\)" method will require a new "[^"]+" argument in the next major version of its interface "[^"]+", not defining it is deprecated%

# token's hook_requirements() implementation still carries no
# #[LegacyRequirementsHook] attribute. Nothing in this repository can add it.
%token_requirements without a #\[LegacyRequirementsHook\] attribute is deprecated in drupal:11\.3\.0 and removed in drupal:13\.0\.0%

# getEditableConfigNames() reaches DomainPathSettingsForm through core's own
# RedundantEditableConfigNamesTrait, so the untyped method is core's, not
# ours; overriding it here purely to add a return type would duplicate core's
# body. Pinned to that one method rather than to the namespace.
%Method "Drupal\\Core\\Form\\ConfigFormBase::getEditableConfigNames\(\)" might add "array" as a native return type declaration in the future\. Do the same in child class "Drupal\\domain_path\\Form\\DomainPathSettingsForm" now%

# Two core functions that dependencies still call. Neither message carries the
# calling namespace, so unlike the patterns above these cannot be scoped to the
# dependency; they are pinned to the exact deprecated function instead.
#
# module_set_weight() comes from pathauto.install, which calls it unguarded.
# This project's own two calls sit inside the deprecated branch of a
# DeprecationHelper::backwardsCompatibleCall(), which Drupal 12 never takes, so
# nothing here relies on this pattern. Note the flip side: because the message
# names no caller, this would also hide a regression in that straddle.
%module_set_weight\(\) is deprecated in drupal:11\.5\.0 and is removed from drupal:13\.0\.0%

# image_style_options() comes from token, in TokenTokenInfoHooks. Nothing in
# this project calls it.
%image_style_options\(\) is deprecated in drupal:11\.4\.0 and is removed from drupal:13\.0\.0%

# drupal_static() and drupal_static_reset() are deprecated in 11.5, and token
# still keeps several caches in them. Their messages name the static, so the
# pattern is scoped to token's own statics (token_*) rather than to the
# function. One of the resets is ours: DomainPathautoTaxonomyChildrenTest
# clears token_taxonomy_term_load_all_parents, which nothing else can do while
# token stores it in drupal_static(); see phpstan.neon.
%Calling drupal_static(?:_reset)?\(\) with "token_[a-z_]+" as argument is deprecated in drupal:11\.5\.0 and is removed from drupal:13\.0\.0%
