From cd1421a9de71d9b8454c35032eac2a9ea33af8a7 Mon Sep 17 00:00:00 2001 From: Marco De Bortoli Date: Sat, 16 May 2020 20:19:30 +0100 Subject: [PATCH] #1048: Update code to reflect namespace changes --- commands/ChannelpostCommand.php | 10 +++++----- commands/GenericmessageCommand.php | 8 ++++---- commands/HelpCommand.php | 10 +++++----- commands/IdCommand.php | 10 +++++----- commands/NewchatmembersCommand.php | 16 ++++++++-------- commands/RulesCommand.php | 6 +++--- commands/StartCommand.php | 8 ++++---- composer.json | 4 ++-- public/manager.php | 4 ++-- public/webhooks/github.php | 10 +++++----- src/Helpers.php | 6 +++--- 11 files changed, 46 insertions(+), 46 deletions(-) diff --git a/commands/ChannelpostCommand.php b/commands/ChannelpostCommand.php index 1d099f0..1366f88 100644 --- a/commands/ChannelpostCommand.php +++ b/commands/ChannelpostCommand.php @@ -11,12 +11,12 @@ declare(strict_types=1); -namespace Longman\TelegramBot\Commands\SystemCommands; +namespace PhpTelegramBot\Core\Commands\SystemCommands; -use Longman\TelegramBot\Commands\SystemCommand; -use Longman\TelegramBot\Entities\ServerResponse; -use Longman\TelegramBot\Exception\TelegramException; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Commands\SystemCommand; +use PhpTelegramBot\Core\Entities\ServerResponse; +use PhpTelegramBot\Core\Exception\TelegramException; +use PhpTelegramBot\Core\Request; /** * Handle post sent from channel. diff --git a/commands/GenericmessageCommand.php b/commands/GenericmessageCommand.php index 747811f..b0238b7 100644 --- a/commands/GenericmessageCommand.php +++ b/commands/GenericmessageCommand.php @@ -11,11 +11,11 @@ declare(strict_types=1); -namespace Longman\TelegramBot\Commands\SystemCommands; +namespace PhpTelegramBot\Core\Commands\SystemCommands; -use Longman\TelegramBot\Commands\SystemCommand; -use Longman\TelegramBot\Entities\ServerResponse; -use Longman\TelegramBot\Exception\TelegramException; +use PhpTelegramBot\Core\Commands\SystemCommand; +use PhpTelegramBot\Core\Entities\ServerResponse; +use PhpTelegramBot\Core\Exception\TelegramException; /** * Generic message command diff --git a/commands/HelpCommand.php b/commands/HelpCommand.php index 60460fb..68c2d1d 100644 --- a/commands/HelpCommand.php +++ b/commands/HelpCommand.php @@ -11,12 +11,12 @@ declare(strict_types=1); -namespace Longman\TelegramBot\Commands\UserCommands; +namespace PhpTelegramBot\Core\Commands\UserCommands; -use Longman\TelegramBot\Commands\Command; -use Longman\TelegramBot\Commands\UserCommand; -use Longman\TelegramBot\Entities\ServerResponse; -use Longman\TelegramBot\Exception\TelegramException; +use PhpTelegramBot\Core\Commands\Command; +use PhpTelegramBot\Core\Commands\UserCommand; +use PhpTelegramBot\Core\Entities\ServerResponse; +use PhpTelegramBot\Core\Exception\TelegramException; /** * User "/help" command diff --git a/commands/IdCommand.php b/commands/IdCommand.php index 0f997a0..3057a2a 100644 --- a/commands/IdCommand.php +++ b/commands/IdCommand.php @@ -11,12 +11,12 @@ declare(strict_types=1); -namespace Longman\TelegramBot\Commands\UserCommands; +namespace PhpTelegramBot\Core\Commands\UserCommands; -use Longman\TelegramBot\Commands\UserCommand; -use Longman\TelegramBot\Entities\ServerResponse; -use Longman\TelegramBot\Exception\TelegramException; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Commands\UserCommand; +use PhpTelegramBot\Core\Entities\ServerResponse; +use PhpTelegramBot\Core\Exception\TelegramException; +use PhpTelegramBot\Core\Request; /** * Display user and chat information. diff --git a/commands/NewchatmembersCommand.php b/commands/NewchatmembersCommand.php index 66a0625..a6e7048 100644 --- a/commands/NewchatmembersCommand.php +++ b/commands/NewchatmembersCommand.php @@ -11,14 +11,14 @@ declare(strict_types=1); -namespace Longman\TelegramBot\Commands\SystemCommands; - -use Longman\TelegramBot\Commands\SystemCommand; -use Longman\TelegramBot\Entities\ChatMember; -use Longman\TelegramBot\Entities\ServerResponse; -use Longman\TelegramBot\Entities\User; -use Longman\TelegramBot\Exception\TelegramException; -use Longman\TelegramBot\Request; +namespace PhpTelegramBot\Core\Commands\SystemCommands; + +use PhpTelegramBot\Core\Commands\SystemCommand; +use PhpTelegramBot\Core\Entities\ChatMember; +use PhpTelegramBot\Core\Entities\ServerResponse; +use PhpTelegramBot\Core\Entities\User; +use PhpTelegramBot\Core\Exception\TelegramException; +use PhpTelegramBot\Core\Request; use TelegramBot\SupportBot\Helpers; /** diff --git a/commands/RulesCommand.php b/commands/RulesCommand.php index fd4e059..bd9e4b6 100644 --- a/commands/RulesCommand.php +++ b/commands/RulesCommand.php @@ -11,10 +11,10 @@ declare(strict_types=1); -namespace Longman\TelegramBot\Commands\UserCommands; +namespace PhpTelegramBot\Core\Commands\UserCommands; -use Longman\TelegramBot\Commands\UserCommand; -use Longman\TelegramBot\Entities\ServerResponse; +use PhpTelegramBot\Core\Commands\UserCommand; +use PhpTelegramBot\Core\Entities\ServerResponse; /** * User "/rules" command diff --git a/commands/StartCommand.php b/commands/StartCommand.php index 9e9984b..e03b7f2 100644 --- a/commands/StartCommand.php +++ b/commands/StartCommand.php @@ -11,11 +11,11 @@ declare(strict_types=1); -namespace Longman\TelegramBot\Commands\SystemCommands; +namespace PhpTelegramBot\Core\Commands\SystemCommands; -use Longman\TelegramBot\Commands\SystemCommand; -use Longman\TelegramBot\Entities\ServerResponse; -use Longman\TelegramBot\Exception\TelegramException; +use PhpTelegramBot\Core\Commands\SystemCommand; +use PhpTelegramBot\Core\Entities\ServerResponse; +use PhpTelegramBot\Core\Exception\TelegramException; /** * System "/start" command diff --git a/composer.json b/composer.json index 8bbf571..d700baa 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "telegram-bot/support-bot", + "name": "php-telegram-bot/support-bot", "type": "project", "description": "Friendly and helpful bot for t.me/PHP_Telegram_Support_Bot", "keywords": ["telegram", "bot", "manager"], @@ -21,7 +21,7 @@ "ext-json": "*", "ext-pdo": "*", "php-telegram-bot/telegram-bot-manager": "^1.5", - "longman/telegram-bot": "dev-master as 0.59", + "php-telegram-bot/core": "dev-master as 0.59", "noplanman/service-webhook-handler": "^0.2", "vlucas/phpdotenv": "^3.6", "php-http/guzzle6-adapter": "^1.1", diff --git a/public/manager.php b/public/manager.php index 57fd656..1403cd5 100644 --- a/public/manager.php +++ b/public/manager.php @@ -15,8 +15,8 @@ use Dotenv\Dotenv; use Exception; -use Longman\TelegramBot\Exception\TelegramLogException; -use Longman\TelegramBot\TelegramLog; +use PhpTelegramBot\Core\Exception\TelegramLogException; +use PhpTelegramBot\Core\TelegramLog; use Monolog\Formatter\LineFormatter; use Monolog\Handler\StreamHandler; use Monolog\Logger; diff --git a/public/webhooks/github.php b/public/webhooks/github.php index a45b2ec..dfed9e5 100644 --- a/public/webhooks/github.php +++ b/public/webhooks/github.php @@ -14,11 +14,11 @@ use Github\Api\Issue; use Github\Api\PullRequest; use Github\Client; -use Longman\TelegramBot\Entities\ServerResponse; -use Longman\TelegramBot\Exception\TelegramException; -use Longman\TelegramBot\Request; -use Longman\TelegramBot\Telegram; -use Longman\TelegramBot\TelegramLog; +use PhpTelegramBot\Core\Entities\ServerResponse; +use PhpTelegramBot\Core\Exception\TelegramException; +use PhpTelegramBot\Core\Request; +use PhpTelegramBot\Core\Telegram; +use PhpTelegramBot\Core\TelegramLog; use MatthiasMullie\Scrapbook\Adapters\MySQL; use MatthiasMullie\Scrapbook\Psr6\Pool; use Monolog\Formatter\LineFormatter; diff --git a/src/Helpers.php b/src/Helpers.php index b3ada87..348df75 100644 --- a/src/Helpers.php +++ b/src/Helpers.php @@ -13,9 +13,9 @@ namespace TelegramBot\SupportBot; -use Longman\TelegramBot\DB; -use Longman\TelegramBot\Request; -use Longman\TelegramBot\TelegramLog; +use PhpTelegramBot\Core\DB; +use PhpTelegramBot\Core\Request; +use PhpTelegramBot\Core\TelegramLog; class Helpers {