function deprecation_test_function

Same name in other branches
  1. 8.9.x core/modules/system/tests/modules/deprecation_test/deprecation_test.module \deprecation_test_function()
  2. 10 core/modules/system/tests/modules/deprecation_test/deprecation_test.module \deprecation_test_function()
  3. 11.x core/modules/system/tests/modules/deprecation_test/deprecation_test.module \deprecation_test_function()

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 deprecated_test_function().

See also

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

4 calls to deprecation_test_function()
DeprecatedController::deprecatedMethod in core/modules/system/tests/modules/deprecation_test/src/DeprecatedController.php
Controller callback.
PhpUnitBridgeTest::testDeprecatedFunction in core/tests/Drupal/KernelTests/Core/Test/PhpUnitBridgeTest.php
PhpUnitBridgeTest::testDeprecatedFunction in core/tests/Drupal/Tests/Core/Test/PhpUnitBridgeTest.php
PhpUnitBridgeTest::testSilencedError in core/tests/Drupal/FunctionalTests/Core/Test/PhpUnitBridgeTest.php
Tests deprecation message from deprecation_test_function().

File

core/modules/system/tests/modules/deprecation_test/deprecation_test.module, line 19

Code

function deprecation_test_function() {
    @trigger_error('This is the deprecation message for deprecation_test_function().', 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.