# \#laminas-cli

**URL:** https://discourse.laminas.dev/tag/laminas-cli/75.md

[Latest](https://discourse.laminas.dev/latest.md) · [Categories](https://discourse.laminas.dev/categories.md) · [Tags](https://discourse.laminas.dev/tags.md)

---

## [Migrate laminas-console to laminas-cli (detect console-request)](https://discourse.laminas.dev/t/migrate-laminas-console-to-laminas-cli-detect-console-request/3244)

<div class="topic-metadata">

**Author:** [@lon9man](https://discourse.laminas.dev/u/lon9man)\
**Replies:** 5\
**Last updated:** [July 3, 2025, 11:56am UTC](https://discourse.laminas.dev/t/migrate-laminas-console-to-laminas-cli-detect-console-request/3244 "2025-07-03T11:56:35Z")

</div>

Hello my steps: upgraded ZF3 to Laminas going to migrate from laminas-console/laminas-mvc-console to laminas-cli in ZF3 i used code to separate http and console request like: $request instanceof \\Laminas\\Console\\Re…

---

## [Symfony Doctrine Messenger](https://discourse.laminas.dev/t/symfony-doctrine-messenger/3772)

<div class="topic-metadata">

**Author:** [@royyong](https://discourse.laminas.dev/u/royyong)\
**Replies:** 1\
**Last updated:** [September 24, 2024, 8:54am UTC](https://discourse.laminas.dev/t/symfony-doctrine-messenger/3772 "2024-09-24T08:54:01Z")

</div>

Hi folks. I maintain a Laminas MVC project which has a small number of users but due to significant increase in transactions, the amount of data has also grown and the reports that are being generated are currently taki…

---

## [Laminas-cli: There are no commands defined in the "order" namespace](https://discourse.laminas.dev/t/laminas-cli-there-are-no-commands-defined-in-the-order-namespace/3707)

<div class="topic-metadata">

**Author:** [@modir](https://discourse.laminas.dev/u/modir)\
**Replies:** 15\
**Last updated:** [June 7, 2024, 9:54am UTC](https://discourse.laminas.dev/t/laminas-cli-there-are-no-commands-defined-in-the-order-namespace/3707 "2024-06-07T09:54:15Z")

</div>

I somehow don’t understand the intro fully. I added the configurations either directly as described in the first four steps at Introduction - laminas-cli - Laminas Docs or I added in the module configuration. I always ge…

---

## [Command chain without prompt to continue](https://discourse.laminas.dev/t/command-chain-without-prompt-to-continue/3668)

<div class="topic-metadata">

**Author:** [@Stefan\_Bolsterli](https://discourse.laminas.dev/u/Stefan_Bolsterli)\
**Replies:** 4\
**Last updated:** [April 25, 2024, 8:24am UTC](https://discourse.laminas.dev/t/command-chain-without-prompt-to-continue/3668 "2024-04-25T08:24:11Z")

</div>

I haven’t found any option to automatically execute several command as a chain without having a prompt to manually confirm to execute the next command. –no-interaction results in only have the first command executed. I…

---

## [Testing \`laminas-cli\` module commands](https://discourse.laminas.dev/t/testing-laminas-cli-module-commands/3611)

<div class="topic-metadata">

**Author:** [@earthiverse](https://discourse.laminas.dev/u/earthiverse)\
**Replies:** 2\
**Last updated:** [February 28, 2024, 2:16am UTC](https://discourse.laminas.dev/t/testing-laminas-cli-module-commands/3611 "2024-02-28T02:16:56Z")

</div>

I migrated some commands to laminas-cli for a module we use in various projects. I can run ./vendor/bin/laminas module:command from the projects that import the module without a problem, so that’s good :slight\_smile: H…

---

## [Enabling production mode removes cli commands from the list](https://discourse.laminas.dev/t/enabling-production-mode-removes-cli-commands-from-the-list/3397)

<div class="topic-metadata">

**Author:** [@ALTAMASH80](https://discourse.laminas.dev/u/ALTAMASH80)\
**Replies:** 7\
**Last updated:** [July 20, 2023, 8:43am UTC](https://discourse.laminas.dev/t/enabling-production-mode-removes-cli-commands-from-the-list/3397 "2023-07-20T08:43:28Z")

</div>

Enabling production mode removes cli commands from the list. By enabling development mode it appears. Thanks!

---

## [Unable to render template from CLI](https://discourse.laminas.dev/t/unable-to-render-template-from-cli/3345)

<div class="topic-metadata">

**Author:** [@Danielss89](https://discourse.laminas.dev/u/Danielss89)\
**Replies:** 0\
**Last updated:** [June 1, 2023, 11:22am UTC](https://discourse.laminas.dev/t/unable-to-render-template-from-cli/3345 "2023-06-01T11:22:42Z")

</div>

I am doing some upgrading, and i am now having problems with rendering from the CLI. I have a cli command which pushes a notification to a user through websocket, and this notification is rendered with the ViewRenderer. …

---

## [Where to register EventListeners to work via MVC and CLI](https://discourse.laminas.dev/t/where-to-register-eventlisteners-to-work-via-mvc-and-cli/3233)

<div class="topic-metadata">

**Author:** [@FalkHe](https://discourse.laminas.dev/u/FalkHe)\
**Replies:** 3\
**Last updated:** [March 9, 2023, 11:04am UTC](https://discourse.laminas.dev/t/where-to-register-eventlisteners-to-work-via-mvc-and-cli/3233 "2023-03-09T11:04:03Z")

</div>

Looks like EventListeners are totally ignored when code is executed via laminas-cli. The Reason is that neither Module::onBoostrap() nor the config key ‘listeners’ is handled by lamainas-cli. But what’s the alternative…

---

## [Laminas CLI PHP8 app without MVC](https://discourse.laminas.dev/t/laminas-cli-php8-app-without-mvc/3035)

<div class="topic-metadata">

**Author:** [@JohnyProkie](https://discourse.laminas.dev/u/JohnyProkie)\
**Replies:** 1\
**Last updated:** [September 2, 2022, 2:01pm UTC](https://discourse.laminas.dev/t/laminas-cli-php8-app-without-mvc/3035 "2022-09-02T14:01:10Z")

</div>

Hello folks, my task is to build a code for microservice that does only a single job when being called from CLI. So I want to avoid having laminas-mvc or mezzio, both coming with routers, templates and other not needed …

---

## [Laminas-cli Third part command warning](https://discourse.laminas.dev/t/laminas-cli-third-part-command-warning/3012)

<div class="topic-metadata">

**Author:** [@Tyrsson](https://discourse.laminas.dev/u/Tyrsson)\
**Replies:** 3\
**Last updated:** [August 20, 2022, 10:10am UTC](https://discourse.laminas.dev/t/laminas-cli-third-part-command-warning/3012 "2022-08-20T10:10:57Z")

</div>

I am receiving the “WARNING: This is a third-party command” noticed in the console when chaining commands. I understand why its done. Its related to this: Is there a way to override this warning? The application and th…

---

## [Problems with instancing a command for laminas-cli](https://discourse.laminas.dev/t/problems-with-instancing-a-command-for-laminas-cli/2905)

<div class="topic-metadata">

**Author:** [@Issinia](https://discourse.laminas.dev/u/Issinia)\
**Replies:** 4\
**Last updated:** [June 3, 2022, 11:40am UTC](https://discourse.laminas.dev/t/problems-with-instancing-a-command-for-laminas-cli/2905 "2022-06-03T11:40:11Z")

</div>

Hi there, I’m pretty new on PHP/Laminas. I joined a nice team and we try to migrate an old project to PHP 8. We were using Laminas/Console and now we try to use Symfony. We have a service to update currencies into DB. …

---

## [Laminas-cli controller plugin injection](https://discourse.laminas.dev/t/laminas-cli-controller-plugin-injection/2720)

<div class="topic-metadata">

**Author:** [@ebuddy](https://discourse.laminas.dev/u/ebuddy)\
**Replies:** 2\
**Last updated:** [January 21, 2022, 8:46am UTC](https://discourse.laminas.dev/t/laminas-cli-controller-plugin-injection/2720 "2022-01-21T08:46:55Z")

</div>

I used laminas-cli to execute my scripts in console and everything is ok. The problem I have is to use my mail controller plugin which works fine. here are my code ; My console class : \<?php declare(strict\_types=1);…

---

## [Integrate console script in laminas application](https://discourse.laminas.dev/t/integrate-console-script-in-laminas-application/2717)

<div class="topic-metadata">

**Author:** [@ebuddy](https://discourse.laminas.dev/u/ebuddy)\
**Replies:** 2\
**Last updated:** [January 15, 2022, 9:11am UTC](https://discourse.laminas.dev/t/integrate-console-script-in-laminas-application/2717 "2022-01-15T09:11:11Z")

</div>

Hello, I would like to know how to integrate command line scripts in my laminas project. I tried to use laminas-cli but I do not know how to call (for retrieving my mapper from container) my repositories inside for cal…

---

## [Execute laminas-cli command from MVC](https://discourse.laminas.dev/t/execute-laminas-cli-command-from-mvc/2577)

<div class="topic-metadata">

**Author:** [@Fabian\_Rahm](https://discourse.laminas.dev/u/Fabian_Rahm)\
**Replies:** 2\
**Last updated:** [November 4, 2021, 7:13am UTC](https://discourse.laminas.dev/t/execute-laminas-cli-command-from-mvc/2577 "2021-11-04T07:13:55Z")

</div>

I finally took the time to migrate to laminas-cli. From a controller, I wish to call one of my commands directly (I used dispatch() from within an AbstractActionController) before. Is there a built-in-method to execute …

---

## [Cron scripts exmaple](https://discourse.laminas.dev/t/cron-scripts-exmaple/2513)

<div class="topic-metadata">

**Author:** [@Kriss\_Kals](https://discourse.laminas.dev/u/Kriss_Kals)\
**Replies:** 2\
**Last updated:** [September 23, 2021, 2:38pm UTC](https://discourse.laminas.dev/t/cron-scripts-exmaple/2513 "2021-09-23T14:38:22Z")

</div>

Hello, I am looking for examples of scripts designed to be called by cron. Can anyone share a link? Thank you in advance for any reply.

---

## [Stand alone view url helper when cli is used](https://discourse.laminas.dev/t/stand-alone-view-url-helper-when-cli-is-used/2459)

<div class="topic-metadata">

**Author:** [@ivel](https://discourse.laminas.dev/u/ivel)\
**Replies:** 6\
**Last updated:** [August 30, 2021, 8:24am UTC](https://discourse.laminas.dev/t/stand-alone-view-url-helper-when-cli-is-used/2459 "2021-08-30T08:24:59Z")

</div>

Hi all, I am trying to migrate from laminas-console to laminas-cli, but the following issue appeared: I am using cron to initiate regular tasks like sending reminding email to users (using my Mailer class). In those em…

---

## [onBootstrap not called for CLI commands](https://discourse.laminas.dev/t/onbootstrap-not-called-for-cli-commands/2447)

<div class="topic-metadata">

**Author:** [@imitakov](https://discourse.laminas.dev/u/imitakov)\
**Replies:** 14\
**Last updated:** [August 19, 2021, 7:16am UTC](https://discourse.laminas.dev/t/onbootstrap-not-called-for-cli-commands/2447 "2021-08-19T07:16:59Z")

</div>

Hi, I recently migrated my project from ZF3 to Laminas. Since now laminas-console and laminas-mvc-console are gone, now I changed my code to use Symfony commands, following the guide in the README of laminas-cli. Howeve…

---

## [Laminas-cli: service\_manager config in module.config.php doesn't work](https://discourse.laminas.dev/t/laminas-cli-service-manager-config-in-module-config-php-doesnt-work/2263)

<div class="topic-metadata">

**Author:** [@matti](https://discourse.laminas.dev/u/matti)\
**Replies:** 11\
**Last updated:** [April 28, 2021, 3:48pm UTC](https://discourse.laminas.dev/t/laminas-cli-service-manager-config-in-module-config-php-doesnt-work/2263 "2021-04-28T15:48:46Z")

</div>

My problem is plain and simple: When trying to configure my cli module I seem to only be able to configure the service manager inside of my src/Module.php and not in my config/module.config.php. This works: class Modul…

---

## [Laminas-cli : 'dependencies' =\>'factories' ignored](https://discourse.laminas.dev/t/laminas-cli-dependencies-factories-ignored/2246)

<div class="topic-metadata">

**Author:** [@pasglop](https://discourse.laminas.dev/u/pasglop)\
**Replies:** 4\
**Last updated:** [April 14, 2021, 1:59pm UTC](https://discourse.laminas.dev/t/laminas-cli-dependencies-factories-ignored/2246 "2021-04-14T13:59:03Z")

</div>

Hello For information : Laminas MVC Skeleton Application laminas/laminas-cli 1.0.2 symfony/console v4.4.21 I would like to use the dependencies in the class of a command as indicated in the laminas/laminas-cli docum…

---

## [\[RFC\] laminas-cli - Aggregate Command Loader](https://discourse.laminas.dev/t/rfc-laminas-cli-aggregate-command-loader/1695)

<div class="topic-metadata">

**Author:** [@george](https://discourse.laminas.dev/u/george)\
**Replies:** 0\
**Last updated:** [June 30, 2020, 8:36am UTC](https://discourse.laminas.dev/t/rfc-laminas-cli-aggregate-command-loader/1695 "2020-06-30T08:36:53Z")

</div>

It occurred to me that, because I have a number of projects that implement their own command loader, that exposing an “Aggregate Command Loader” that could accept multiple command loaders at runtime, perhaps by way of a …

---

## [Trouble getting started with laminas-cli and mvc app](https://discourse.laminas.dev/t/trouble-getting-started-with-laminas-cli-and-mvc-app/1673)

<div class="topic-metadata">

**Author:** [@davidmintz](https://discourse.laminas.dev/u/davidmintz)\
**Replies:** 8\
**Last updated:** [June 29, 2020, 4:51pm UTC](https://discourse.laminas.dev/t/trouble-getting-started-with-laminas-cli-and-mvc-app/1673 "2020-06-29T16:51:49Z")

</div>

I’ve read the instructions but clearly I’m missing something. I installed laminas-cli via composer as instructed. Then I created this config and put it in config/autoload/laminas-cli.global.php: \<?php return \[ 'lami…

---

## [\[RFC\] laminas-cli - Auto-Add Invokable Factory for Commands](https://discourse.laminas.dev/t/rfc-laminas-cli-auto-add-invokable-factory-for-commands/1675)

<div class="topic-metadata">

**Author:** [@george](https://discourse.laminas.dev/u/george)\
**Replies:** 1\
**Last updated:** [June 29, 2020, 2:43pm UTC](https://discourse.laminas.dev/t/rfc-laminas-cli-auto-add-invokable-factory-for-commands/1675 "2020-06-29T14:43:53Z")

</div>

I’m about to deprecate a library netglue/laminas-symfony-console that laminas-cli makes obsolete :wink: One feature this lib has that might be useful is to automatically configure the container to use Invokable Factory …

---

## [Prismic + Mezzio = "Primo" - Headless CMS Bootstrap Project](https://discourse.laminas.dev/t/prismic-mezzio-primo-headless-cms-bootstrap-project/1674)

<div class="topic-metadata">

**Author:** [@george](https://discourse.laminas.dev/u/george)\
**Replies:** 0\
**Last updated:** [June 17, 2020, 8:22pm UTC](https://discourse.laminas.dev/t/prismic-mezzio-primo-headless-cms-bootstrap-project/1674 "2020-06-17T20:22:06Z")

</div>

I’ve been using Prismic - (prismic.io) for a few years now to build content managed websites for clients with ZF2, Expressive and then Mezzio. There’s a lot of boilerplate involved when starting a new website, so I’ve re…
