public function LibraryDeprecationAnalyzer::analyze in Upgrade Status 8.3
Same name and namespace in other branches
- 8.2 src/LibraryDeprecationAnalyzer.php \Drupal\upgrade_status\LibraryDeprecationAnalyzer::analyze()
Analyzes usages of deprecated libraries in an extension.
Parameters
\Drupal\Core\Extension\Extension $extension: The extension to be analyzed.
Return value
\Drupal\upgrade_status\DeprecationMessage[] A list of deprecation messages.
Throws
\Exception
File
- src/
LibraryDeprecationAnalyzer.php, line 94
Class
- LibraryDeprecationAnalyzer
- A library deprecation analyzer.
Namespace
Drupal\upgrade_statusCode
public function analyze(Extension $extension) : array {
$deprecations = [];
$deprecations = array_merge($deprecations, $this
->analyzeLibraryDependencies($extension));
if ($extension
->getType() === 'theme') {
$deprecations = array_merge($deprecations, $this
->analyzeThemeLibraryOverrides($extension));
$deprecations = array_merge($deprecations, $this
->analyzeThemeLibraryExtends($extension));
}
$deprecations = array_merge($deprecations, $this
->analyzeTwigLibraryDependencies($extension));
$deprecations = array_merge($deprecations, $this
->analyzePhpLibraryReferences($extension));
return $deprecations;
}