Skip to content

Releases: belka-tech/php-vk-teams-bot

0.3.0

22 Mar 17:41
54954ed

Choose a tag to compare

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-pcntl to dev requirements

0.2.0

22 Mar 13:29
20dc892

Choose a tag to compare

Breaking Changes

  1. EventLoopBotEventListener — class renamed, constructor accepts Bot instead of HttpClient
  2. Bot::$events is now EventsApi (thin API client), no longer the event loop
  3. poll(Bot, int)listen(int) — method renamed with changed signature
  4. fetchEvents() removed from public API
  5. Handlers require \Closure (not callable) and receive EventDto instead of array
  6. HttpClient::post()postMultipart() — method renamed
  7. Keyboard::$rows is now private
  8. inlineKeyboardMarkup parameters no longer accept arrays — use Keyboard or Keyboard::fromArray()
  9. API paths now prefixed with /v1/
  10. Duplicate commands in onCommand() now throw InvalidArgumentException
  11. resolvePending() — validation changed from OR to XOR: passing both $userId and $everyone now throws \InvalidArgumentException (previously $userId was silently preferred); exception type changed from Exception to \InvalidArgumentException
  12. sendFile() / sendVoice() — passing both $fileId and $filePath (or neither) now throws \InvalidArgumentException (previously both were silently accepted)
  13. Command matching/cmd no longer matches /cmdother; requires exact match or space/@ delimiter after command name
  14. lastEventId initial value changed from 1 to 0
  15. Exception handling in event polling narrowed — only NetworkExceptionInterface is caught and retried; TypeError and RequestExceptionInterface now propagate to the caller

Added

  • EventsApi — standalone client for fetching events
  • EventDto — typed event DTO (eventId, type, payload)
  • BotEventListener::stop() + SIGTERM/SIGINT signal handling
  • Keyboard::fromArray() — factory method for migrating from raw arrays
  • ChatsApi::getMembers() — optional $cursor parameter
  • listen() accepts optional $onException callback
  • File-existence validation in postMultipart()

Fixed

  • forwardMsgId / inlineKeyboardMarkup no longer sent as "null" string to API

Changed

  • Unknown event types silently skipped (tryFrom instead of from)

0.1.1

21 Mar 08:29

Choose a tag to compare

Some minor tweaks in meta files.

Full Changelog: 0.1.0...0.1.1

0.1.0

20 Mar 16:01

Choose a tag to compare

Initial release