Description
While using Longman\TelegramBot\Commands
namespace for commands getUpdates (Windows, not tested on linux) method errors out:
Fatal error: Cannot declare class Longman\TelegramBot\Commands\SystemCommands\CallbackqueryCommand, because the name is already in use in vendor\longman\telegram-bot\src\Commands\SystemCommands\CallbackqueryCommand.php on line 20
Tried changing namespaces of all my commands to match my project and filepath but after that they are not loaded at all - regex doesn't seem to match (it does after I change it to #namespace\s+(.+?);#sm
).
Another thing: Telegram::runCommands()
doesn't work in this release for me.
Summoning @Jonybang @noplanman
Personally they way this custom namespace feature is implemented - loading files and running regex on them (three times for user/system/admin auth) is not really good idea. This could've been probably implemented by adding a separate method for the user to define their custom namespace instead. Possibly multiple calls were caused by the bug itself, needs more investigation and optimization in the future.