From 6af57741e67a928e2782cebe8dd422044d16dc04 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 26 Nov 2021 21:07:24 +0000 Subject: [PATCH] Use src-namespace-prefix --- phpstan.neon.dist | 2 +- plugin.yml | 1 + src/{DevTools => }/ConsoleScript.php | 0 src/{DevTools => }/DevTools.php | 2 +- src/{DevTools => }/FolderPluginLoader.php | 0 src/{DevTools => }/commands/DevToolsCommand.php | 0 src/{DevTools => }/commands/ExtractPluginCommand.php | 0 src/{DevTools => }/commands/GeneratePluginCommand.php | 0 stub.php | 2 +- 9 files changed, 4 insertions(+), 3 deletions(-) rename src/{DevTools => }/ConsoleScript.php (100%) rename src/{DevTools => }/DevTools.php (99%) rename src/{DevTools => }/FolderPluginLoader.php (100%) rename src/{DevTools => }/commands/DevToolsCommand.php (100%) rename src/{DevTools => }/commands/ExtractPluginCommand.php (100%) rename src/{DevTools => }/commands/GeneratePluginCommand.php (100%) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 92ba9d6..8cd2ced 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -3,4 +3,4 @@ parameters: paths: - src scanFiles: - - src/DevTools/ConsoleScript.php + - src/ConsoleScript.php diff --git a/plugin.yml b/plugin.yml index c06b2b8..1e301a6 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,5 +1,6 @@ name: DevTools main: DevTools\DevTools +src-namespace-prefix: DevTools version: 1.15.0+dev api: [4.0.0] load: STARTUP diff --git a/src/DevTools/ConsoleScript.php b/src/ConsoleScript.php similarity index 100% rename from src/DevTools/ConsoleScript.php rename to src/ConsoleScript.php diff --git a/src/DevTools/DevTools.php b/src/DevTools.php similarity index 99% rename from src/DevTools/DevTools.php rename to src/DevTools.php index 1d9af9b..3db6274 100644 --- a/src/DevTools/DevTools.php +++ b/src/DevTools.php @@ -252,7 +252,7 @@ private function makePluginCommand(CommandSender $sender, array $args) : bool{ assert($metadata !== null); if($description->getName() === "DevTools"){ - $stub = sprintf(DEVTOOLS_REQUIRE_FILE_STUB, "src/DevTools/ConsoleScript.php"); + $stub = sprintf(DEVTOOLS_REQUIRE_FILE_STUB, "src/ConsoleScript.php"); }else{ $stubMetadata = []; foreach($metadata as $key => $value){ diff --git a/src/DevTools/FolderPluginLoader.php b/src/FolderPluginLoader.php similarity index 100% rename from src/DevTools/FolderPluginLoader.php rename to src/FolderPluginLoader.php diff --git a/src/DevTools/commands/DevToolsCommand.php b/src/commands/DevToolsCommand.php similarity index 100% rename from src/DevTools/commands/DevToolsCommand.php rename to src/commands/DevToolsCommand.php diff --git a/src/DevTools/commands/ExtractPluginCommand.php b/src/commands/ExtractPluginCommand.php similarity index 100% rename from src/DevTools/commands/ExtractPluginCommand.php rename to src/commands/ExtractPluginCommand.php diff --git a/src/DevTools/commands/GeneratePluginCommand.php b/src/commands/GeneratePluginCommand.php similarity index 100% rename from src/DevTools/commands/GeneratePluginCommand.php rename to src/commands/GeneratePluginCommand.php diff --git a/stub.php b/stub.php index e3f9a64..b082d16 100644 --- a/stub.php +++ b/stub.php @@ -1,3 +1,3 @@