Moved Types to their own namespace
This commit is contained in:
parent
2f701a899f
commit
55e65e8948
35 changed files with 36 additions and 35 deletions
|
@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
* Refactor enums to use native PHP 8.1 syntax
|
* Refactor enums to use native PHP 8.1 syntax
|
||||||
|
* Moved Types to their own namespace
|
||||||
|
|
||||||
|
|
||||||
## [6.7.0] - 2023-08-10
|
## [6.7.0] - 2023-08-10
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
use LogLib\Log;
|
use LogLib\Log;
|
||||||
use TempFile\TempFile;
|
use TempFile\TempFile;
|
||||||
use TgBotLib\Enums\ChatMemberStatus;
|
use TgBotLib\Enums\Types\ChatMemberStatus;
|
||||||
use TgBotLib\Enums\EventType;
|
use TgBotLib\Enums\Types\EventType;
|
||||||
use TgBotLib\Exceptions\TelegramException;
|
use TgBotLib\Exceptions\TelegramException;
|
||||||
use TgBotLib\Interfaces\CommandInterface;
|
use TgBotLib\Interfaces\CommandInterface;
|
||||||
use TgBotLib\Interfaces\EventInterface;
|
use TgBotLib\Interfaces\EventInterface;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace TgBotLib\Enums;
|
namespace TgBotLib\Enums\Types;
|
||||||
|
|
||||||
enum BotCommandScopeType : string
|
enum BotCommandScopeType : string
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace TgBotLib\Enums;
|
namespace TgBotLib\Enums\Types;
|
||||||
|
|
||||||
enum ChatActionType : string
|
enum ChatActionType : string
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace TgBotLib\Enums;
|
namespace TgBotLib\Enums\Types;
|
||||||
|
|
||||||
enum ChatMemberStatus : string
|
enum ChatMemberStatus : string
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace TgBotLib\Enums;
|
namespace TgBotLib\Enums\Types;
|
||||||
|
|
||||||
enum ChatType : string
|
enum ChatType : string
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace TgBotLib\Enums;
|
namespace TgBotLib\Enums\Types;
|
||||||
|
|
||||||
enum EventType : string
|
enum EventType : string
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace TgBotLib\Enums;
|
namespace TgBotLib\Enums\Types;
|
||||||
|
|
||||||
enum InlineQueryResultType : string
|
enum InlineQueryResultType : string
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace TgBotLib\Enums;
|
namespace TgBotLib\Enums\Types;
|
||||||
|
|
||||||
enum InputMediaType : string
|
enum InputMediaType : string
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace TgBotLib\Enums;
|
namespace TgBotLib\Enums\Types;
|
||||||
|
|
||||||
enum MenuButtonType : string
|
enum MenuButtonType : string
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace TgBotLib\Enums;
|
namespace TgBotLib\Enums\Types;
|
||||||
|
|
||||||
enum MessageEntityType : string
|
enum MessageEntityType : string
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace TgBotLib\Enums;
|
namespace TgBotLib\Enums\Types;
|
||||||
|
|
||||||
enum PassportElementType : string
|
enum PassportElementType : string
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace TgBotLib\Enums;
|
namespace TgBotLib\Enums\Types;
|
||||||
|
|
||||||
enum PollType : string
|
enum PollType : string
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace TgBotLib\Enums;
|
namespace TgBotLib\Enums\Types;
|
||||||
|
|
||||||
enum StickerFormat : string
|
enum StickerFormat : string
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace TgBotLib\Enums;
|
namespace TgBotLib\Enums\Types;
|
||||||
|
|
||||||
enum StickerType : string
|
enum StickerType : string
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace TgBotLib\Enums;
|
namespace TgBotLib\Enums\Types;
|
||||||
|
|
||||||
enum ThumbnailMimeType : string
|
enum ThumbnailMimeType : string
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace TgBotLib\Enums;
|
namespace TgBotLib\Enums\Types;
|
||||||
|
|
||||||
enum UpdateEventType : string
|
enum UpdateEventType : string
|
||||||
{
|
{
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
namespace TgBotLib\Objects\Telegram\BotCommandScope;
|
namespace TgBotLib\Objects\Telegram\BotCommandScope;
|
||||||
|
|
||||||
use TgBotLib\Enums\BotCommandScopeType;
|
use TgBotLib\Enums\Types\BotCommandScopeType;
|
||||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||||
use TgBotLib\Objects\Telegram\BotCommandScope;
|
use TgBotLib\Objects\Telegram\BotCommandScope;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
namespace TgBotLib\Objects\Telegram\BotCommandScope;
|
namespace TgBotLib\Objects\Telegram\BotCommandScope;
|
||||||
|
|
||||||
use TgBotLib\Enums\BotCommandScopeType;
|
use TgBotLib\Enums\Types\BotCommandScopeType;
|
||||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||||
use TgBotLib\Objects\Telegram\BotCommandScope;
|
use TgBotLib\Objects\Telegram\BotCommandScope;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
namespace TgBotLib\Objects\Telegram\BotCommandScope;
|
namespace TgBotLib\Objects\Telegram\BotCommandScope;
|
||||||
|
|
||||||
use TgBotLib\Enums\BotCommandScopeType;
|
use TgBotLib\Enums\Types\BotCommandScopeType;
|
||||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||||
use TgBotLib\Objects\Telegram\BotCommandScope;
|
use TgBotLib\Objects\Telegram\BotCommandScope;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
namespace TgBotLib\Objects\Telegram\BotCommandScope;
|
namespace TgBotLib\Objects\Telegram\BotCommandScope;
|
||||||
|
|
||||||
use TgBotLib\Enums\BotCommandScopeType;
|
use TgBotLib\Enums\Types\BotCommandScopeType;
|
||||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||||
use TgBotLib\Objects\Telegram\BotCommandScope;
|
use TgBotLib\Objects\Telegram\BotCommandScope;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
namespace TgBotLib\Objects\Telegram\BotCommandScope;
|
namespace TgBotLib\Objects\Telegram\BotCommandScope;
|
||||||
|
|
||||||
use TgBotLib\Enums\BotCommandScopeType;
|
use TgBotLib\Enums\Types\BotCommandScopeType;
|
||||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||||
use TgBotLib\Objects\Telegram\BotCommandScope;
|
use TgBotLib\Objects\Telegram\BotCommandScope;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
namespace TgBotLib\Objects\Telegram\BotCommandScope;
|
namespace TgBotLib\Objects\Telegram\BotCommandScope;
|
||||||
|
|
||||||
use TgBotLib\Enums\BotCommandScopeType;
|
use TgBotLib\Enums\Types\BotCommandScopeType;
|
||||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||||
use TgBotLib\Objects\Telegram\BotCommandScope;
|
use TgBotLib\Objects\Telegram\BotCommandScope;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
namespace TgBotLib\Objects\Telegram\BotCommandScope;
|
namespace TgBotLib\Objects\Telegram\BotCommandScope;
|
||||||
|
|
||||||
use TgBotLib\Enums\BotCommandScopeType;
|
use TgBotLib\Enums\Types\BotCommandScopeType;
|
||||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||||
use TgBotLib\Objects\Telegram\BotCommandScope;
|
use TgBotLib\Objects\Telegram\BotCommandScope;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
namespace TgBotLib\Objects\Telegram;
|
namespace TgBotLib\Objects\Telegram;
|
||||||
|
|
||||||
use TgBotLib\Enums\ChatType;
|
use TgBotLib\Enums\Types\ChatType;
|
||||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||||
|
|
||||||
class Chat implements ObjectTypeInterface
|
class Chat implements ObjectTypeInterface
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
namespace TgBotLib\Objects\Telegram\ChatMember;
|
namespace TgBotLib\Objects\Telegram\ChatMember;
|
||||||
|
|
||||||
use TgBotLib\Enums\ChatMemberStatus;
|
use TgBotLib\Enums\Types\ChatMemberStatus;
|
||||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||||
use TgBotLib\Objects\Telegram\ChatMember;
|
use TgBotLib\Objects\Telegram\ChatMember;
|
||||||
use TgBotLib\Objects\Telegram\User;
|
use TgBotLib\Objects\Telegram\User;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
namespace TgBotLib\Objects\Telegram\ChatMember;
|
namespace TgBotLib\Objects\Telegram\ChatMember;
|
||||||
|
|
||||||
use TgBotLib\Enums\ChatMemberStatus;
|
use TgBotLib\Enums\Types\ChatMemberStatus;
|
||||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||||
use TgBotLib\Objects\Telegram\ChatMember;
|
use TgBotLib\Objects\Telegram\ChatMember;
|
||||||
use TgBotLib\Objects\Telegram\User;
|
use TgBotLib\Objects\Telegram\User;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
namespace TgBotLib\Objects\Telegram\ChatMember;
|
namespace TgBotLib\Objects\Telegram\ChatMember;
|
||||||
|
|
||||||
use TgBotLib\Enums\ChatMemberStatus;
|
use TgBotLib\Enums\Types\ChatMemberStatus;
|
||||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||||
use TgBotLib\Objects\Telegram\ChatMember;
|
use TgBotLib\Objects\Telegram\ChatMember;
|
||||||
use TgBotLib\Objects\Telegram\User;
|
use TgBotLib\Objects\Telegram\User;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
namespace TgBotLib\Objects\Telegram\ChatMember;
|
namespace TgBotLib\Objects\Telegram\ChatMember;
|
||||||
|
|
||||||
use TgBotLib\Enums\ChatMemberStatus;
|
use TgBotLib\Enums\Types\ChatMemberStatus;
|
||||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||||
use TgBotLib\Objects\Telegram\ChatMember;
|
use TgBotLib\Objects\Telegram\ChatMember;
|
||||||
use TgBotLib\Objects\Telegram\User;
|
use TgBotLib\Objects\Telegram\User;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
namespace TgBotLib\Objects\Telegram\ChatMember;
|
namespace TgBotLib\Objects\Telegram\ChatMember;
|
||||||
|
|
||||||
use TgBotLib\Enums\ChatMemberStatus;
|
use TgBotLib\Enums\Types\ChatMemberStatus;
|
||||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||||
use TgBotLib\Objects\Telegram\ChatMember;
|
use TgBotLib\Objects\Telegram\ChatMember;
|
||||||
use TgBotLib\Objects\Telegram\User;
|
use TgBotLib\Objects\Telegram\User;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
namespace TgBotLib\Objects\Telegram\ChatMember;
|
namespace TgBotLib\Objects\Telegram\ChatMember;
|
||||||
|
|
||||||
use TgBotLib\Enums\ChatMemberStatus;
|
use TgBotLib\Enums\Types\ChatMemberStatus;
|
||||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||||
use TgBotLib\Objects\Telegram\ChatMember;
|
use TgBotLib\Objects\Telegram\ChatMember;
|
||||||
use TgBotLib\Objects\Telegram\User;
|
use TgBotLib\Objects\Telegram\User;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
namespace TgBotLib\Objects\Telegram;
|
namespace TgBotLib\Objects\Telegram;
|
||||||
|
|
||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
use TgBotLib\Enums\InlineQueryResultType;
|
use TgBotLib\Enums\Types\InlineQueryResultType;
|
||||||
use TgBotLib\Exceptions\NotImplementedException;
|
use TgBotLib\Exceptions\NotImplementedException;
|
||||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||||
use TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultArticle;
|
use TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultArticle;
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
namespace TgBotLib\Objects\Telegram\InlineQueryResult;
|
namespace TgBotLib\Objects\Telegram\InlineQueryResult;
|
||||||
|
|
||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
use TgBotLib\Enums\ThumbnailMimeType;
|
|
||||||
use TgBotLib\Classes\Validate;
|
use TgBotLib\Classes\Validate;
|
||||||
|
use TgBotLib\Enums\Types\ThumbnailMimeType;
|
||||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||||
use TgBotLib\Objects\Telegram\InlineKeyboardMarkup;
|
use TgBotLib\Objects\Telegram\InlineKeyboardMarkup;
|
||||||
use TgBotLib\Objects\Telegram\InputMessageContent\InputContactMessageContent;
|
use TgBotLib\Objects\Telegram\InputMessageContent\InputContactMessageContent;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
namespace TgBotLib\Objects\Telegram\InputMedia;
|
namespace TgBotLib\Objects\Telegram\InputMedia;
|
||||||
|
|
||||||
use TgBotLib\Enums\InputMediaType;
|
use TgBotLib\Enums\Types\InputMediaType;
|
||||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||||
use TgBotLib\Objects\Telegram\InputMedia;
|
use TgBotLib\Objects\Telegram\InputMedia;
|
||||||
use TgBotLib\Objects\Telegram\MessageEntity;
|
use TgBotLib\Objects\Telegram\MessageEntity;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
namespace TgBotLib\Objects\Telegram;
|
namespace TgBotLib\Objects\Telegram;
|
||||||
|
|
||||||
use TgBotLib\Enums\StickerType;
|
use TgBotLib\Enums\Types\StickerType;
|
||||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||||
|
|
||||||
class StickerSet implements ObjectTypeInterface
|
class StickerSet implements ObjectTypeInterface
|
||||||
|
|
Loading…
Add table
Reference in a new issue