From 55e65e8948da94589a87f6a530847519e4221fef Mon Sep 17 00:00:00 2001 From: netkas Date: Sun, 29 Sep 2024 21:49:10 -0400 Subject: [PATCH] Moved Types to their own namespace --- CHANGELOG.md | 1 + src/TgBotLib/Bot.php | 4 ++-- src/TgBotLib/Enums/{ => Types}/BotCommandScopeType.php | 2 +- src/TgBotLib/Enums/{ => Types}/ChatActionType.php | 2 +- src/TgBotLib/Enums/{ => Types}/ChatMemberStatus.php | 2 +- src/TgBotLib/Enums/{ => Types}/ChatType.php | 2 +- src/TgBotLib/Enums/{ => Types}/EventType.php | 2 +- src/TgBotLib/Enums/{ => Types}/InlineQueryResultType.php | 2 +- src/TgBotLib/Enums/{ => Types}/InputMediaType.php | 2 +- src/TgBotLib/Enums/{ => Types}/MenuButtonType.php | 2 +- src/TgBotLib/Enums/{ => Types}/MessageEntityType.php | 2 +- src/TgBotLib/Enums/{ => Types}/PassportElementType.php | 2 +- src/TgBotLib/Enums/{ => Types}/PollType.php | 2 +- src/TgBotLib/Enums/{ => Types}/StickerFormat.php | 2 +- src/TgBotLib/Enums/{ => Types}/StickerType.php | 2 +- src/TgBotLib/Enums/{ => Types}/ThumbnailMimeType.php | 2 +- src/TgBotLib/Enums/{ => Types}/UpdateEventType.php | 2 +- .../BotCommandScope/BotCommandScopeAllChatAdministrators.php | 2 +- .../Telegram/BotCommandScope/BotCommandScopeAllGroupChats.php | 2 +- .../BotCommandScope/BotCommandScopeAllPrivateChats.php | 2 +- .../Objects/Telegram/BotCommandScope/BotCommandScopeChat.php | 2 +- .../BotCommandScope/BotCommandScopeChatAdministrators.php | 2 +- .../Telegram/BotCommandScope/BotCommandScopeChatMember.php | 2 +- .../Telegram/BotCommandScope/BotCommandScopeDefault.php | 2 +- src/TgBotLib/Objects/Telegram/Chat.php | 2 +- .../Objects/Telegram/ChatMember/ChatMemberAdministrator.php | 2 +- src/TgBotLib/Objects/Telegram/ChatMember/ChatMemberBanned.php | 2 +- src/TgBotLib/Objects/Telegram/ChatMember/ChatMemberLeft.php | 2 +- src/TgBotLib/Objects/Telegram/ChatMember/ChatMemberMember.php | 2 +- src/TgBotLib/Objects/Telegram/ChatMember/ChatMemberOwner.php | 2 +- .../Objects/Telegram/ChatMember/ChatMemberRestricted.php | 2 +- src/TgBotLib/Objects/Telegram/InlineQueryResult.php | 2 +- .../Telegram/InlineQueryResult/InlineQueryResultGif.php | 2 +- .../Objects/Telegram/InputMedia/InputMediaAnimation.php | 2 +- src/TgBotLib/Objects/Telegram/StickerSet.php | 2 +- 35 files changed, 36 insertions(+), 35 deletions(-) rename src/TgBotLib/Enums/{ => Types}/BotCommandScopeType.php (91%) rename src/TgBotLib/Enums/{ => Types}/ChatActionType.php (93%) rename src/TgBotLib/Enums/{ => Types}/ChatMemberStatus.php (88%) rename src/TgBotLib/Enums/{ => Types}/ChatType.php (83%) rename src/TgBotLib/Enums/{ => Types}/EventType.php (96%) rename src/TgBotLib/Enums/{ => Types}/InlineQueryResultType.php (97%) rename src/TgBotLib/Enums/{ => Types}/InputMediaType.php (85%) rename src/TgBotLib/Enums/{ => Types}/MenuButtonType.php (81%) rename src/TgBotLib/Enums/{ => Types}/MessageEntityType.php (94%) rename src/TgBotLib/Enums/{ => Types}/PassportElementType.php (94%) rename src/TgBotLib/Enums/{ => Types}/PollType.php (75%) rename src/TgBotLib/Enums/{ => Types}/StickerFormat.php (80%) rename src/TgBotLib/Enums/{ => Types}/StickerType.php (81%) rename src/TgBotLib/Enums/{ => Types}/ThumbnailMimeType.php (82%) rename src/TgBotLib/Enums/{ => Types}/UpdateEventType.php (83%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ddef21..19e1f15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed * Refactor enums to use native PHP 8.1 syntax + * Moved Types to their own namespace ## [6.7.0] - 2023-08-10 diff --git a/src/TgBotLib/Bot.php b/src/TgBotLib/Bot.php index f56f352..f3fe94b 100644 --- a/src/TgBotLib/Bot.php +++ b/src/TgBotLib/Bot.php @@ -9,8 +9,8 @@ use InvalidArgumentException; use LogLib\Log; use TempFile\TempFile; - use TgBotLib\Enums\ChatMemberStatus; - use TgBotLib\Enums\EventType; + use TgBotLib\Enums\Types\ChatMemberStatus; + use TgBotLib\Enums\Types\EventType; use TgBotLib\Exceptions\TelegramException; use TgBotLib\Interfaces\CommandInterface; use TgBotLib\Interfaces\EventInterface; diff --git a/src/TgBotLib/Enums/BotCommandScopeType.php b/src/TgBotLib/Enums/Types/BotCommandScopeType.php similarity index 91% rename from src/TgBotLib/Enums/BotCommandScopeType.php rename to src/TgBotLib/Enums/Types/BotCommandScopeType.php index 468ea2c..6a71c7b 100644 --- a/src/TgBotLib/Enums/BotCommandScopeType.php +++ b/src/TgBotLib/Enums/Types/BotCommandScopeType.php @@ -1,6 +1,6 @@