mirror of
https://github.com/danog/psalm.git
synced 2024-12-04 18:48:03 +01:00
62a0ece035
ProjectAnalyzer consumed Config::$fileExtensions early in its constructor - without having processed plugins' modifications, registering their custom scanners or analyzer implementations. This change * adds new specific interface \Psalm\Plugin\FileExtensionsInterface to be used by plugin implementations * extracts file extension handling from \Psalm\PluginRegistrationSocket and interface \Psalm\Plugin\RegistrationInterface to a new dedicated \Psalm\PluginFileExtensionsSocket and new interface \Psalm\Plugin\FileExtensionsInterface !!! this is a breaking change in PluginRegistrationSocket !!! * adds runtime in-memory cache for Config::$plugins * calls new method Config::processPluginFileExtensions(), providing modifications to file extension only early in ProjectAnalyzer * adjusts documentation
14 lines
246 B
PHP
14 lines
246 B
PHP
<?php
|
|
|
|
namespace Psalm\Plugin;
|
|
|
|
interface RegistrationInterface
|
|
{
|
|
public function addStubFile(string $file_name): void;
|
|
|
|
/**
|
|
* @param class-string $handler
|
|
*/
|
|
public function registerHooksFromClass(string $handler): void;
|
|
}
|