Releases: al3x5dev/xbot-devkit
Releases · al3x5dev/xbot-devkit
v0.4.0
🚀 What's New
This release introduces factory methods and type constants for all 21 polymorphic entity types in the Telegram Bot API.
✨ Features
Factory Methods
Added static create() factory method to all polymorphic entities, allowing developers to easily instantiate the correct subtype without manually selecting the class:
// Before - manual class selection
$content = new InputTextMessageContent([
'message_text' => 'Hello'
]);
// Now - automatic type detection
$content = InputMessageContent::create([
'message_text' => 'Hello'
]);v0.3.1
v0.3
Changelog
Changed
- Replaced the old api.json-based method system with a generated Methods trait.
- Methods are now directly available in the codebase, improving IDE support and static analysis.
- Entities directory has been moved to a new location to simplify the project structure.
Removed
- Removed automatic generation and usage of api.json.
- Removed runtime parsing of method definitions from JSON.
Added
- Generated API methods now include:
- PHP type hints
- Return types
- Improved PHPDoc comments
- Full IDE autocompletion support for Telegram Bot API methods.
Fixed
- Fixed incorrect nullable union type generation (?TypeA|TypeB).
- Fixed parameter ordering issues that broke named arguments.
- Fixed incorrect return type parsing from Telegram documentation.
v0.2.4
v0.2.3
v0.2.2
v0.2.1
v0.2.0
v.0.1
Changelog
Added
- First public release of
xbot-devkit. Scrapperclass to parse Telegram Bot API HTML documentation.Generatorclass to convert parsed data into PHP entity classes.- CLI command
bin/update-apito automate the scraping and generation process. - PSR-4 autoloading (
Al3x5\\xBot\\DevKit\\). - Composer bin entry for ease of use.