# There are no commands defined in the "mezzio:middleware" namespace

**URL:** <https://discourse.laminas.dev/t/there-are-no-commands-defined-in-the-mezzio-middleware-namespace/2766>\
**Category:** Mezzio\
**Tags:** mezzio-tooling\
**Created:** [February 11, 2022, 9:26am UTC](https://discourse.laminas.dev/t/there-are-no-commands-defined-in-the-mezzio-middleware-namespace/2766 "2022-02-11T09:26:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanjivsharmalv](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/sanjivsharmalv/32/1164_2.png) [@sanjivsharmalv](https://discourse.laminas.dev/u/sanjivsharmalv)\
**Post date:** [February 11, 2022, 9:26am UTC](https://discourse.laminas.dev/t/there-are-no-commands-defined-in-the-mezzio-middleware-namespace/2766/1 "2022-02-11T09:26:50Z")

</div>

I tried creating the middle-ware via:

```auto
$ composer mezzio:middleware:create "App\XClacksOverheadMiddleware"

```

I am facing the error:  
There are no commands defined in the “mezzio:middleware” namespace.

Any helpful pointers, please.

Thanks

---

<div class="post-metadata">

**Author:** ![makxk](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/makxk/32/1266_2.png) [@makxk](https://discourse.laminas.dev/u/makxk)\
**Post date:** [February 11, 2022, 10:02am UTC](https://discourse.laminas.dev/t/there-are-no-commands-defined-in-the-mezzio-middleware-namespace/2766/2 "2022-02-11T10:02:45Z")

</div>

Try:

```auto
composer mezzio middleware:create "App\XClacksOverheadMiddleware"

```

Without the “:” between “mezzio” and “middleware”.

---

<div class="post-metadata">

**Author:** ![froschdesign](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/froschdesign/32/38_2.png) [@froschdesign](https://discourse.laminas.dev/u/froschdesign)\
**Post date:** [February 11, 2022, 10:05am UTC](https://discourse.laminas.dev/t/there-are-no-commands-defined-in-the-mezzio-middleware-namespace/2766/3 "2022-02-11T10:05:16Z")

</div>

Reference: [CLI Tooling - mezzio - Laminas Docs](https://docs.mezzio.dev/mezzio/v3/reference/cli-tooling/#mezzio-command-line-tool)

---

<div class="post-metadata">

**Author:** ![sanjivsharmalv](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/sanjivsharmalv/32/1164_2.png) [@sanjivsharmalv](https://discourse.laminas.dev/u/sanjivsharmalv)\
**Post date:** [February 11, 2022, 10:15am UTC](https://discourse.laminas.dev/t/there-are-no-commands-defined-in-the-mezzio-middleware-namespace/2766/4 "2022-02-11T10:15:49Z")

</div>

I tried without ‘:’ as well but didn’t help:

```auto
$ composer mezzio middleware:create "App\XClacksOverheadMiddleware"

```

Following worked:

```auto
$ vendor/bin/laminas mezzio:middleware:create "App\XClacksOverheadMiddleware"

```

Thanks

---

<div class="post-metadata">

**Author:** ![froschdesign](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/froschdesign/32/38_2.png) [@froschdesign](https://discourse.laminas.dev/u/froschdesign)\
**Post date:** [February 11, 2022, 10:36am UTC](https://discourse.laminas.dev/t/there-are-no-commands-defined-in-the-mezzio-middleware-namespace/2766/5 "2022-02-11T10:36:40Z")

</div>

> [@sanjivsharmalv](#):
>
> I tried without ‘:’ as well but didn’t help:
> 
> ```auto
> $ composer mezzio middleware:create "App\XClacksOverheadMiddleware"
> 
> ```

If you use the skeleton application then the script with name `mezzio` is registered for Composer:

> <https://github.com/mezzio/mezzio-skeleton/blob/407b4869134f1a42c630c80a17956ec130c4e5d4/composer.json#L96>

More informations to custom commands with Composer:

> **[Scripts - Composer](https://getcomposer.org/doc/articles/scripts.md#writing-custom-commands)**
>
> A Dependency Manager for PHP
