One core symbol: status and users
lookup_core_symbolAnswer "is this core symbol safe to use, and who still uses it" for one symbol. A name that resolves to nothing returns the catalog entries containing it instead. Every user in pages: list_symbol_users. Changed between versions: what_changed. Code text: search_code.
fqn forms: a namespaced name with or without the leading backslash, a bare function or constant name, a prefixed pseudo-symbol, or a fragment. Pseudo-symbols: fn:check_markup, core:hook:preprocess_page, core:library:claro/drupal.shortcut. Fragments: fromRoute, EntityInterface.
Resolved (found true): symbol, with status flags. removed: gone. scheduled_removal: still present, @deprecated gives the removal version. deprecated, internal. placeholder: a catalog row no scanner located. audience: contrib, test_support, test or theme. usage: contrib development branches only, from the evidence rollup as of evidence_built_at. It has projects and branches counts, plus top_projects (≤ 30) by install base. change_records: records that touched the symbol, each with nid for get_change_record.
Not resolved (found false): count: catalog entries containing the fragment, case-insensitive, public symbols only; kind narrows. candidates: a head of up to candidates entries, each with fqn, kind, subsystem, stamps, projects_using, change_record_nids. Entries starting with the fragment come first, then by projects_using. Call again with one fqn.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fqn | Yes | Core symbol name, or part of one. A namespaced name with or without the leading backslash (Drupal\Core\Entity\EntityInterface, Drupal\Core\Recipe\RecipeRunner::installModule). A bare function or constant name (check_markup, DRUPAL_DISABLED). A prefixed pseudo-symbol as what_changed reports it (fn:check_markup, core:hook:preprocess_page, core:library:claro/drupal.shortcut). A fragment of 3+ characters (fromRoute), which returns candidates when no symbol has that exact name. | |
| kind | No | Restrict candidates to one symbol kind (class, method, function, hook, library, service …). | |
| candidates | No | When the name resolves to no symbol: how many catalog entries containing it to return, 1 to 50 (default 10). | |
| top_projects | No | How many using projects to return in the ranked head. Defaults to 10, capped at 30. |