class Analyzer in Drupal 7 to 8/9 Module Upgrader 8
Defines a Plugin annotation object for DMU analyzer plugins.
Analyzers scan a target module's code to determine if any problems exist. If any do exist, it's the analyzer's job to file an issue detailing the nature of the problem -- summarizing the issue, pointing out where the problem is found, and referring the developer to documentation on drupal.org explaining how to fix the problem.
Plugin Namespace: Plugin\DMU\Analyzer
Hierarchy
- class \Drupal\Component\Annotation\Plugin implements AnnotationInterface
- class \Drupal\drupalmoduleupgrader\Annotation\Analyzer
Expanded class hierarchy of Analyzer
1 string reference to 'Analyzer'
10 classes are annotated with Analyzer
- DB in src/
Plugin/ DMU/ Analyzer/ DB.php - Plugin annotation @Analyzer( id = "_db", message = @Translation("Certain database tables have been removed."), tags = { "category" = { "db" } }, deriver = "\Drupal\drupalmoduleupgrader\Plugin\DMU\Analyzer\DBDeriver" )
- FlagHook in src/
Plugin/ DMU/ Analyzer/ FlagHook.php - Plugin annotation @Analyzer( id = "_flag_hook", deriver = "\Drupal\drupalmoduleupgrader\Plugin\DMU\Analyzer\FlagHookDeriver" )
- FunctionCall in src/
Plugin/ DMU/ Analyzer/ FunctionCall.php - Plugin annotation @Analyzer( id = "_function_call", deriver = "Drupal\drupalmoduleupgrader\Plugin\DMU\Analyzer\FunctionCallDeriver" )
- Grep in src/
Plugin/ DMU/ Analyzer/ Grep.php - Plugin annotation @Analyzer( id = "grep", description = @Translation("Searches for and replaces commonly-used code that has changed in Drupal 8."), documentation = { { "url" = "https://www.drupal.org/node/2324935", "title" =…
- HookFormAlter in src/
Plugin/ DMU/ Analyzer/ HookFormAlter.php - Plugin annotation @Analyzer( id = "hook_form_alter", description = @Translation("Checks for outdated hook_form_alter() implementations."), documentation = { { "url" =…
File
- src/
Annotation/ Analyzer.php, line 20
Namespace
Drupal\drupalmoduleupgrader\AnnotationView source
class Analyzer extends Plugin {
/**
* The plugin ID.
*
* @var string
*/
public $id;
/**
* A short description of the analysis the plugin performs.
*
* @var string
*/
public $description;
/**
* Documentation describing the changes covered by the plugin.
*
* Each item in the array should be an array with 'url' and 'title' keys.
*
* @var array[]
*/
public $documentation = [];
/**
* The issue title. Markdown and HTML are allowed.
*
* @var string
*/
public $title;
/**
* An optional detailed summary of the issue. Markdown and HTML are allowed.
*
* @var string
*/
public $summary;
/**
* The default tags to be applied to flagged issues.
*
* Tags are fairly arbitrary and can be any value.
* Tags are divided into groups (i.e., the keys of this here array).
*
* @var array
*/
public $tags = [];
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Analyzer:: |
public | property | A short description of the analysis the plugin performs. | |
Analyzer:: |
public | property | Documentation describing the changes covered by the plugin. | |
Analyzer:: |
public | property | The plugin ID. | |
Analyzer:: |
public | property | An optional detailed summary of the issue. Markdown and HTML are allowed. | |
Analyzer:: |
public | property | The default tags to be applied to flagged issues. | |
Analyzer:: |
public | property | The issue title. Markdown and HTML are allowed. | |
Plugin:: |
protected | property | The plugin definition read from the class annotation. | 1 |
Plugin:: |
public | function |
Gets the value of an annotation. Overrides AnnotationInterface:: |
5 |
Plugin:: |
public | function |
Gets the class of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Gets the unique ID for this annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Gets the name of the provider of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
protected | function | Parses an annotation into its definition. | |
Plugin:: |
public | function |
Sets the class of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Sets the name of the provider of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function | Constructs a Plugin object. | 2 |