From 59dcf1809aa8aa611fb6e915c8e6399f6f3e6cc0 Mon Sep 17 00:00:00 2001 From: Marco De Bortoli Date: Wed, 15 Apr 2020 22:45:09 +0100 Subject: [PATCH 1/3] #1048: Modify namespace to reflect the project name --- README.md | 14 ++++----- composer.json | 6 ++-- doc/01-utils.md | 2 +- src/ChatAction.php | 2 +- src/Commands/AdminCommand.php | 2 +- src/Commands/AdminCommands/ChatsCommand.php | 16 +++++----- src/Commands/AdminCommands/CleanupCommand.php | 16 +++++----- src/Commands/AdminCommands/DebugCommand.php | 10 +++---- .../AdminCommands/SendtoallCommand.php | 12 ++++---- .../AdminCommands/SendtochannelCommand.php | 20 ++++++------- src/Commands/AdminCommands/WhoisCommand.php | 20 ++++++------- src/Commands/Command.php | 30 +++++++++---------- src/Commands/SystemCommand.php | 10 +++---- .../SystemCommands/CallbackqueryCommand.php | 6 ++-- .../SystemCommands/GenericCommand.php | 4 +-- .../SystemCommands/GenericmessageCommand.php | 12 ++++---- .../SystemCommands/InlinequeryCommand.php | 4 +-- src/Commands/UserCommand.php | 2 +- src/Commands/UserCommands/StartCommand.php | 8 ++--- src/Conversation.php | 4 +-- src/ConversationDB.php | 4 +-- src/DB.php | 28 ++++++++--------- src/Entities/Animation.php | 2 +- src/Entities/Audio.php | 2 +- src/Entities/BotCommand.php | 2 +- src/Entities/CallbackQuery.php | 4 +-- src/Entities/ChannelPost.php | 2 +- src/Entities/Chat.php | 2 +- src/Entities/ChatMember.php | 2 +- src/Entities/ChatPermissions.php | 2 +- src/Entities/ChatPhoto.php | 2 +- src/Entities/ChosenInlineResult.php | 2 +- src/Entities/Contact.php | 2 +- src/Entities/Dice.php | 2 +- src/Entities/Document.php | 2 +- src/Entities/EditedChannelPost.php | 2 +- src/Entities/EditedMessage.php | 2 +- src/Entities/Entity.php | 6 ++-- src/Entities/File.php | 2 +- src/Entities/Games/CallbackGame.php | 4 +-- src/Entities/Games/Game.php | 10 +++---- src/Entities/Games/GameHighScore.php | 6 ++-- src/Entities/InlineKeyboard.php | 2 +- src/Entities/InlineKeyboardButton.php | 6 ++-- src/Entities/InlineQuery.php | 6 ++-- src/Entities/InlineQuery/InlineEntity.php | 4 +-- .../InlineQuery/InlineQueryResult.php | 2 +- .../InlineQuery/InlineQueryResultArticle.php | 6 ++-- .../InlineQuery/InlineQueryResultAudio.php | 6 ++-- .../InlineQueryResultCachedAudio.php | 6 ++-- .../InlineQueryResultCachedDocument.php | 6 ++-- .../InlineQueryResultCachedGif.php | 6 ++-- .../InlineQueryResultCachedMpeg4Gif.php | 6 ++-- .../InlineQueryResultCachedPhoto.php | 6 ++-- .../InlineQueryResultCachedSticker.php | 6 ++-- .../InlineQueryResultCachedVideo.php | 6 ++-- .../InlineQueryResultCachedVoice.php | 6 ++-- .../InlineQuery/InlineQueryResultContact.php | 6 ++-- .../InlineQuery/InlineQueryResultDocument.php | 6 ++-- .../InlineQuery/InlineQueryResultGame.php | 4 +-- .../InlineQuery/InlineQueryResultGif.php | 6 ++-- .../InlineQuery/InlineQueryResultLocation.php | 6 ++-- .../InlineQuery/InlineQueryResultMpeg4Gif.php | 6 ++-- .../InlineQuery/InlineQueryResultPhoto.php | 6 ++-- .../InlineQuery/InlineQueryResultVenue.php | 6 ++-- .../InlineQuery/InlineQueryResultVideo.php | 6 ++-- .../InlineQuery/InlineQueryResultVoice.php | 6 ++-- src/Entities/InputMedia/InputMedia.php | 2 +- .../InputMedia/InputMediaAnimation.php | 4 +-- src/Entities/InputMedia/InputMediaAudio.php | 4 +-- .../InputMedia/InputMediaDocument.php | 4 +-- src/Entities/InputMedia/InputMediaPhoto.php | 4 +-- src/Entities/InputMedia/InputMediaVideo.php | 4 +-- .../InputContactMessageContent.php | 4 +-- .../InputLocationMessageContent.php | 4 +-- .../InputMessageContent.php | 2 +- .../InputTextMessageContent.php | 4 +-- .../InputVenueMessageContent.php | 4 +-- src/Entities/Keyboard.php | 4 +-- src/Entities/KeyboardButton.php | 4 +-- src/Entities/KeyboardButtonPollType.php | 2 +- src/Entities/Location.php | 2 +- src/Entities/LoginUrl.php | 2 +- src/Entities/MaskPosition.php | 2 +- src/Entities/Message.php | 10 +++---- src/Entities/MessageEntity.php | 2 +- src/Entities/Payments/Invoice.php | 4 +-- src/Entities/Payments/LabeledPrice.php | 4 +-- src/Entities/Payments/OrderInfo.php | 4 +-- src/Entities/Payments/PreCheckoutQuery.php | 10 +++---- src/Entities/Payments/ShippingAddress.php | 4 +-- src/Entities/Payments/ShippingOption.php | 4 +-- src/Entities/Payments/ShippingQuery.php | 10 +++---- src/Entities/Payments/SuccessfulPayment.php | 4 +-- src/Entities/PhotoSize.php | 2 +- src/Entities/Poll.php | 2 +- src/Entities/PollAnswer.php | 2 +- src/Entities/PollOption.php | 2 +- src/Entities/ReplyToMessage.php | 2 +- src/Entities/ServerResponse.php | 6 ++-- src/Entities/Sticker.php | 2 +- src/Entities/StickerSet.php | 2 +- .../TelegramPassport/EncryptedCredentials.php | 4 +-- .../EncryptedPassportElement.php | 4 +-- .../TelegramPassport/PassportData.php | 4 +-- .../PassportElementErrorDataField.php | 2 +- .../PassportElementErrorFile.php | 2 +- .../PassportElementErrorFiles.php | 2 +- .../PassportElementErrorFrontSide.php | 2 +- .../PassportElementErrorReverseSide.php | 2 +- .../PassportElementErrorSelfie.php | 2 +- .../PassportElementErrorTranslationFile.php | 2 +- .../PassportElementErrorTranslationFiles.php | 2 +- .../PassportElementErrorUnspecified.php | 2 +- .../TelegramPassport/PassportFile.php | 4 +-- src/Entities/Update.php | 6 ++-- src/Entities/User.php | 2 +- src/Entities/UserProfilePhotos.php | 2 +- src/Entities/Venue.php | 2 +- src/Entities/Video.php | 2 +- src/Entities/VideoNote.php | 2 +- src/Entities/Voice.php | 2 +- src/Entities/WebhookInfo.php | 2 +- src/Exception/InvalidBotTokenException.php | 2 +- src/Exception/TelegramException.php | 2 +- src/Exception/TelegramLogException.php | 2 +- src/Request.php | 14 ++++----- src/Telegram.php | 10 +++---- src/TelegramLog.php | 2 +- tests/unit/Commands/CommandTest.php | 10 +++---- tests/unit/Commands/CommandTestCase.php | 8 ++--- .../CustomTestCommands/HiddenCommand.php | 6 ++-- .../CustomTestCommands/VisibleCommand.php | 6 ++-- tests/unit/ConversationTest.php | 8 ++--- tests/unit/Entities/AudioTest.php | 4 +-- tests/unit/Entities/ChatTest.php | 2 +- tests/unit/Entities/FileTest.php | 4 +-- .../Entities/InlineKeyboardButtonTest.php | 8 ++--- tests/unit/Entities/InlineKeyboardTest.php | 8 ++--- tests/unit/Entities/KeyboardButtonTest.php | 8 ++--- tests/unit/Entities/KeyboardTest.php | 8 ++--- tests/unit/Entities/LocationTest.php | 4 +-- tests/unit/Entities/MessageTest.php | 2 +- tests/unit/Entities/ReplyToMessageTest.php | 4 +-- tests/unit/Entities/ServerResponseTest.php | 22 +++++++------- tests/unit/Entities/UpdateTest.php | 4 +-- tests/unit/Entities/UserTest.php | 4 +-- tests/unit/Entities/WebhookInfoTest.php | 4 +-- tests/unit/TelegramLogTest.php | 4 +-- tests/unit/TelegramTest.php | 6 ++-- tests/unit/TestCase.php | 2 +- tests/unit/TestHelpers.php | 12 ++++---- utils/importFromLog.php | 6 ++-- 153 files changed, 401 insertions(+), 401 deletions(-) diff --git a/README.md b/README.md index 05cdb1e45..fe8157303 100644 --- a/README.md +++ b/README.md @@ -218,14 +218,14 @@ $hook_url = 'https://your-domain/path/to/hook.php'; try { // Create Telegram API object - $telegram = new Longman\TelegramBot\Telegram($bot_api_key, $bot_username); + $telegram = new PhpTelegramBot\Core\Telegram($bot_api_key, $bot_username); // Set webhook $result = $telegram->setWebhook($hook_url); if ($result->isOk()) { echo $result->getDescription(); } -} catch (Longman\TelegramBot\Exception\TelegramException $e) { +} catch (PhpTelegramBot\Core\Exception\TelegramException $e) { // log telegram errors // echo $e->getMessage(); } @@ -245,11 +245,11 @@ $bot_username = 'username_bot'; try { // Create Telegram API object - $telegram = new Longman\TelegramBot\Telegram($bot_api_key, $bot_username); + $telegram = new PhpTelegramBot\Core\Telegram($bot_api_key, $bot_username); // Handle telegram webhook request $telegram->handle(); -} catch (Longman\TelegramBot\Exception\TelegramException $e) { +} catch (PhpTelegramBot\Core\Exception\TelegramException $e) { // Silence is golden! // log telegram errors // echo $e->getMessage(); @@ -290,14 +290,14 @@ $mysql_credentials = [ try { // Create Telegram API object - $telegram = new Longman\TelegramBot\Telegram($bot_api_key, $bot_username); + $telegram = new PhpTelegramBot\Core\Telegram($bot_api_key, $bot_username); // Enable MySQL $telegram->enableMySql($mysql_credentials); // Handle telegram getUpdates request $telegram->handleGetUpdates(); -} catch (Longman\TelegramBot\Exception\TelegramException $e) { +} catch (PhpTelegramBot\Core\Exception\TelegramException $e) { // log telegram errors // echo $e->getMessage(); } @@ -382,7 +382,7 @@ See the [*ImageCommand.php*][ImageCommand.php] for a full example. ```php Request::sendChatAction([ 'chat_id' => $chat_id, - 'action' => Longman\TelegramBot\ChatAction::TYPING, + 'action' => PhpTelegramBot\Core\ChatAction::TYPING, ]); ``` diff --git a/composer.json b/composer.json index 32c0942c3..256e5c7d7 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "longman/telegram-bot", + "name": "php-telegram-bot/core", "type": "library", "description": "PHP Telegram bot", "keywords": ["telegram", "bot", "api"], @@ -39,12 +39,12 @@ }, "autoload": { "psr-4": { - "Longman\\TelegramBot\\": "src/" + "PhpTelegramBot\\Core\\": "src/" } }, "autoload-dev": { "psr-4": { - "Longman\\TelegramBot\\Tests\\Unit\\": "tests/unit" + "PhpTelegramBot\\Core\\Tests\\Unit\\": "tests/unit" } }, "scripts": { diff --git a/doc/01-utils.md b/doc/01-utils.md index 145338272..b343a28d1 100644 --- a/doc/01-utils.md +++ b/doc/01-utils.md @@ -15,7 +15,7 @@ The first parameter is the main logger, the second one is used for the raw updat (in this example we're using [Monolog]) ```php -use Longman\TelegramBot\TelegramLog; +use PhpTelegramBot\Core\TelegramLog; use Monolog\Formatter\LineFormatter; use Monolog\Handler\StreamHandler; use Monolog\Logger; diff --git a/src/ChatAction.php b/src/ChatAction.php index 77a7666ef..47083739f 100644 --- a/src/ChatAction.php +++ b/src/ChatAction.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot; +namespace PhpTelegramBot\Core; class ChatAction { diff --git a/src/Commands/AdminCommand.php b/src/Commands/AdminCommand.php index d63f6b60c..886646074 100644 --- a/src/Commands/AdminCommand.php +++ b/src/Commands/AdminCommand.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands; +namespace PhpTelegramBot\Core\Commands; abstract class AdminCommand extends Command { diff --git a/src/Commands/AdminCommands/ChatsCommand.php b/src/Commands/AdminCommands/ChatsCommand.php index 738f2a2f0..168f9e823 100644 --- a/src/Commands/AdminCommands/ChatsCommand.php +++ b/src/Commands/AdminCommands/ChatsCommand.php @@ -9,14 +9,14 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\AdminCommands; - -use Longman\TelegramBot\Commands\AdminCommand; -use Longman\TelegramBot\DB; -use Longman\TelegramBot\Entities\Chat; -use Longman\TelegramBot\Entities\ServerResponse; -use Longman\TelegramBot\Exception\TelegramException; -use Longman\TelegramBot\Request; +namespace PhpTelegramBot\Core\Commands\AdminCommands; + +use PhpTelegramBot\Core\Commands\AdminCommand; +use PhpTelegramBot\Core\DB; +use PhpTelegramBot\Core\Entities\Chat; +use PhpTelegramBot\Core\Entities\ServerResponse; +use PhpTelegramBot\Core\Exception\TelegramException; +use PhpTelegramBot\Core\Request; class ChatsCommand extends AdminCommand { diff --git a/src/Commands/AdminCommands/CleanupCommand.php b/src/Commands/AdminCommands/CleanupCommand.php index bcc2ef949..4674366ed 100644 --- a/src/Commands/AdminCommands/CleanupCommand.php +++ b/src/Commands/AdminCommands/CleanupCommand.php @@ -9,14 +9,14 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\AdminCommands; - -use Longman\TelegramBot\Commands\AdminCommand; -use Longman\TelegramBot\DB; -use Longman\TelegramBot\Entities\ServerResponse; -use Longman\TelegramBot\Exception\TelegramException; -use Longman\TelegramBot\Request; -use Longman\TelegramBot\TelegramLog; +namespace PhpTelegramBot\Core\Commands\AdminCommands; + +use PhpTelegramBot\Core\Commands\AdminCommand; +use PhpTelegramBot\Core\DB; +use PhpTelegramBot\Core\Entities\ServerResponse; +use PhpTelegramBot\Core\Exception\TelegramException; +use PhpTelegramBot\Core\Request; +use PhpTelegramBot\Core\TelegramLog; use PDOException; /** diff --git a/src/Commands/AdminCommands/DebugCommand.php b/src/Commands/AdminCommands/DebugCommand.php index 50cc00897..2cf4e05af 100644 --- a/src/Commands/AdminCommands/DebugCommand.php +++ b/src/Commands/AdminCommands/DebugCommand.php @@ -9,12 +9,12 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\AdminCommands; +namespace PhpTelegramBot\Core\Commands\AdminCommands; -use Longman\TelegramBot\Commands\AdminCommand; -use Longman\TelegramBot\DB; -use Longman\TelegramBot\Exception\TelegramException; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Commands\AdminCommand; +use PhpTelegramBot\Core\DB; +use PhpTelegramBot\Core\Exception\TelegramException; +use PhpTelegramBot\Core\Request; /** * Admin "/debug" command diff --git a/src/Commands/AdminCommands/SendtoallCommand.php b/src/Commands/AdminCommands/SendtoallCommand.php index e87050eba..dfb914d7e 100644 --- a/src/Commands/AdminCommands/SendtoallCommand.php +++ b/src/Commands/AdminCommands/SendtoallCommand.php @@ -9,13 +9,13 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\AdminCommands; +namespace PhpTelegramBot\Core\Commands\AdminCommands; -use Longman\TelegramBot\Commands\AdminCommand; -use Longman\TelegramBot\Entities\Message; -use Longman\TelegramBot\Entities\ServerResponse; -use Longman\TelegramBot\Exception\TelegramException; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Commands\AdminCommand; +use PhpTelegramBot\Core\Entities\Message; +use PhpTelegramBot\Core\Entities\ServerResponse; +use PhpTelegramBot\Core\Exception\TelegramException; +use PhpTelegramBot\Core\Request; /** * Admin "/sendtoall" command diff --git a/src/Commands/AdminCommands/SendtochannelCommand.php b/src/Commands/AdminCommands/SendtochannelCommand.php index 444e1be49..e497b619e 100644 --- a/src/Commands/AdminCommands/SendtochannelCommand.php +++ b/src/Commands/AdminCommands/SendtochannelCommand.php @@ -9,16 +9,16 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\AdminCommands; - -use Longman\TelegramBot\Commands\AdminCommand; -use Longman\TelegramBot\Conversation; -use Longman\TelegramBot\Entities\Chat; -use Longman\TelegramBot\Entities\Keyboard; -use Longman\TelegramBot\Entities\Message; -use Longman\TelegramBot\Entities\ServerResponse; -use Longman\TelegramBot\Exception\TelegramException; -use Longman\TelegramBot\Request; +namespace PhpTelegramBot\Core\Commands\AdminCommands; + +use PhpTelegramBot\Core\Commands\AdminCommand; +use PhpTelegramBot\Core\Conversation; +use PhpTelegramBot\Core\Entities\Chat; +use PhpTelegramBot\Core\Entities\Keyboard; +use PhpTelegramBot\Core\Entities\Message; +use PhpTelegramBot\Core\Entities\ServerResponse; +use PhpTelegramBot\Core\Exception\TelegramException; +use PhpTelegramBot\Core\Request; class SendtochannelCommand extends AdminCommand { diff --git a/src/Commands/AdminCommands/WhoisCommand.php b/src/Commands/AdminCommands/WhoisCommand.php index 5636b2101..ce2a0a4c9 100644 --- a/src/Commands/AdminCommands/WhoisCommand.php +++ b/src/Commands/AdminCommands/WhoisCommand.php @@ -11,16 +11,16 @@ * Written by Jack'lul */ -namespace Longman\TelegramBot\Commands\AdminCommands; - -use Longman\TelegramBot\Commands\AdminCommand; -use Longman\TelegramBot\DB; -use Longman\TelegramBot\Entities\Chat; -use Longman\TelegramBot\Entities\PhotoSize; -use Longman\TelegramBot\Entities\ServerResponse; -use Longman\TelegramBot\Entities\UserProfilePhotos; -use Longman\TelegramBot\Exception\TelegramException; -use Longman\TelegramBot\Request; +namespace PhpTelegramBot\Core\Commands\AdminCommands; + +use PhpTelegramBot\Core\Commands\AdminCommand; +use PhpTelegramBot\Core\DB; +use PhpTelegramBot\Core\Entities\Chat; +use PhpTelegramBot\Core\Entities\PhotoSize; +use PhpTelegramBot\Core\Entities\ServerResponse; +use PhpTelegramBot\Core\Entities\UserProfilePhotos; +use PhpTelegramBot\Core\Exception\TelegramException; +use PhpTelegramBot\Core\Request; /** * Admin "/whois" command diff --git a/src/Commands/Command.php b/src/Commands/Command.php index 04d9a75c3..d1d7aff8a 100644 --- a/src/Commands/Command.php +++ b/src/Commands/Command.php @@ -9,21 +9,21 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands; - -use Longman\TelegramBot\DB; -use Longman\TelegramBot\Entities\CallbackQuery; -use Longman\TelegramBot\Entities\ChosenInlineResult; -use Longman\TelegramBot\Entities\InlineQuery; -use Longman\TelegramBot\Entities\Message; -use Longman\TelegramBot\Entities\Payments\PreCheckoutQuery; -use Longman\TelegramBot\Entities\Payments\ShippingQuery; -use Longman\TelegramBot\Entities\Poll; -use Longman\TelegramBot\Entities\ServerResponse; -use Longman\TelegramBot\Entities\Update; -use Longman\TelegramBot\Exception\TelegramException; -use Longman\TelegramBot\Request; -use Longman\TelegramBot\Telegram; +namespace PhpTelegramBot\Core\Commands; + +use PhpTelegramBot\Core\DB; +use PhpTelegramBot\Core\Entities\CallbackQuery; +use PhpTelegramBot\Core\Entities\ChosenInlineResult; +use PhpTelegramBot\Core\Entities\InlineQuery; +use PhpTelegramBot\Core\Entities\Message; +use PhpTelegramBot\Core\Entities\Payments\PreCheckoutQuery; +use PhpTelegramBot\Core\Entities\Payments\ShippingQuery; +use PhpTelegramBot\Core\Entities\Poll; +use PhpTelegramBot\Core\Entities\ServerResponse; +use PhpTelegramBot\Core\Entities\Update; +use PhpTelegramBot\Core\Exception\TelegramException; +use PhpTelegramBot\Core\Request; +use PhpTelegramBot\Core\Telegram; /** * Class Command diff --git a/src/Commands/SystemCommand.php b/src/Commands/SystemCommand.php index 837a3e4de..5a01dfc81 100644 --- a/src/Commands/SystemCommand.php +++ b/src/Commands/SystemCommand.php @@ -9,12 +9,12 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands; +namespace PhpTelegramBot\Core\Commands; -use Longman\TelegramBot\Conversation; -use Longman\TelegramBot\Entities\ServerResponse; -use Longman\TelegramBot\Exception\TelegramException; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Conversation; +use PhpTelegramBot\Core\Entities\ServerResponse; +use PhpTelegramBot\Core\Exception\TelegramException; +use PhpTelegramBot\Core\Request; abstract class SystemCommand extends Command { diff --git a/src/Commands/SystemCommands/CallbackqueryCommand.php b/src/Commands/SystemCommands/CallbackqueryCommand.php index 254dd3a31..c490d5214 100644 --- a/src/Commands/SystemCommands/CallbackqueryCommand.php +++ b/src/Commands/SystemCommands/CallbackqueryCommand.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\SystemCommands; +namespace PhpTelegramBot\Core\Commands\SystemCommands; -use Longman\TelegramBot\Commands\SystemCommand; -use Longman\TelegramBot\Entities\ServerResponse; +use PhpTelegramBot\Core\Commands\SystemCommand; +use PhpTelegramBot\Core\Entities\ServerResponse; /** * Callback query command diff --git a/src/Commands/SystemCommands/GenericCommand.php b/src/Commands/SystemCommands/GenericCommand.php index d7cae29eb..ad98d76b7 100644 --- a/src/Commands/SystemCommands/GenericCommand.php +++ b/src/Commands/SystemCommands/GenericCommand.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\SystemCommands; +namespace PhpTelegramBot\Core\Commands\SystemCommands; -use Longman\TelegramBot\Commands\SystemCommand; +use PhpTelegramBot\Core\Commands\SystemCommand; /** * Generic command diff --git a/src/Commands/SystemCommands/GenericmessageCommand.php b/src/Commands/SystemCommands/GenericmessageCommand.php index ae59694b5..7a11307bb 100644 --- a/src/Commands/SystemCommands/GenericmessageCommand.php +++ b/src/Commands/SystemCommands/GenericmessageCommand.php @@ -9,13 +9,13 @@ * file that was distributed with this source code. */ -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 Longman\TelegramBot\Telegram; +use PhpTelegramBot\Core\Commands\SystemCommand; +use PhpTelegramBot\Core\Entities\ServerResponse; +use PhpTelegramBot\Core\Exception\TelegramException; +use PhpTelegramBot\Core\Request; +use PhpTelegramBot\Core\Telegram; /** * Generic message command diff --git a/src/Commands/SystemCommands/InlinequeryCommand.php b/src/Commands/SystemCommands/InlinequeryCommand.php index 9a6ee8d14..987713707 100644 --- a/src/Commands/SystemCommands/InlinequeryCommand.php +++ b/src/Commands/SystemCommands/InlinequeryCommand.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\SystemCommands; +namespace PhpTelegramBot\Core\Commands\SystemCommands; -use Longman\TelegramBot\Commands\SystemCommand; +use PhpTelegramBot\Core\Commands\SystemCommand; /** * Inline query command diff --git a/src/Commands/UserCommand.php b/src/Commands/UserCommand.php index 2fba11236..f0aef91ac 100644 --- a/src/Commands/UserCommand.php +++ b/src/Commands/UserCommand.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands; +namespace PhpTelegramBot\Core\Commands; abstract class UserCommand extends Command { diff --git a/src/Commands/UserCommands/StartCommand.php b/src/Commands/UserCommands/StartCommand.php index 698917d3b..f92d55d6e 100644 --- a/src/Commands/UserCommands/StartCommand.php +++ b/src/Commands/UserCommands/StartCommand.php @@ -9,11 +9,11 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\UserCommands; +namespace PhpTelegramBot\Core\Commands\UserCommands; -use Longman\TelegramBot\Commands\UserCommand; -use Longman\TelegramBot\Entities\ServerResponse; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Commands\UserCommand; +use PhpTelegramBot\Core\Entities\ServerResponse; +use PhpTelegramBot\Core\Request; /** * Start command diff --git a/src/Conversation.php b/src/Conversation.php index 42406e098..f32561d87 100644 --- a/src/Conversation.php +++ b/src/Conversation.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot; +namespace PhpTelegramBot\Core; -use Longman\TelegramBot\Exception\TelegramException; +use PhpTelegramBot\Core\Exception\TelegramException; /** * Class Conversation diff --git a/src/ConversationDB.php b/src/ConversationDB.php index 91241b086..a3abe2a73 100644 --- a/src/ConversationDB.php +++ b/src/ConversationDB.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot; +namespace PhpTelegramBot\Core; use Exception; -use Longman\TelegramBot\Exception\TelegramException; +use PhpTelegramBot\Core\Exception\TelegramException; use PDO; class ConversationDB extends DB diff --git a/src/DB.php b/src/DB.php index 3a7100113..38a117617 100644 --- a/src/DB.php +++ b/src/DB.php @@ -10,20 +10,20 @@ * Written by Marco Boretto */ -namespace Longman\TelegramBot; - -use Longman\TelegramBot\Entities\CallbackQuery; -use Longman\TelegramBot\Entities\Chat; -use Longman\TelegramBot\Entities\ChosenInlineResult; -use Longman\TelegramBot\Entities\InlineQuery; -use Longman\TelegramBot\Entities\Message; -use Longman\TelegramBot\Entities\Payments\PreCheckoutQuery; -use Longman\TelegramBot\Entities\Payments\ShippingQuery; -use Longman\TelegramBot\Entities\Poll; -use Longman\TelegramBot\Entities\PollAnswer; -use Longman\TelegramBot\Entities\Update; -use Longman\TelegramBot\Entities\User; -use Longman\TelegramBot\Exception\TelegramException; +namespace PhpTelegramBot\Core; + +use PhpTelegramBot\Core\Entities\CallbackQuery; +use PhpTelegramBot\Core\Entities\Chat; +use PhpTelegramBot\Core\Entities\ChosenInlineResult; +use PhpTelegramBot\Core\Entities\InlineQuery; +use PhpTelegramBot\Core\Entities\Message; +use PhpTelegramBot\Core\Entities\Payments\PreCheckoutQuery; +use PhpTelegramBot\Core\Entities\Payments\ShippingQuery; +use PhpTelegramBot\Core\Entities\Poll; +use PhpTelegramBot\Core\Entities\PollAnswer; +use PhpTelegramBot\Core\Entities\Update; +use PhpTelegramBot\Core\Entities\User; +use PhpTelegramBot\Core\Exception\TelegramException; use PDO; use PDOException; diff --git a/src/Entities/Animation.php b/src/Entities/Animation.php index e5a394246..72548c1a4 100644 --- a/src/Entities/Animation.php +++ b/src/Entities/Animation.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class Animation diff --git a/src/Entities/Audio.php b/src/Entities/Audio.php index 458f70821..cc5fa4dab 100644 --- a/src/Entities/Audio.php +++ b/src/Entities/Audio.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class Audio diff --git a/src/Entities/BotCommand.php b/src/Entities/BotCommand.php index dc3302e45..a2b83ab1f 100644 --- a/src/Entities/BotCommand.php +++ b/src/Entities/BotCommand.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class BotCommand diff --git a/src/Entities/CallbackQuery.php b/src/Entities/CallbackQuery.php index 3c938d0fd..3234171c8 100644 --- a/src/Entities/CallbackQuery.php +++ b/src/Entities/CallbackQuery.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Request; /** * Class CallbackQuery. diff --git a/src/Entities/ChannelPost.php b/src/Entities/ChannelPost.php index 366fc5ce4..8141e7843 100644 --- a/src/Entities/ChannelPost.php +++ b/src/Entities/ChannelPost.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * {@inheritdoc} diff --git a/src/Entities/Chat.php b/src/Entities/Chat.php index b535d860b..8be869ac6 100644 --- a/src/Entities/Chat.php +++ b/src/Entities/Chat.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class Chat diff --git a/src/Entities/ChatMember.php b/src/Entities/ChatMember.php index ced617adc..22505c30f 100644 --- a/src/Entities/ChatMember.php +++ b/src/Entities/ChatMember.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class ChatMember diff --git a/src/Entities/ChatPermissions.php b/src/Entities/ChatPermissions.php index 5835eac5f..d0f436a86 100644 --- a/src/Entities/ChatPermissions.php +++ b/src/Entities/ChatPermissions.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class ChatPermissions diff --git a/src/Entities/ChatPhoto.php b/src/Entities/ChatPhoto.php index eb5d54a8a..26536dca3 100644 --- a/src/Entities/ChatPhoto.php +++ b/src/Entities/ChatPhoto.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class ChatPhoto diff --git a/src/Entities/ChosenInlineResult.php b/src/Entities/ChosenInlineResult.php index 8cb982629..7d6ac7f44 100644 --- a/src/Entities/ChosenInlineResult.php +++ b/src/Entities/ChosenInlineResult.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class ChosenInlineResult diff --git a/src/Entities/Contact.php b/src/Entities/Contact.php index d51056d83..254bef7cd 100644 --- a/src/Entities/Contact.php +++ b/src/Entities/Contact.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class Contact diff --git a/src/Entities/Dice.php b/src/Entities/Dice.php index 51df627a1..1baf200ce 100644 --- a/src/Entities/Dice.php +++ b/src/Entities/Dice.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class Dice diff --git a/src/Entities/Document.php b/src/Entities/Document.php index 4dfbaa708..cd1baa00f 100644 --- a/src/Entities/Document.php +++ b/src/Entities/Document.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class Document diff --git a/src/Entities/EditedChannelPost.php b/src/Entities/EditedChannelPost.php index 4351c056d..3031f1b26 100644 --- a/src/Entities/EditedChannelPost.php +++ b/src/Entities/EditedChannelPost.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * {@inheritdoc} diff --git a/src/Entities/EditedMessage.php b/src/Entities/EditedMessage.php index 7c922d44e..b0834a7ed 100644 --- a/src/Entities/EditedMessage.php +++ b/src/Entities/EditedMessage.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * {@inheritdoc} diff --git a/src/Entities/Entity.php b/src/Entities/Entity.php index ca36dc588..6bafa5eb7 100644 --- a/src/Entities/Entity.php +++ b/src/Entities/Entity.php @@ -9,11 +9,11 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; use Exception; -use Longman\TelegramBot\Entities\InlineQuery\InlineEntity; -use Longman\TelegramBot\Entities\InputMedia\InputMedia; +use PhpTelegramBot\Core\Entities\InlineQuery\InlineEntity; +use PhpTelegramBot\Core\Entities\InputMedia\InputMedia; /** * Class Entity diff --git a/src/Entities/File.php b/src/Entities/File.php index a988dad49..37a96e212 100644 --- a/src/Entities/File.php +++ b/src/Entities/File.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class File diff --git a/src/Entities/Games/CallbackGame.php b/src/Entities/Games/CallbackGame.php index 078d80746..f03d877ee 100644 --- a/src/Entities/Games/CallbackGame.php +++ b/src/Entities/Games/CallbackGame.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities\Games; +namespace PhpTelegramBot\Core\Entities\Games; -use Longman\TelegramBot\Entities\Entity; +use PhpTelegramBot\Core\Entities\Entity; /** * Class CallbackGame diff --git a/src/Entities/Games/Game.php b/src/Entities/Games/Game.php index 1787a01b9..f5d74c3b6 100644 --- a/src/Entities/Games/Game.php +++ b/src/Entities/Games/Game.php @@ -9,12 +9,12 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities\Games; +namespace PhpTelegramBot\Core\Entities\Games; -use Longman\TelegramBot\Entities\Animation; -use Longman\TelegramBot\Entities\Entity; -use Longman\TelegramBot\Entities\MessageEntity; -use Longman\TelegramBot\Entities\PhotoSize; +use PhpTelegramBot\Core\Entities\Animation; +use PhpTelegramBot\Core\Entities\Entity; +use PhpTelegramBot\Core\Entities\MessageEntity; +use PhpTelegramBot\Core\Entities\PhotoSize; /** * Class Game diff --git a/src/Entities/Games/GameHighScore.php b/src/Entities/Games/GameHighScore.php index f5ea2bcaf..e6fae3ac4 100644 --- a/src/Entities/Games/GameHighScore.php +++ b/src/Entities/Games/GameHighScore.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities\Games; +namespace PhpTelegramBot\Core\Entities\Games; -use Longman\TelegramBot\Entities\Entity; -use Longman\TelegramBot\Entities\User; +use PhpTelegramBot\Core\Entities\Entity; +use PhpTelegramBot\Core\Entities\User; /** * Class GameHighScore diff --git a/src/Entities/InlineKeyboard.php b/src/Entities/InlineKeyboard.php index 30feea28a..0d839214b 100644 --- a/src/Entities/InlineKeyboard.php +++ b/src/Entities/InlineKeyboard.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class InlineKeyboard diff --git a/src/Entities/InlineKeyboardButton.php b/src/Entities/InlineKeyboardButton.php index 1ee0e1ed1..fcb57c4e4 100644 --- a/src/Entities/InlineKeyboardButton.php +++ b/src/Entities/InlineKeyboardButton.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; -use Longman\TelegramBot\Entities\Games\CallbackGame; -use Longman\TelegramBot\Exception\TelegramException; +use PhpTelegramBot\Core\Entities\Games\CallbackGame; +use PhpTelegramBot\Core\Exception\TelegramException; /** * Class InlineKeyboardButton diff --git a/src/Entities/InlineQuery.php b/src/Entities/InlineQuery.php index 632bacc23..589eb9e0d 100644 --- a/src/Entities/InlineQuery.php +++ b/src/Entities/InlineQuery.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; -use Longman\TelegramBot\Entities\InlineQuery\InlineQueryResult; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Entities\InlineQuery\InlineQueryResult; +use PhpTelegramBot\Core\Request; /** * Class InlineQuery diff --git a/src/Entities/InlineQuery/InlineEntity.php b/src/Entities/InlineQuery/InlineEntity.php index 80e6eeb06..704feacb9 100644 --- a/src/Entities/InlineQuery/InlineEntity.php +++ b/src/Entities/InlineQuery/InlineEntity.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities\InlineQuery; +namespace PhpTelegramBot\Core\Entities\InlineQuery; -use Longman\TelegramBot\Entities\Entity; +use PhpTelegramBot\Core\Entities\Entity; /** * Class InlineEntity diff --git a/src/Entities/InlineQuery/InlineQueryResult.php b/src/Entities/InlineQuery/InlineQueryResult.php index f8e038ea8..d94967f17 100644 --- a/src/Entities/InlineQuery/InlineQueryResult.php +++ b/src/Entities/InlineQuery/InlineQueryResult.php @@ -1,6 +1,6 @@ */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; -use Longman\TelegramBot\Exception\TelegramException; +use PhpTelegramBot\Core\Exception\TelegramException; /** * Class Keyboard diff --git a/src/Entities/KeyboardButton.php b/src/Entities/KeyboardButton.php index b3b73f3ea..a58819626 100644 --- a/src/Entities/KeyboardButton.php +++ b/src/Entities/KeyboardButton.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; -use Longman\TelegramBot\Exception\TelegramException; +use PhpTelegramBot\Core\Exception\TelegramException; /** * Class KeyboardButton diff --git a/src/Entities/KeyboardButtonPollType.php b/src/Entities/KeyboardButtonPollType.php index f11023123..81e144169 100644 --- a/src/Entities/KeyboardButtonPollType.php +++ b/src/Entities/KeyboardButtonPollType.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class KeyboardButtonPollType diff --git a/src/Entities/Location.php b/src/Entities/Location.php index 61ff4b814..00d5d9092 100644 --- a/src/Entities/Location.php +++ b/src/Entities/Location.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class Location diff --git a/src/Entities/LoginUrl.php b/src/Entities/LoginUrl.php index 9d4c22a6b..498f1d7c7 100644 --- a/src/Entities/LoginUrl.php +++ b/src/Entities/LoginUrl.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class LoginUrl diff --git a/src/Entities/MaskPosition.php b/src/Entities/MaskPosition.php index 76b62425b..d4d6339b8 100644 --- a/src/Entities/MaskPosition.php +++ b/src/Entities/MaskPosition.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class MaskPosition diff --git a/src/Entities/Message.php b/src/Entities/Message.php index aede29fc5..37590639f 100644 --- a/src/Entities/Message.php +++ b/src/Entities/Message.php @@ -9,12 +9,12 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; -use Longman\TelegramBot\Entities\Games\Game; -use Longman\TelegramBot\Entities\Payments\Invoice; -use Longman\TelegramBot\Entities\Payments\SuccessfulPayment; -use Longman\TelegramBot\Entities\TelegramPassport\PassportData; +use PhpTelegramBot\Core\Entities\Games\Game; +use PhpTelegramBot\Core\Entities\Payments\Invoice; +use PhpTelegramBot\Core\Entities\Payments\SuccessfulPayment; +use PhpTelegramBot\Core\Entities\TelegramPassport\PassportData; /** * Class Message diff --git a/src/Entities/MessageEntity.php b/src/Entities/MessageEntity.php index 53c6ed355..dfaa50b22 100644 --- a/src/Entities/MessageEntity.php +++ b/src/Entities/MessageEntity.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class MessageEntity diff --git a/src/Entities/Payments/Invoice.php b/src/Entities/Payments/Invoice.php index b30ac5d37..e7b527222 100644 --- a/src/Entities/Payments/Invoice.php +++ b/src/Entities/Payments/Invoice.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities\Payments; +namespace PhpTelegramBot\Core\Entities\Payments; -use Longman\TelegramBot\Entities\Entity; +use PhpTelegramBot\Core\Entities\Entity; /** * Class Invoice diff --git a/src/Entities/Payments/LabeledPrice.php b/src/Entities/Payments/LabeledPrice.php index a78d647d3..e4afe8860 100644 --- a/src/Entities/Payments/LabeledPrice.php +++ b/src/Entities/Payments/LabeledPrice.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities\Payments; +namespace PhpTelegramBot\Core\Entities\Payments; -use Longman\TelegramBot\Entities\Entity; +use PhpTelegramBot\Core\Entities\Entity; /** * Class LabeledPrice diff --git a/src/Entities/Payments/OrderInfo.php b/src/Entities/Payments/OrderInfo.php index 4a1f21e07..f6e2968d1 100644 --- a/src/Entities/Payments/OrderInfo.php +++ b/src/Entities/Payments/OrderInfo.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities\Payments; +namespace PhpTelegramBot\Core\Entities\Payments; -use Longman\TelegramBot\Entities\Entity; +use PhpTelegramBot\Core\Entities\Entity; /** * Class OrderInfo diff --git a/src/Entities/Payments/PreCheckoutQuery.php b/src/Entities/Payments/PreCheckoutQuery.php index 96e36043e..1e17fbb9f 100644 --- a/src/Entities/Payments/PreCheckoutQuery.php +++ b/src/Entities/Payments/PreCheckoutQuery.php @@ -9,12 +9,12 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities\Payments; +namespace PhpTelegramBot\Core\Entities\Payments; -use Longman\TelegramBot\Entities\Entity; -use Longman\TelegramBot\Entities\ServerResponse; -use Longman\TelegramBot\Entities\User; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Entities\Entity; +use PhpTelegramBot\Core\Entities\ServerResponse; +use PhpTelegramBot\Core\Entities\User; +use PhpTelegramBot\Core\Request; /** * Class PreCheckoutQuery diff --git a/src/Entities/Payments/ShippingAddress.php b/src/Entities/Payments/ShippingAddress.php index e48f64e7f..80b52a540 100644 --- a/src/Entities/Payments/ShippingAddress.php +++ b/src/Entities/Payments/ShippingAddress.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities\Payments; +namespace PhpTelegramBot\Core\Entities\Payments; -use Longman\TelegramBot\Entities\Entity; +use PhpTelegramBot\Core\Entities\Entity; /** * Class ShippingAddress diff --git a/src/Entities/Payments/ShippingOption.php b/src/Entities/Payments/ShippingOption.php index 55b61105d..15267a27f 100644 --- a/src/Entities/Payments/ShippingOption.php +++ b/src/Entities/Payments/ShippingOption.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities\Payments; +namespace PhpTelegramBot\Core\Entities\Payments; -use Longman\TelegramBot\Entities\Entity; +use PhpTelegramBot\Core\Entities\Entity; /** * Class ShippingOption diff --git a/src/Entities/Payments/ShippingQuery.php b/src/Entities/Payments/ShippingQuery.php index 7a7a24e81..e320ab9d3 100644 --- a/src/Entities/Payments/ShippingQuery.php +++ b/src/Entities/Payments/ShippingQuery.php @@ -9,12 +9,12 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities\Payments; +namespace PhpTelegramBot\Core\Entities\Payments; -use Longman\TelegramBot\Entities\Entity; -use Longman\TelegramBot\Entities\ServerResponse; -use Longman\TelegramBot\Entities\User; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Entities\Entity; +use PhpTelegramBot\Core\Entities\ServerResponse; +use PhpTelegramBot\Core\Entities\User; +use PhpTelegramBot\Core\Request; /** * Class ShippingQuery diff --git a/src/Entities/Payments/SuccessfulPayment.php b/src/Entities/Payments/SuccessfulPayment.php index f49abc8f3..920e8e417 100644 --- a/src/Entities/Payments/SuccessfulPayment.php +++ b/src/Entities/Payments/SuccessfulPayment.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities\Payments; +namespace PhpTelegramBot\Core\Entities\Payments; -use Longman\TelegramBot\Entities\Entity; +use PhpTelegramBot\Core\Entities\Entity; /** * Class SuccessfulPayment diff --git a/src/Entities/PhotoSize.php b/src/Entities/PhotoSize.php index 21718d28f..0ed5ebad1 100644 --- a/src/Entities/PhotoSize.php +++ b/src/Entities/PhotoSize.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class PhotoSize diff --git a/src/Entities/Poll.php b/src/Entities/Poll.php index 8d3e485a2..48d189b1a 100644 --- a/src/Entities/Poll.php +++ b/src/Entities/Poll.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class Poll diff --git a/src/Entities/PollAnswer.php b/src/Entities/PollAnswer.php index a31d2fc51..ea300789a 100644 --- a/src/Entities/PollAnswer.php +++ b/src/Entities/PollAnswer.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class PollAnswer diff --git a/src/Entities/PollOption.php b/src/Entities/PollOption.php index 8af5f978b..5f7c93c2a 100644 --- a/src/Entities/PollOption.php +++ b/src/Entities/PollOption.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class PollOption diff --git a/src/Entities/ReplyToMessage.php b/src/Entities/ReplyToMessage.php index 8d242a907..efe0ceb11 100644 --- a/src/Entities/ReplyToMessage.php +++ b/src/Entities/ReplyToMessage.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class ReplyToMessage diff --git a/src/Entities/ServerResponse.php b/src/Entities/ServerResponse.php index 3989e54b5..0939c360e 100644 --- a/src/Entities/ServerResponse.php +++ b/src/Entities/ServerResponse.php @@ -7,10 +7,10 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; -use Longman\TelegramBot\Entities\Games\GameHighScore; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Entities\Games\GameHighScore; +use PhpTelegramBot\Core\Request; /** * Class ServerResponse diff --git a/src/Entities/Sticker.php b/src/Entities/Sticker.php index 4023bbc05..ca982bc38 100644 --- a/src/Entities/Sticker.php +++ b/src/Entities/Sticker.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class Sticker diff --git a/src/Entities/StickerSet.php b/src/Entities/StickerSet.php index 8614d5a2d..0e241e1b6 100644 --- a/src/Entities/StickerSet.php +++ b/src/Entities/StickerSet.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class StickerSet diff --git a/src/Entities/TelegramPassport/EncryptedCredentials.php b/src/Entities/TelegramPassport/EncryptedCredentials.php index faa86d4bf..d895f5ca9 100644 --- a/src/Entities/TelegramPassport/EncryptedCredentials.php +++ b/src/Entities/TelegramPassport/EncryptedCredentials.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities\TelegramPassport; +namespace PhpTelegramBot\Core\Entities\TelegramPassport; -use Longman\TelegramBot\Entities\Entity; +use PhpTelegramBot\Core\Entities\Entity; /** * Class EncryptedCredentials diff --git a/src/Entities/TelegramPassport/EncryptedPassportElement.php b/src/Entities/TelegramPassport/EncryptedPassportElement.php index e6124f4d6..408bec5e6 100644 --- a/src/Entities/TelegramPassport/EncryptedPassportElement.php +++ b/src/Entities/TelegramPassport/EncryptedPassportElement.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities\TelegramPassport; +namespace PhpTelegramBot\Core\Entities\TelegramPassport; -use Longman\TelegramBot\Entities\Entity; +use PhpTelegramBot\Core\Entities\Entity; /** * Class EncryptedPassportElement diff --git a/src/Entities/TelegramPassport/PassportData.php b/src/Entities/TelegramPassport/PassportData.php index 4ae69938c..cadbffa1c 100644 --- a/src/Entities/TelegramPassport/PassportData.php +++ b/src/Entities/TelegramPassport/PassportData.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities\TelegramPassport; +namespace PhpTelegramBot\Core\Entities\TelegramPassport; -use Longman\TelegramBot\Entities\Entity; +use PhpTelegramBot\Core\Entities\Entity; /** * Class PassportData diff --git a/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorDataField.php b/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorDataField.php index d39881482..b5ef6367d 100644 --- a/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorDataField.php +++ b/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorDataField.php @@ -11,7 +11,7 @@ namespace Entities\TelegramPassport\PassportElementError; -use Longman\TelegramBot\Entities\Entity; +use PhpTelegramBot\Core\Entities\Entity; /** * Class PassportElementErrorDataField diff --git a/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorFile.php b/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorFile.php index eb980dd62..c6296fbfb 100644 --- a/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorFile.php +++ b/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorFile.php @@ -11,7 +11,7 @@ namespace Entities\TelegramPassport\PassportElementError; -use Longman\TelegramBot\Entities\Entity; +use PhpTelegramBot\Core\Entities\Entity; /** * Class PassportElementErrorFile diff --git a/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorFiles.php b/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorFiles.php index 10ecc53ce..e6cd55a71 100644 --- a/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorFiles.php +++ b/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorFiles.php @@ -11,7 +11,7 @@ namespace Entities\TelegramPassport\PassportElementError; -use Longman\TelegramBot\Entities\Entity; +use PhpTelegramBot\Core\Entities\Entity; /** * Class PassportElementErrorFiles diff --git a/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorFrontSide.php b/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorFrontSide.php index a05ea4f25..2079c2349 100644 --- a/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorFrontSide.php +++ b/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorFrontSide.php @@ -11,7 +11,7 @@ namespace Entities\TelegramPassport\PassportElementError; -use Longman\TelegramBot\Entities\Entity; +use PhpTelegramBot\Core\Entities\Entity; /** * Class PassportElementErrorFrontSide diff --git a/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorReverseSide.php b/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorReverseSide.php index e57d80ace..010ea85e0 100644 --- a/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorReverseSide.php +++ b/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorReverseSide.php @@ -11,7 +11,7 @@ namespace Entities\TelegramPassport\PassportElementError; -use Longman\TelegramBot\Entities\Entity; +use PhpTelegramBot\Core\Entities\Entity; /** * Class PassportElementErrorReverseSide diff --git a/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorSelfie.php b/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorSelfie.php index a7c9897bd..dcfc93200 100644 --- a/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorSelfie.php +++ b/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorSelfie.php @@ -11,7 +11,7 @@ namespace Entities\TelegramPassport\PassportElementError; -use Longman\TelegramBot\Entities\Entity; +use PhpTelegramBot\Core\Entities\Entity; /** * Class PassportElementErrorSelfie diff --git a/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorTranslationFile.php b/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorTranslationFile.php index 267c342ce..ec81c2a92 100644 --- a/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorTranslationFile.php +++ b/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorTranslationFile.php @@ -11,7 +11,7 @@ namespace Entities\TelegramPassport\PassportElementError; -use Longman\TelegramBot\Entities\Entity; +use PhpTelegramBot\Core\Entities\Entity; /** * Class PassportElementErrorTranslationFile diff --git a/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorTranslationFiles.php b/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorTranslationFiles.php index dd7b4de97..93481c39c 100644 --- a/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorTranslationFiles.php +++ b/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorTranslationFiles.php @@ -11,7 +11,7 @@ namespace Entities\TelegramPassport\PassportElementError; -use Longman\TelegramBot\Entities\Entity; +use PhpTelegramBot\Core\Entities\Entity; /** * Class PassportElementErrorTranslationFiles diff --git a/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorUnspecified.php b/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorUnspecified.php index c804dd2dd..90600b6a5 100644 --- a/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorUnspecified.php +++ b/src/Entities/TelegramPassport/PassportElementError/PassportElementErrorUnspecified.php @@ -11,7 +11,7 @@ namespace Entities\TelegramPassport\PassportElementError; -use Longman\TelegramBot\Entities\Entity; +use PhpTelegramBot\Core\Entities\Entity; /** * Class PassportElementErrorUnspecified diff --git a/src/Entities/TelegramPassport/PassportFile.php b/src/Entities/TelegramPassport/PassportFile.php index 13f6fa230..d826d8c79 100644 --- a/src/Entities/TelegramPassport/PassportFile.php +++ b/src/Entities/TelegramPassport/PassportFile.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities\TelegramPassport; +namespace PhpTelegramBot\Core\Entities\TelegramPassport; -use Longman\TelegramBot\Entities\Entity; +use PhpTelegramBot\Core\Entities\Entity; /** * Class PassportFile diff --git a/src/Entities/Update.php b/src/Entities/Update.php index 827d80270..ada81ee4c 100644 --- a/src/Entities/Update.php +++ b/src/Entities/Update.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; -use Longman\TelegramBot\Entities\Payments\PreCheckoutQuery; -use Longman\TelegramBot\Entities\Payments\ShippingQuery; +use PhpTelegramBot\Core\Entities\Payments\PreCheckoutQuery; +use PhpTelegramBot\Core\Entities\Payments\ShippingQuery; /** * Class Update diff --git a/src/Entities/User.php b/src/Entities/User.php index 32f0dbfbc..621d7f180 100644 --- a/src/Entities/User.php +++ b/src/Entities/User.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class User diff --git a/src/Entities/UserProfilePhotos.php b/src/Entities/UserProfilePhotos.php index 3f714cdd1..eae9f1c5d 100644 --- a/src/Entities/UserProfilePhotos.php +++ b/src/Entities/UserProfilePhotos.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class UserProfilePhotos diff --git a/src/Entities/Venue.php b/src/Entities/Venue.php index 6699f35e6..0707548ce 100644 --- a/src/Entities/Venue.php +++ b/src/Entities/Venue.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class Venue diff --git a/src/Entities/Video.php b/src/Entities/Video.php index 9974b397c..b4dddf55b 100644 --- a/src/Entities/Video.php +++ b/src/Entities/Video.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class Video diff --git a/src/Entities/VideoNote.php b/src/Entities/VideoNote.php index 643a9ad78..c1e32bcbd 100644 --- a/src/Entities/VideoNote.php +++ b/src/Entities/VideoNote.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class VideoNote diff --git a/src/Entities/Voice.php b/src/Entities/Voice.php index 1aab3b21e..675164884 100644 --- a/src/Entities/Voice.php +++ b/src/Entities/Voice.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class Voice diff --git a/src/Entities/WebhookInfo.php b/src/Entities/WebhookInfo.php index 5b8d3e9b7..cbd218e13 100644 --- a/src/Entities/WebhookInfo.php +++ b/src/Entities/WebhookInfo.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Entities; +namespace PhpTelegramBot\Core\Entities; /** * Class WebhookInfo diff --git a/src/Exception/InvalidBotTokenException.php b/src/Exception/InvalidBotTokenException.php index adf6642b4..66e31aba2 100644 --- a/src/Exception/InvalidBotTokenException.php +++ b/src/Exception/InvalidBotTokenException.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Exception; +namespace PhpTelegramBot\Core\Exception; /** * Thrown when bot token is invalid diff --git a/src/Exception/TelegramException.php b/src/Exception/TelegramException.php index d99d210b6..285c10e5a 100644 --- a/src/Exception/TelegramException.php +++ b/src/Exception/TelegramException.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Exception; +namespace PhpTelegramBot\Core\Exception; /** * Main exception class used for exception handling diff --git a/src/Exception/TelegramLogException.php b/src/Exception/TelegramLogException.php index d8dbcb6ce..8a9864d9d 100644 --- a/src/Exception/TelegramLogException.php +++ b/src/Exception/TelegramLogException.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Exception; +namespace PhpTelegramBot\Core\Exception; /** * Main exception class used for exception handling diff --git a/src/Request.php b/src/Request.php index 42e3dd0f1..6394a2301 100644 --- a/src/Request.php +++ b/src/Request.php @@ -9,18 +9,18 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot; +namespace PhpTelegramBot\Core; use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\RequestException; use GuzzleHttp\Psr7\Stream; -use Longman\TelegramBot\Entities\File; -use Longman\TelegramBot\Entities\InputMedia\InputMedia; -use Longman\TelegramBot\Entities\Message; -use Longman\TelegramBot\Entities\ServerResponse; -use Longman\TelegramBot\Exception\InvalidBotTokenException; -use Longman\TelegramBot\Exception\TelegramException; +use PhpTelegramBot\Core\Entities\File; +use PhpTelegramBot\Core\Entities\InputMedia\InputMedia; +use PhpTelegramBot\Core\Entities\Message; +use PhpTelegramBot\Core\Entities\ServerResponse; +use PhpTelegramBot\Core\Exception\InvalidBotTokenException; +use PhpTelegramBot\Core\Exception\TelegramException; /** * Class Request diff --git a/src/Telegram.php b/src/Telegram.php index 649657437..285b1facd 100644 --- a/src/Telegram.php +++ b/src/Telegram.php @@ -9,16 +9,16 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot; +namespace PhpTelegramBot\Core; defined('TB_BASE_PATH') || define('TB_BASE_PATH', __DIR__); defined('TB_BASE_COMMANDS_PATH') || define('TB_BASE_COMMANDS_PATH', TB_BASE_PATH . '/Commands'); use Exception; -use Longman\TelegramBot\Commands\Command; -use Longman\TelegramBot\Entities\ServerResponse; -use Longman\TelegramBot\Entities\Update; -use Longman\TelegramBot\Exception\TelegramException; +use PhpTelegramBot\Core\Commands\Command; +use PhpTelegramBot\Core\Entities\ServerResponse; +use PhpTelegramBot\Core\Entities\Update; +use PhpTelegramBot\Core\Exception\TelegramException; use PDO; use RecursiveDirectoryIterator; use RecursiveIteratorIterator; diff --git a/src/TelegramLog.php b/src/TelegramLog.php index 8082aa122..4747e1c6b 100644 --- a/src/TelegramLog.php +++ b/src/TelegramLog.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot; +namespace PhpTelegramBot\Core; use Psr\Log\LoggerInterface; use Psr\Log\NullLogger; diff --git a/tests/unit/Commands/CommandTest.php b/tests/unit/Commands/CommandTest.php index 23949fa92..3ba9598cf 100644 --- a/tests/unit/Commands/CommandTest.php +++ b/tests/unit/Commands/CommandTest.php @@ -9,12 +9,12 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Tests\Unit\Commands; +namespace PhpTelegramBot\Core\Tests\Unit\Commands; -use Longman\TelegramBot\Commands\Command; -use Longman\TelegramBot\Telegram; -use Longman\TelegramBot\Tests\Unit\TestCase; -use Longman\TelegramBot\Tests\Unit\TestHelpers; +use PhpTelegramBot\Core\Commands\Command; +use PhpTelegramBot\Core\Telegram; +use PhpTelegramBot\Core\Tests\Unit\TestCase; +use PhpTelegramBot\Core\Tests\Unit\TestHelpers; /** * @package TelegramTest diff --git a/tests/unit/Commands/CommandTestCase.php b/tests/unit/Commands/CommandTestCase.php index 16850b421..682b6a895 100644 --- a/tests/unit/Commands/CommandTestCase.php +++ b/tests/unit/Commands/CommandTestCase.php @@ -9,11 +9,11 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Tests\Unit\Commands; +namespace PhpTelegramBot\Core\Tests\Unit\Commands; -use Longman\TelegramBot\Commands\Command; -use Longman\TelegramBot\Telegram; -use Longman\TelegramBot\Tests\Unit\TestCase; +use PhpTelegramBot\Core\Commands\Command; +use PhpTelegramBot\Core\Telegram; +use PhpTelegramBot\Core\Tests\Unit\TestCase; /** * @package TelegramTest diff --git a/tests/unit/Commands/CustomTestCommands/HiddenCommand.php b/tests/unit/Commands/CustomTestCommands/HiddenCommand.php index 392ed8b7a..0d0573320 100644 --- a/tests/unit/Commands/CustomTestCommands/HiddenCommand.php +++ b/tests/unit/Commands/CustomTestCommands/HiddenCommand.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\UserCommands; +namespace PhpTelegramBot\Core\Commands\UserCommands; -use Longman\TelegramBot\Commands\UserCommand; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Commands\UserCommand; +use PhpTelegramBot\Core\Request; /** * Test "/hidden" command to test $show_in_help diff --git a/tests/unit/Commands/CustomTestCommands/VisibleCommand.php b/tests/unit/Commands/CustomTestCommands/VisibleCommand.php index 54a57f42d..89afefbd9 100644 --- a/tests/unit/Commands/CustomTestCommands/VisibleCommand.php +++ b/tests/unit/Commands/CustomTestCommands/VisibleCommand.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Commands\UserCommands; +namespace PhpTelegramBot\Core\Commands\UserCommands; -use Longman\TelegramBot\Commands\UserCommand; -use Longman\TelegramBot\Request; +use PhpTelegramBot\Core\Commands\UserCommand; +use PhpTelegramBot\Core\Request; /** * Test "/visible" command to test $show_in_help diff --git a/tests/unit/ConversationTest.php b/tests/unit/ConversationTest.php index f0bcec58f..a52a6e425 100644 --- a/tests/unit/ConversationTest.php +++ b/tests/unit/ConversationTest.php @@ -9,11 +9,11 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Tests\Unit; +namespace PhpTelegramBot\Core\Tests\Unit; -use Longman\TelegramBot\Conversation; -use Longman\TelegramBot\Exception\TelegramException; -use Longman\TelegramBot\Telegram; +use PhpTelegramBot\Core\Conversation; +use PhpTelegramBot\Core\Exception\TelegramException; +use PhpTelegramBot\Core\Telegram; /** * @package TelegramTest diff --git a/tests/unit/Entities/AudioTest.php b/tests/unit/Entities/AudioTest.php index 08c032a04..26005ce1e 100644 --- a/tests/unit/Entities/AudioTest.php +++ b/tests/unit/Entities/AudioTest.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Tests\Unit; +namespace PhpTelegramBot\Core\Tests\Unit; -use Longman\TelegramBot\Entities\Audio; +use PhpTelegramBot\Core\Entities\Audio; /** * @package TelegramTest diff --git a/tests/unit/Entities/ChatTest.php b/tests/unit/Entities/ChatTest.php index d936246a9..0c2f96207 100644 --- a/tests/unit/Entities/ChatTest.php +++ b/tests/unit/Entities/ChatTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Tests\Unit; +namespace PhpTelegramBot\Core\Tests\Unit; /** * @package TelegramTest diff --git a/tests/unit/Entities/FileTest.php b/tests/unit/Entities/FileTest.php index 4a6d0c49d..3529c8d1a 100644 --- a/tests/unit/Entities/FileTest.php +++ b/tests/unit/Entities/FileTest.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Tests\Unit; +namespace PhpTelegramBot\Core\Tests\Unit; -use Longman\TelegramBot\Entities\File; +use PhpTelegramBot\Core\Entities\File; /** * @package TelegramTest diff --git a/tests/unit/Entities/InlineKeyboardButtonTest.php b/tests/unit/Entities/InlineKeyboardButtonTest.php index c6392065b..74db72550 100644 --- a/tests/unit/Entities/InlineKeyboardButtonTest.php +++ b/tests/unit/Entities/InlineKeyboardButtonTest.php @@ -9,11 +9,11 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Tests\Unit; +namespace PhpTelegramBot\Core\Tests\Unit; -use Longman\TelegramBot\Entities\Games\CallbackGame; -use Longman\TelegramBot\Entities\InlineKeyboardButton; -use Longman\TelegramBot\Exception\TelegramException; +use PhpTelegramBot\Core\Entities\Games\CallbackGame; +use PhpTelegramBot\Core\Entities\InlineKeyboardButton; +use PhpTelegramBot\Core\Exception\TelegramException; /** * @package TelegramTest diff --git a/tests/unit/Entities/InlineKeyboardTest.php b/tests/unit/Entities/InlineKeyboardTest.php index 0a945e754..35aef209c 100644 --- a/tests/unit/Entities/InlineKeyboardTest.php +++ b/tests/unit/Entities/InlineKeyboardTest.php @@ -9,11 +9,11 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Tests\Unit; +namespace PhpTelegramBot\Core\Tests\Unit; -use Longman\TelegramBot\Entities\InlineKeyboard; -use Longman\TelegramBot\Entities\InlineKeyboardButton; -use Longman\TelegramBot\Exception\TelegramException; +use PhpTelegramBot\Core\Entities\InlineKeyboard; +use PhpTelegramBot\Core\Entities\InlineKeyboardButton; +use PhpTelegramBot\Core\Exception\TelegramException; /** * @package TelegramTest diff --git a/tests/unit/Entities/KeyboardButtonTest.php b/tests/unit/Entities/KeyboardButtonTest.php index bf804b044..9df0e81ba 100644 --- a/tests/unit/Entities/KeyboardButtonTest.php +++ b/tests/unit/Entities/KeyboardButtonTest.php @@ -9,11 +9,11 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Tests\Unit; +namespace PhpTelegramBot\Core\Tests\Unit; -use Longman\TelegramBot\Entities\KeyboardButton; -use Longman\TelegramBot\Entities\KeyboardButtonPollType; -use Longman\TelegramBot\Exception\TelegramException; +use PhpTelegramBot\Core\Entities\KeyboardButton; +use PhpTelegramBot\Core\Entities\KeyboardButtonPollType; +use PhpTelegramBot\Core\Exception\TelegramException; /** * @package TelegramTest diff --git a/tests/unit/Entities/KeyboardTest.php b/tests/unit/Entities/KeyboardTest.php index d617acc84..267ed622d 100644 --- a/tests/unit/Entities/KeyboardTest.php +++ b/tests/unit/Entities/KeyboardTest.php @@ -9,11 +9,11 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Tests\Unit; +namespace PhpTelegramBot\Core\Tests\Unit; -use Longman\TelegramBot\Entities\Keyboard; -use Longman\TelegramBot\Entities\KeyboardButton; -use Longman\TelegramBot\Exception\TelegramException; +use PhpTelegramBot\Core\Entities\Keyboard; +use PhpTelegramBot\Core\Entities\KeyboardButton; +use PhpTelegramBot\Core\Exception\TelegramException; /** * @package TelegramTest diff --git a/tests/unit/Entities/LocationTest.php b/tests/unit/Entities/LocationTest.php index 74f7f37c3..3415e0566 100644 --- a/tests/unit/Entities/LocationTest.php +++ b/tests/unit/Entities/LocationTest.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Tests\Unit; +namespace PhpTelegramBot\Core\Tests\Unit; -use Longman\TelegramBot\Entities\Location; +use PhpTelegramBot\Core\Entities\Location; /** * @package TelegramTest diff --git a/tests/unit/Entities/MessageTest.php b/tests/unit/Entities/MessageTest.php index 7f2246f28..e6a9eeb06 100644 --- a/tests/unit/Entities/MessageTest.php +++ b/tests/unit/Entities/MessageTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Tests\Unit; +namespace PhpTelegramBot\Core\Tests\Unit; /** * @package TelegramTest diff --git a/tests/unit/Entities/ReplyToMessageTest.php b/tests/unit/Entities/ReplyToMessageTest.php index 0567f7ef7..2ca0d0402 100644 --- a/tests/unit/Entities/ReplyToMessageTest.php +++ b/tests/unit/Entities/ReplyToMessageTest.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Tests\Unit; +namespace PhpTelegramBot\Core\Tests\Unit; -use Longman\TelegramBot\Entities\Update; +use PhpTelegramBot\Core\Entities\Update; /** * @package TelegramTest diff --git a/tests/unit/Entities/ServerResponseTest.php b/tests/unit/Entities/ServerResponseTest.php index 0f8b64ba6..eb9579344 100644 --- a/tests/unit/Entities/ServerResponseTest.php +++ b/tests/unit/Entities/ServerResponseTest.php @@ -11,17 +11,17 @@ * Written by Marco Boretto */ -namespace Longman\TelegramBot\Tests\Unit; - -use Longman\TelegramBot\Entities\File; -use Longman\TelegramBot\Entities\Message; -use Longman\TelegramBot\Entities\PhotoSize; -use Longman\TelegramBot\Entities\ServerResponse; -use Longman\TelegramBot\Entities\Sticker; -use Longman\TelegramBot\Entities\StickerSet; -use Longman\TelegramBot\Entities\Update; -use Longman\TelegramBot\Entities\UserProfilePhotos; -use Longman\TelegramBot\Request; +namespace PhpTelegramBot\Core\Tests\Unit; + +use PhpTelegramBot\Core\Entities\File; +use PhpTelegramBot\Core\Entities\Message; +use PhpTelegramBot\Core\Entities\PhotoSize; +use PhpTelegramBot\Core\Entities\ServerResponse; +use PhpTelegramBot\Core\Entities\Sticker; +use PhpTelegramBot\Core\Entities\StickerSet; +use PhpTelegramBot\Core\Entities\Update; +use PhpTelegramBot\Core\Entities\UserProfilePhotos; +use PhpTelegramBot\Core\Request; /** * @package TelegramTest diff --git a/tests/unit/Entities/UpdateTest.php b/tests/unit/Entities/UpdateTest.php index da455f55a..af9fc7fa6 100644 --- a/tests/unit/Entities/UpdateTest.php +++ b/tests/unit/Entities/UpdateTest.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Tests\Unit; +namespace PhpTelegramBot\Core\Tests\Unit; -use Longman\TelegramBot\Entities\Update; +use PhpTelegramBot\Core\Entities\Update; /** * @package TelegramTest diff --git a/tests/unit/Entities/UserTest.php b/tests/unit/Entities/UserTest.php index ff011f405..8bd97a4a1 100644 --- a/tests/unit/Entities/UserTest.php +++ b/tests/unit/Entities/UserTest.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Tests\Unit; +namespace PhpTelegramBot\Core\Tests\Unit; -use Longman\TelegramBot\Entities\User; +use PhpTelegramBot\Core\Entities\User; /** * @package TelegramTest diff --git a/tests/unit/Entities/WebhookInfoTest.php b/tests/unit/Entities/WebhookInfoTest.php index 1259f8d75..a0b894eea 100644 --- a/tests/unit/Entities/WebhookInfoTest.php +++ b/tests/unit/Entities/WebhookInfoTest.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Tests\Unit; +namespace PhpTelegramBot\Core\Tests\Unit; -use Longman\TelegramBot\Entities\WebhookInfo; +use PhpTelegramBot\Core\Entities\WebhookInfo; /** * @package TelegramTest diff --git a/tests/unit/TelegramLogTest.php b/tests/unit/TelegramLogTest.php index 23d54130d..964ac3650 100644 --- a/tests/unit/TelegramLogTest.php +++ b/tests/unit/TelegramLogTest.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Tests\Unit; +namespace PhpTelegramBot\Core\Tests\Unit; -use Longman\TelegramBot\TelegramLog; +use PhpTelegramBot\Core\TelegramLog; use Monolog\Formatter\LineFormatter; use Monolog\Handler\StreamHandler; use Monolog\Logger; diff --git a/tests/unit/TelegramTest.php b/tests/unit/TelegramTest.php index 878c31ab2..a3ccc9c7a 100644 --- a/tests/unit/TelegramTest.php +++ b/tests/unit/TelegramTest.php @@ -9,11 +9,11 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Tests\Unit; +namespace PhpTelegramBot\Core\Tests\Unit; use DMS\PHPUnitExtensions\ArraySubset\ArraySubsetAsserts; -use Longman\TelegramBot\Exception\TelegramException; -use Longman\TelegramBot\Telegram; +use PhpTelegramBot\Core\Exception\TelegramException; +use PhpTelegramBot\Core\Telegram; /** * @package TelegramTest diff --git a/tests/unit/TestCase.php b/tests/unit/TestCase.php index b4859f77c..1e8c075d1 100644 --- a/tests/unit/TestCase.php +++ b/tests/unit/TestCase.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Tests\Unit; +namespace PhpTelegramBot\Core\Tests\Unit; use PHPUnit\Framework\TestCase as BaseTestCase; diff --git a/tests/unit/TestHelpers.php b/tests/unit/TestHelpers.php index 39d711087..f0f10db01 100644 --- a/tests/unit/TestHelpers.php +++ b/tests/unit/TestHelpers.php @@ -9,13 +9,13 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Tests\Unit; +namespace PhpTelegramBot\Core\Tests\Unit; -use Longman\TelegramBot\DB; -use Longman\TelegramBot\Entities\Chat; -use Longman\TelegramBot\Entities\Message; -use Longman\TelegramBot\Entities\Update; -use Longman\TelegramBot\Entities\User; +use PhpTelegramBot\Core\DB; +use PhpTelegramBot\Core\Entities\Chat; +use PhpTelegramBot\Core\Entities\Message; +use PhpTelegramBot\Core\Entities\Update; +use PhpTelegramBot\Core\Entities\User; /** * @package TelegramTest diff --git a/utils/importFromLog.php b/utils/importFromLog.php index 634df0260..3a7d72101 100644 --- a/utils/importFromLog.php +++ b/utils/importFromLog.php @@ -11,9 +11,9 @@ * @todo Move to dedicated CLI tool. */ -use Longman\TelegramBot\DB; -use Longman\TelegramBot\Entities\Update; -use Longman\TelegramBot\Telegram; +use PhpTelegramBot\Core\DB; +use PhpTelegramBot\Core\Entities\Update; +use PhpTelegramBot\Core\Telegram; require __DIR__ . '/../vendor/autoload.php'; From d2a683159417b689b5c33921ee3b5ed6d0330196 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armando=20L=C3=BCscher?= Date: Sun, 24 May 2020 16:54:41 +0200 Subject: [PATCH 2/3] Rename missing namespace declarations --- tests/unit/Entities/EntityTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/Entities/EntityTest.php b/tests/unit/Entities/EntityTest.php index ebcfc058c..a475039fc 100644 --- a/tests/unit/Entities/EntityTest.php +++ b/tests/unit/Entities/EntityTest.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Longman\TelegramBot\Tests\Unit; +namespace PhpTelegramBot\Core\Tests\Unit; -use Longman\TelegramBot\Entities\Entity; +use PhpTelegramBot\Core\Entities\Entity; /** * @link https://github.com/php-telegram-bot/core From fe0fa8c7ceaa77e2f1f9bddd7c609343f3e9c948 Mon Sep 17 00:00:00 2001 From: Marco De Bortoli Date: Sun, 24 May 2020 19:11:45 +0100 Subject: [PATCH 3/3] #1048: Update remaining old references after rebase --- CHANGELOG.md | 2 +- README.md | 18 +++++++++--------- doc/01-utils.md | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cde273fce..ab5eaf0ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -465,7 +465,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c [0.44.0-bc-update-content-type]: https://github.com/php-telegram-bot/core/wiki/Breaking-backwards-compatibility#update-getupdatecontent [example-bot]: https://github.com/php-telegram-bot/example-bot [PSR-3]: https://www.php-fig.org/psr/psr-3 -[Tidelift]: https://tidelift.com/subscription/pkg/packagist-longman-telegram-bot?utm_source=packagist-longman-telegram-bot&utm_medium=referral&utm_campaign=changelog +[Tidelift]: https://tidelift.com/subscription/pkg/packagist-php-telegram-bot-core?utm_source=packagist-php-telegram-bot-core&utm_medium=referral&utm_campaign=changelog [Unreleased]: https://github.com/php-telegram-bot/core/compare/master...develop [0.62.0]: https://github.com/php-telegram-bot/core/compare/0.61.1...0.62.0 diff --git a/README.md b/README.md index fe8157303..8dcff7c18 100644 --- a/README.md +++ b/README.md @@ -14,12 +14,12 @@ A Telegram Bot based on the official [Telegram Bot API] [![Build Status](https://travis-ci.org/php-telegram-bot/core.svg?branch=master)](https://travis-ci.org/php-telegram-bot/core) [![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/php-telegram-bot/core/master.svg?style=flat)](https://scrutinizer-ci.com/g/php-telegram-bot/core/?b=master) [![Code Quality](https://img.shields.io/scrutinizer/g/php-telegram-bot/core/master.svg?style=flat)](https://scrutinizer-ci.com/g/php-telegram-bot/core/?b=master) -[![Latest Stable Version](https://img.shields.io/packagist/v/longman/telegram-bot.svg)](https://packagist.org/packages/longman/telegram-bot) +[![Latest Stable Version](https://img.shields.io/packagist/v/php-telegram-bot/core.svg)](https://packagist.org/packages/php-telegram-bot/core) [![Dependencies](https://tidelift.com/badges/github/php-telegram-bot/core?style=flat)][Tidelift] -[![Total Downloads](https://img.shields.io/packagist/dt/longman/telegram-bot.svg)](https://packagist.org/packages/longman/telegram-bot) -[![Downloads Month](https://img.shields.io/packagist/dm/longman/telegram-bot.svg)](https://packagist.org/packages/longman/telegram-bot) +[![Total Downloads](https://img.shields.io/packagist/dt/php-telegram-bot/core.svg)](https://packagist.org/packages/php-telegram-bot/core) +[![Downloads Month](https://img.shields.io/packagist/dm/php-telegram-bot/core.svg)](https://packagist.org/packages/php-telegram-bot/core) [![Minimum PHP Version](http://img.shields.io/badge/php-%3E%3D5.6-8892BF.svg)](https://php.net/) -[![License](https://img.shields.io/packagist/l/longman/telegram-bot.svg)](https://github.com/php-telegram-bot/core/LICENSE) +[![License](https://img.shields.io/packagist/l/php-telegram-bot/core.svg)](https://github.com/php-telegram-bot/core/LICENSE) ## Table of Contents - [Introduction](#introduction) @@ -166,7 +166,7 @@ above, but start it with `@`) ### Require this package with Composer Install this package through [Composer]. -Edit your project's `composer.json` file to require `longman/telegram-bot`. +Edit your project's `composer.json` file to require `php-telegram-bot/core`. Create *composer.json* file ```json @@ -175,7 +175,7 @@ Create *composer.json* file "type": "project", "require": { "php": ">=5.5", - "longman/telegram-bot": "*" + "php-telegram-bot/core": "*" } } ``` @@ -186,7 +186,7 @@ and run `composer update` run this command in your command line: ```bash -composer require longman/telegram-bot +composer require php-telegram-bot/core ``` ### Choose how to retrieve Telegram updates @@ -611,7 +611,7 @@ Thank you for keeping this project alive :pray: - [![Patreon](https://user-images.githubusercontent.com/9423417/59235980-a5fa6b80-8be3-11e9-8ae7-020bc4ae9baa.png) Patreon.com/phptelegrambot][Patreon] - [![OpenCollective](https://user-images.githubusercontent.com/9423417/59235978-a561d500-8be3-11e9-89be-82ec54be1546.png) OpenCollective.com/php-telegram-bot][OpenCollective] - [![Ko-fi](https://user-images.githubusercontent.com/9423417/59235976-a561d500-8be3-11e9-911d-b1908c3e6a33.png) Ko-fi.com/phptelegrambot][Ko-fi] -- [![Tidelift](https://user-images.githubusercontent.com/9423417/59235982-a6930200-8be3-11e9-8ac2-bfb6991d80c5.png) Tidelift.com/longman/telegram-bot][Tidelift] +- [![Tidelift](https://user-images.githubusercontent.com/9423417/59235982-a6930200-8be3-11e9-8ac2-bfb6991d80c5.png) Tidelift.com/php-telegram-bot/core][Tidelift] - [![Liberapay](https://user-images.githubusercontent.com/9423417/59235977-a561d500-8be3-11e9-9d16-bc3b13d3ceba.png) Liberapay.com/PHP-Telegram-Bot][Liberapay] - [![PayPal](https://user-images.githubusercontent.com/9423417/59235981-a5fa6b80-8be3-11e9-9761-15eb7a524cb0.png) PayPal.me/noplanman][PayPal-noplanman] (account of @noplanman) - [![Bitcoin](https://user-images.githubusercontent.com/9423417/59235974-a4c93e80-8be3-11e9-9fde-260c821b6eae.png) 166NcyE7nDxkRPWidWtG1rqrNJoD5oYNiV][Bitcoin] @@ -655,7 +655,7 @@ Credit list in [CREDITS](CREDITS) [Patreon]: https://www.patreon.com/phptelegrambot "Support us on Patreon" [OpenCollective]: https://opencollective.com/php-telegram-bot "Support us on Open Collective" [Ko-fi]: https://ko-fi.com/phptelegrambot "Support us on Ko-fi" -[Tidelift]: https://tidelift.com/subscription/pkg/packagist-longman-telegram-bot?utm_source=packagist-longman-telegram-bot&utm_medium=referral&utm_campaign=enterprise&utm_term=repo "Learn more about the Tidelift Subscription" +[Tidelift]: https://tidelift.com/subscription/pkg/packagist-php-telegram-bot-core?utm_source=packagist-php-telegram-bot-core&utm_medium=referral&utm_campaign=enterprise&utm_term=repo "Learn more about the Tidelift Subscription" [Liberapay]: https://liberapay.com/PHP-Telegram-Bot "Donate with Liberapay" [PayPal-noplanman]: https://paypal.me/noplanman "Donate with PayPal" [Bitcoin]: https://www.blockchain.com/btc/address/166NcyE7nDxkRPWidWtG1rqrNJoD5oYNiV "Donate with Bitcoin" diff --git a/doc/01-utils.md b/doc/01-utils.md index b343a28d1..ecaa583f1 100644 --- a/doc/01-utils.md +++ b/doc/01-utils.md @@ -43,14 +43,14 @@ Remember to always backup first!! ### Always log request and response data If you's like to always log the request and response data to the debug log, also for successful requests, you can set the appropriate variable: ```php -\Longman\TelegramBot\TelegramLog::$always_log_request_and_response = true; +\PhpTelegramBot\Core\TelegramLog::$always_log_request_and_response = true; ``` ### Hiding API token from the log By default, the API token is removed from the log, to prevent any mistaken leakage when posting logs online. This behaviour can be changed by setting the appropriate variable: ``php -\Longman\TelegramBot\TelegramLog::$remove_bot_token = false; +\PhpTelegramBot\Core\TelegramLog::$remove_bot_token = false; ``` [PSR-3]: https://www.php-fig.org/psr/psr-3