I’m working to create my own app for Nextcloud.
I want to create a Command for occ.
My command is registered in my info.xml
OCA\MyApp\Command\Mycommand
When I call the command I receive a dump of the php file contening the class and the following error.
An unhandled exception has been thrown:
exception ‘Exception’ with message ‘Console command ‘OCA\MyApp\Command\MyCommand’ is unknown and could not be loaded’ in /var/www/clients/client/web/web/lib/private/Console/Application.php:181
I’m using NC 12.0.5. It seems that the ClassLoader can not load my class. The path of the php file is apps/MyApp/lib/Command/Mycommand.php
My php file is like :
namespace OCA\MyApp\Command;
...
class Mycommand extends Base {
}