You are here

function foo2 in Coder 8.3.x

Same name in this branch
  1. 8.3.x tests/Drupal/Semantics/FunctionTriggerErrorUnitTest.2.inc \foo2()
  2. 8.3.x tests/Drupal/WhiteSpace/CommaUnitTest.inc \foo2()
Same name and namespace in other branches
  1. 8.3 tests/Drupal/Semantics/FunctionTriggerErrorUnitTest.2.inc \foo2()
  2. 8.3 tests/Drupal/WhiteSpace/CommaUnitTest.inc \foo2()
  3. 8.2 coder_sniffer/Drupal/Test/WhiteSpace/CommaUnitTest.inc \foo2()

Test function two.

Deprecated

in drupal:8.5.0 and is removed from drupal:9.0.0. Use bar() instead.

See also

https://www.drupal.org/node/123

File

tests/Drupal/Semantics/FunctionTriggerErrorUnitTest.2.inc, line 27
Example code for strict deprecated FunctionTriggerError sniff test.

Code

function foo2() {

  // This fails the strict version of the trigger_error deprecation standard.
  @trigger_error('Function foo2() is deprecated in drupal:8.5.0 but instead use bar() in drupal:9.0.0. See https://www.drupal.org/node/123', E_USER_DEPRECATED);
}