Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6789 from ohader/issue-6788
❗Allow plugins to modify Config::$fileExtensions early
- Loading branch information
Showing
14 changed files
with
308 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace Psalm\Plugin; | ||
|
||
use Psalm\Internal\Analyzer\FileAnalyzer; | ||
use Psalm\Internal\Scanner\FileScanner; | ||
|
||
interface FileExtensionsInterface | ||
{ | ||
/** | ||
* @param string $fileExtension e.g. `'html'` | ||
* @param class-string<FileScanner> $className | ||
*/ | ||
public function addFileTypeScanner(string $fileExtension, string $className): void; | ||
|
||
/** | ||
* @param string $fileExtension e.g. `'html'` | ||
* @param class-string<FileAnalyzer> $className | ||
*/ | ||
public function addFileTypeAnalyzer(string $fileExtension, string $className): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace Psalm\Plugin; | ||
|
||
use SimpleXMLElement; | ||
|
||
interface PluginFileExtensionsInterface extends PluginInterface | ||
{ | ||
public function processFileExtensions( | ||
FileExtensionsInterface $fileExtensions, | ||
?SimpleXMLElement $config = null | ||
): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
namespace Psalm\Plugin; | ||
|
||
interface PluginInterface | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.