Releases: belka-tech/php-vk-teams-bot
Releases · belka-tech/php-vk-teams-bot
0.3.0
New
SelfApi— new$bot->self->get()for fetching bot info (/self/get)FilesApi— new$bot->files->getInfo($fileId)for file metadata (/files/getInfo)- Each API class now strictly corresponds to its endpoint namespace:
self,messages,chats,files,events
Breaking Changes
$bot->messages->filesGetInfo($fileId)→$bot->files->getInfo($fileId)$bot->messages->pinMessage(...)→$bot->chats->pinMessage(...)$bot->messages->unpinMessage(...)→$bot->chats->unpinMessage(...)
Other
- Add
ext-pcntlto dev requirements
0.2.0
Breaking Changes
EventLoop→BotEventListener— class renamed, constructor acceptsBotinstead ofHttpClientBot::$eventsis nowEventsApi(thin API client), no longer the event looppoll(Bot, int)→listen(int)— method renamed with changed signaturefetchEvents()removed from public API- Handlers require
\Closure(notcallable) and receiveEventDtoinstead ofarray HttpClient::post()→postMultipart()— method renamedKeyboard::$rowsis now privateinlineKeyboardMarkupparameters no longer accept arrays — useKeyboardorKeyboard::fromArray()- API paths now prefixed with
/v1/ - Duplicate commands in
onCommand()now throwInvalidArgumentException resolvePending()— validation changed from OR to XOR: passing both$userIdand$everyonenow throws\InvalidArgumentException(previously$userIdwas silently preferred); exception type changed fromExceptionto\InvalidArgumentExceptionsendFile()/sendVoice()— passing both$fileIdand$filePath(or neither) now throws\InvalidArgumentException(previously both were silently accepted)- Command matching —
/cmdno longer matches/cmdother; requires exact match or space/@delimiter after command name lastEventIdinitial value changed from1to0- Exception handling in event polling narrowed — only
NetworkExceptionInterfaceis caught and retried;TypeErrorandRequestExceptionInterfacenow propagate to the caller
Added
EventsApi— standalone client for fetching eventsEventDto— typed event DTO (eventId,type,payload)BotEventListener::stop()+ SIGTERM/SIGINT signal handlingKeyboard::fromArray()— factory method for migrating from raw arraysChatsApi::getMembers()— optional$cursorparameterlisten()accepts optional$onExceptioncallback- File-existence validation in
postMultipart()
Fixed
forwardMsgId/inlineKeyboardMarkupno longer sent as"null"string to API
Changed
- Unknown event types silently skipped (
tryFrominstead offrom)
0.1.1
Some minor tweaks in meta files.
Full Changelog: 0.1.0...0.1.1
0.1.0
Initial release