class TestMissingDependency
Same name and namespace in other branches
- main core/modules/system/tests/modules/router_test_directory/src/Controller/TestMissingDependency.php \Drupal\router_test\Controller\TestMissingDependency
A controller that declares a route but extends a class from a missing module.
A missing parent class (rather than a missing trait) is used deliberately: it is reported as a catchable error on all supported PHP versions, whereas a missing trait only became catchable in PHP 8.5.
Hierarchy
- class \Drupal\router_test\Controller\TestMissingDependency extends \Drupal\a_module_that_does_not_exist\SomeController
Expanded class hierarchy of TestMissingDependency
File
-
core/
modules/ system/ tests/ modules/ router_test_directory/ src/ Controller/ TestMissingDependency.php, line 17
Namespace
Drupal\router_test\ControllerView source
class TestMissingDependency extends SomeController {
/**
* Builds something.
*
* @return array
* A render array.
*/
public function build() : array {
return [];
}
}
Members
| Title Sort descending | Modifiers | Object type | Summary |
|---|---|---|---|
| TestMissingDependency::build | public | function | Builds something. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.