Namespacing and console commands

I’ve started trying to add namespaces across my web application and I’m running into a situation with my console commands. I’m not sure whether this is the basic or advanced app setup, but my directory structure looks like this (in abbreviated form):

\protected

\components

\commands

\config

\controllers

\models

\webroot

My namespaces basically follow a “Product\controllers”, “Product\models”, “Product\components” sort of idea. I’ve got the following in my main.php in config: ‘controllerNamespace’ => ‘Product\controllers’,

And in my index.php:

\Yii::setPathOfAlias(‘Product’, ‘../protected’);

Everything in my web application works correctly. However, when I try to run any of my console commands, I have some issues. I’v tried a variety of different approaches with a variety of different errors. I’m happy to fill in some examples, but can anyone give me some insight as to what I might try to investigating?

(Right now, I’ve got my commands in a “Product\commands” namespace and I get a failed to open stream error on the filename of the command I’m trying to run.)