Migrate laminas-console to laminas-cli (detect console-request)

Hello

my steps:

  1. upgraded ZF3 to Laminas
  2. going to migrate from laminas-console/laminas-mvc-console to laminas-cli
  3. in ZF3 i used code to separate http and console request like:
  • $request instanceof \Laminas\Console\Request
  • \Laminas\Console::isConsole()

AFAIS now in laminas-sources i don’t see entity ConsoleRequest… it seems it deprecated?

what is suggested new way to detect the same using Laminas?

thanks!

Is not needed anymore. If you are in a command class, you are already in the console environment.
Controllers and actions are obsolete for CLI.

1 Like

thanks for the response!