function DeprecatedController::testDeprecation

Same name and namespace in other branches
  1. 11.x core/modules/system/tests/modules/deprecation_test/src/DeprecatedController.php \Drupal\deprecation_test\DeprecatedController::testDeprecation()

A deprecated function.

Return value

string A known return value of 'known_return_value'.

Deprecated

in drupal:8.4.0 and is removed from drupal:9.0.0. This is the deprecation message for testDeprecation().

See also

https://www.drupal.org/project/drupal/issues/2870194

1 call to DeprecatedController::testDeprecation()
DeprecatedController::deprecatedMethod in core/modules/system/tests/modules/deprecation_test/src/DeprecatedController.php
Controller callback.

File

core/modules/system/tests/modules/deprecation_test/src/DeprecatedController.php, line 35

Class

DeprecatedController
Defines a controller that calls a deprecated method.

Namespace

Drupal\deprecation_test

Code

public static function testDeprecation() {
  // phpcs:ignore Drupal.Semantics.FunctionTriggerError
  @trigger_error('This is the deprecation message for testDeprecation().', E_USER_DEPRECATED);
  return 'known_return_value';
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.