@@ -29,7 +29,9 @@ class BuildSiteCommand extends Command
2929 {--run-vite : Build frontend assets using Vite}
3030 {--run-prettier : Format the output using NPM Prettier}
3131 {--pretty-urls : Should links in output use pretty URLs?}
32- {--no-api : Disable API calls, for example, Torchlight} ' ;
32+ {--no-api : Disable API calls, for example, Torchlight}
33+ {--run-dev : [Removed] Use --run-vite instead}
34+ {--run-prod : [Removed] Use --run-vite instead} ' ;
3335
3436 /** @var string */
3537 protected $ description = 'Build the static site ' ;
@@ -39,6 +41,12 @@ class BuildSiteCommand extends Command
3941
4042 public function handle (): int
4143 {
44+ // CodeCoverageIgnoreStart
45+ if ($ this ->option ('run-dev ' ) || $ this ->option ('run-prod ' )) {
46+ return $ this ->deprecatedRunMixCommandFailure ();
47+ }
48+ // CodeCoverageIgnoreEnd
49+
4250 $ timeStart = microtime (true );
4351
4452 $ this ->title ('Building your static site! ' );
@@ -153,4 +161,21 @@ protected function getExitCode(): int
153161
154162 return Command::SUCCESS ;
155163 }
164+
165+ /**
166+ * This method is called when the removed --run-dev or --run-prod options are used.
167+ *
168+ * @deprecated Use --run-vite instead
169+ * @since v2.0 - This will be removed after 2-3 minor releases depending on the timeframe between them. (~v2.3)
170+ *
171+ * @codeCoverageIgnore
172+ */
173+ protected function deprecatedRunMixCommandFailure (): int
174+ {
175+ $ this ->error ('The --run-dev and --run-prod options have been removed in HydePHP v2.0. ' );
176+ $ this ->info ('Please use --run-vite instead to build assets for production with Vite. ' );
177+ $ this ->line ('See https://github.com/hydephp/develop/pull/2013 for more information. ' );
178+
179+ return Command::FAILURE ;
180+ }
156181}
0 commit comments