mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 17:36:12 +00:00
Allow plugins to use PSR-4 namespace mapping (#4188)
* Allow plugins to use PSR-4 namespace mapping this is a reduced implementation which serves the 99% use case without being horribly breakable. Plugins may now specify a `src-namespace-prefix`, which should be set to the namespace of the classes in `src`. If the old system is used, `src-namespace-prefix` can be omitted, or set to an empty string. Examples: - If `src-namespace-prefix` is `dktapps\test`, `dktapps\test\Main` will be searched for in `src/Main.php`, instead of `src/dktapps/test/Main.php`. * Migrate TesterPlugin to PSR-4
This commit is contained in:
@ -210,6 +210,11 @@ parameters:
|
||||
count: 1
|
||||
path: ../../../src/plugin/PluginDescription.php
|
||||
|
||||
-
|
||||
message: "#^Property pocketmine\\\\plugin\\\\PluginDescription\\:\\:\\$srcNamespacePrefix \\(string\\) does not accept mixed\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/plugin/PluginDescription.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$plugins of class pocketmine\\\\plugin\\\\PluginGraylist constructor expects array\\<string\\>, mixed given\\.$#"
|
||||
count: 1
|
||||
|
Reference in New Issue
Block a user