Skip to content

Update api 9.4 9.5 2907373333873354482#1503

Open
devrabie wants to merge 39 commits intophp-telegram-bot:developfrom
devrabie:update-api-9.4-9.5-2907373333873354482
Open

Update api 9.4 9.5 2907373333873354482#1503
devrabie wants to merge 39 commits intophp-telegram-bot:developfrom
devrabie:update-api-9.4-9.5-2907373333873354482

Conversation

@devrabie
Copy link

? !
Type bug / feature / improvement
BC Break yes / no
Fixed issues

Summary

google-labs-jules bot and others added 30 commits July 3, 2025 20:55
- إزالة ميزة قاعدة البيانات بشكل كامل من المكتبة.
- تعطيل الأوامر الإدارية التي كانت تعتمد على قاعدة البيانات (ChatsCommand, CleanupCommand).
- إزالة الأمر الإداري WhoisCommand.
- تحديث ملف README.md ليعكس التغييرات.
- تحديث الاختبارات لإزالة الاعتماديات على قاعدة البيانات.

الهدف من هذه التغييرات هو تبسيط المكتبة وتسريع عملية التطوير المستقبلية.
- تحديث اسم المشروع والوصف وروابط الدعم والمؤلفين في `composer.json`.
- استبدال محتوى `README.md` بالكامل ليعكس هوية المشروع الجديدة.
تحديث معلومات المشروع في composer.json و README.md
feat: Implement Telegram Bot API 7.2 features
docs: Update version to 1.0.2 and add changelog entry for API 7.2
This commit implements the features introduced in the Telegram Bot API 7.3 update (May 6, 2024).

Key changes include:
- Poll Enhancements:
  - New InputPollOption entity.
  - Added question_entities to Poll and text_entities to PollOption.
  - Updated sendPoll method with new options and question_entities parameters.
- Chat and getChat Refactoring:
  - New ChatFullInfo entity with max_reaction_count and other getChat-specific fields.
  - getChat method now returns ChatFullInfo.
- Miscellaneous Updates:
  - New ChatBackground, BackgroundType, and BackgroundFill entities.
  - Added chat_background_set to Message entity.
  - Added via_join_request to ChatMemberUpdated entity.
  - Added live_period to editMessageLiveLocation method.

Updated CHANGELOG.md and library version to 1.0.3.
- Removed MySQL-based internal data persistence (DB, Conversation, ConversationDB).
- Made the library stateless by removing all internal storage logic.
- Updated Telegram.php version to 1.0.4.
- Added a Redis helper (enableRedis, getRedis) using predis/predis for optional shared Redis client access in commands.
…EADME

- Removed MySQL-based internal data persistence (DB, Conversation, ConversationDB).
- Made the library stateless by removing all internal storage logic.
- Updated Telegram.php version to 1.0.4.
- Added a Redis helper (enableRedis, getRedis) using predis/predis for optional shared Redis client access in commands.
- Updated README.md with instructions and examples for the new Redis helper.
This commit implements the features introduced in the Telegram Bot API 7.4 update (May 28, 2024).

Features added:
- Telegram Stars & Paid Media:
  - New entities: LinkPreviewOptions, PaidMediaInfo, PaidMedia (and its derivatives: PaidMediaPreview, PaidMediaPhoto, PaidMediaVideo), StarTransaction, StarTransactions.
  - Modified entities (WebAppInfo, Message, Update) to include new optional properties related to stars, paid media, and web app launches.
  - New request methods: sendPaidMedia, getStarTransactions.
- Link Preview & UI Updates:
  - Modified sendMessage and editMessageText to use LinkPreviewOptions, deprecating disable_web_page_preview.
  - New request method: setChatMenuButton.

- Updated library version to 1.0.5.
- Replaced the `predis/predis` library with the native PHP Redis extension.
- Implemented automatic dependency injection for the Redis connection in command objects.
- Any command with a `$redis` property will now have the Redis connection automatically injected.
- Disabled tests that relied on the old database implementation.
- Replaced the `predis/predis` library with the native PHP Redis extension.
- Implemented automatic dependency injection for the Redis connection in command objects.
- Any command with a `$redis` property will now have the Redis connection automatically injected.
- Disabled tests that relied on the old database implementation.
- Updated README.md with new instructions.
feat: Replace Predis with native Redis and implement auto DI
I will update the PHPDocs for the bot name and description methods.
This change adds support for password authentication when connecting to a Redis server. The `enableRedis` method now checks for a 'password' in the config array and uses it to authenticate if provided.
feat: Add password authentication for Redis connection
Adds the ability to validate incoming webhook requests using the `X-Telegram-Bot-Api-Secret-Token` header.

A new method `setSecretToken()` is added to the `Telegram` class to allow setting the expected secret token. The `handle()` method is updated to check for this token and throw an exception if it's invalid.
- Bumps library version to 1.0.9.
- Adds a new section to README.md explaining how to use the webhook secret token validation feature.
…idation

Feature webhook secret token validation
- Added `Request::$timeout` and `Request::setClientTimeout` to control Guzzle client timeout.
- Added Redis update de-duplication in `Telegram::processUpdate`.
- Added `Telegram::setRedis` for injecting Redis instance.
- Default request timeout is set to 60 seconds.
- Duplicate updates are cached in Redis for 60 seconds and return a fake success response.
- Added `Request::$timeout` and `Request::setClientTimeout` to control Guzzle client timeout.
- Added Redis update de-duplication in `Telegram::processUpdate`.
- Added `Telegram::setRedis` for injecting Redis instance.
- Added `Telegram::$update_retention_time` and `Telegram::setUpdateRetentionTime` to configure de-duplication TTL.
- Updated README.md with instructions.
- Default request timeout is set to 60 seconds.
- Duplicate updates are cached in Redis for 60 seconds (default) and return a fake success response.
…13030699252080218284

Add request timeout and Redis duplicate update prevention
This update implements features from Telegram Bot API versions 8.3, 9.0, 9.1, 9.2, and 9.3.

New Features:
- Business Accounts: Support for managing business connections, messages, and profile settings.
- Gifts: New entities and methods for managing and sending gifts (regular and unique).
- Checklists: Full support for checklist messages and interactions.
- Stories: Methods for posting, editing, deleting, and reposting stories.
- Direct Messages: Support for direct messages in channels and topics.
- Suggested Posts: Functionality for handling suggested posts in channels.
- Paid Media: Support for paid media interactions.
- Telegram Premium: Ability to gift Premium subscriptions.
- General Updates:
  - Video covers and start timestamps.
  - User rating and star balance methods.
  - Updates to `Chat` and `User` objects.

Added Classes:
- Entities for Business (BusinessBotRights, etc.)
- Entities for Gifts (Gift, UniqueGift, OwnedGift, etc.)
- Entities for Checklists (Checklist, ChecklistTask, etc.)
- Entities for Stories (StoryArea, InputStoryContent, etc.)
- Entities for Payments (StarAmount, AffiliateInfo, etc.)
- Helper entities like InputProfilePhoto, AcceptedGiftTypes.

Updated Files:
- `src/Request.php`: Added all new API methods and updated existing ones with new parameters.
- `src/Telegram.php`: Updated internal logic (though minimal changes required here).
- `src/Entities/*.php`: Updated existing entities (Message, Chat, User, etc.) to support new fields.

All changes follow the project's structure and conventions.
devrabie and others added 9 commits January 1, 2026 00:14
…93388176

Update Bot API to version 9.3 (including 8.3-9.2 features)
- Updated guzzlehttp/guzzle to ^7.9
- Updated psr/log to ^3.0
- Updated phpunit/phpunit to ^10.5
- Updated squizlabs/php_codesniffer to ^3.11
- Updated monolog/monolog to ^3.8
- Updated dms/phpunit-arraysubset-asserts to ^0.5

These updates ensure the project uses the latest secure versions of its dependencies, addressing potential vulnerabilities like SSRF in older Guzzle versions and removing any compromised local vendor files if they existed. Tests were run and passed under the new versions.
…-12249975689924364511

Update dependencies to latest stable versions for security
- Implemented all new entities and methods from API 7.4 through 9.3.
- Added support for forum topics in private chats.
- Added sendMessageDraft for partial message streaming.
- Enhanced Gifts support with Unique Gifts, colors, and blockchain info.
- Full support for managed business accounts (stories, checklists, profile settings).
- Complete Telegram Stars support (transactions, subscriptions, affiliate programs).
- Support for channel direct messages and suggested posts.
- Removed deprecated and replaced fields as per API 9.3 specifications.
- Added comprehensive unit tests for new features.
- Added API_9.3_FEATURES.md documentation in Arabic.
…5760889147

Update to Telegram Bot API 9.3
- Update MessageEntity with date_time type and associated fields.
- Add tag field to ChatMember types.
- Implement tag-related permissions in ChatPermissions and ChatAdministratorRights.
- Correct ChatOwner service messages schema.
- Update Request methods for sendMessageDraft and forum topics in private chats.
- Add Arabic documentation for new features in API_9.4_9.5_FEATURES.md.
- Add MessageEntity 'date_time' support with unix_time and date_time_format.
- Implement Member Tags and associated permissions (can_edit_tag, can_manage_tags).
- Add support for topics in private chats across forum management methods.
- Update KeyboardButton and InlineKeyboardButton with styles and custom emoji icons.
- Add VideoQuality, UserProfileAudios, and first_profile_audio support.
- Update Gift entities with rarity and is_burned fields.
- Correct ChatOwner service messages schema.
- Update CHANGELOG.md and bump version to 1.2.0.
- Add comprehensive Arabic documentation in API_9.4_9.5_FEATURES.md.
- Implement all new methods and entities for Bot API 9.4 and 9.5.
- Update existing entities with new fields (MessageEntity, KeyboardButton, User, ChatFullInfo, etc.).
- Add Arabic documentation for new features in API_9.4_9.5_FEATURES.md.
- Bump version to 1.2.0.
- Update CHANGELOG.md.
- Implement all new methods and entities for Bot API 9.4 and 9.5.
- Update existing entities with new fields (MessageEntity, KeyboardButton, User, ChatFullInfo, etc.).
- Add Arabic documentation for new features in API_9.4_9.5_FEATURES.md.
- Bump version to 1.2.0 in Telegram.php.
- Update CHANGELOG.md.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant