Skip to content

Releases: line/line-bot-sdk-php

v11.0.1 Update parsing Webhook Events

27 Mar 07:05
72a263b
Compare
Choose a tag to compare

What's Changed

Note this patch is not related to sdk users. This release is just for our test. See https://github.com/line/line-bot-sdk-php/releases/tag/v11.0.0 about new features.

Other Changes

  • Grant minimum permissions to github acitons workflow jobs by @Yang-33 in #682
  • Delete examples/KitchenSink/.github/workflows/workflow.yml by @Yang-33 in #681
  • Migrate renovate config by @Yang-33 in #685
  • Pin commit hash of github actions to avoid supply chain attacks by @Yang-33 in #680

Full Changelog: v11.0.0...v11.0.1


This release is prepared by @Yang-33

v11.0.0 Update parsing Webhook Events

26 Mar 09:29
98c8815
Compare
Choose a tag to compare

What's Changed

How to migrate v10 to v11

This release contains breaking changes related to how Webhook events are parsed. Specifically:

  1. Joined/Left Members
    • Old behavior:
      The members in joined.members or left.members were associative arrays.
    • New behavior:
      They are now properly deserialized into instances of UserSource.
    • Migration:
      Please treat it as a UserSource rather than as an associative array. In addition, this allows you to utilize methods of UserSource for each member. For example, we can still use $member["userId"] but $member->getUserId(); is recommended.
$parsedEvents = EventRequestParser::parseEventRequest($req->getBody(), $secret, $req->getHeader(HTTPHeader::LINE_SIGNATURE)[0]);
foreach ($parsedEvents->getEvents() as $event) {
  if ($event instanceof MemberJoinedEvent) {
    $joinedMembers = $event->getJoined()->getMembers();
    $joinedMemberIds = array_map(function ($member) {
-        return $member["userId"];
+        return $member->getUserId();
    }, $joinedMembers);
  }
}
  1. Default value of message.emojis
    • Old behavior:
      message.emojis were defaulted to empty arrays.
    • New behavior:
      message.emojis were defaulted to NULL as other array fields. This means if the webhook does not contain emojis, the emojis field in the parsed event will now be NULL instead of an empty array.
    • Migration:
      Instead of checking whether it's an empty array to determine if the field is present, please check if it's NULL first.

Please update your application code accordingly to handle these changes.

Other changes

  • Add memberJoinedEventHandler in KitchenSink by @eucyt in #678
  • Fix EchoBot DI error to receive messages by @eucyt in #676
  • Fix LocationMessageHandler in example to handle non title or address by @eucyt in #679

line-openapi updates

  • chore(deps): update line-openapi digest to 9dec0f8 by @renovate in #672

Dependency updates

  • chore(deps): update dependency squizlabs/php_codesniffer to v3.12.0 by @renovate in #674

Full Changelog: v10.3.0...v11.0.0


This release is prepared by @eucyt

v10.3.0 Support PHP 8.4

13 Mar 04:53
06bedf7
Compare
Choose a tag to compare

Support for PHP 8.4

We are delighted to announce official support for PHP 8.4. As part of this update, we have addressed changes related to PHP's new deprecations.

Deprecated: Implicitly Nullable Parameter

Starting from PHP 8.4, the use of implicitly nullable parameters has been deprecated. Thanks to the fixes in OpenAPI Generator version 7.11.0 ( OpenAPITools/openapi-generator#20243 ) by @77web, any occurrence of this deprecated syntax has been removed from the autogenerated files.

- function foo (array $data = null)
+ function foo (array|null $data = null)

For more information on these deprecations, please refer to the PHP 8.4 Migration Guide.

Enhancements in Type Safety

Additionally, several implementations have been refactored for improved type safety. This raised the PHPStan level from 5 to 8.

Other Changes

Full Changelog: v10.2.1...v10.3.0


This release is prepared by @eucyt

v10.2.1 Fix response handling in audience group APIs

10 Mar 02:24
5a8a5b3
Compare
Choose a tag to compare

What's Changed

  • Modify http status code as response for manage-audience by @github-actions in #665

This change modifies the HTTP status code for the following audience group-related endpoints, as they were incorrect.
Some http status codes are wrong. They should be 202, not 200.

  1. POST /v2/bot/audienceGroup/upload (createAudienceGroup)
  2. PUT /v2/bot/audienceGroup/upload (addAudienceToAudienceGroup)
  3. POST /v2/bot/audienceGroup/upload/byFile (createAudienceForUploadingUserIds)
  4. POST /v2/bot/audienceGroup/click (createClickBasedAudienceGroup)
  5. POST /v2/bot/audienceGroup/imp (createImpBasedAudienceGroup)

NOTE: This change is not a modification of the messaging API itself. It is simply a correction of an error in sdk.

(original PR is line/line-openapi#87)

Full Changelog: v10.2.0...v10.2.1


This release is prepared by @Yang-33

v10.2.0 Support new Membership API and Webhook

13 Feb 10:01
62d08a6
Compare
Choose a tag to compare

What's Changed

  • Support new Membership API and Webhook by @github-actions in #663

Support new Membership API and Webhook

We have implemented and supported new API and Webhook about Membership.

API to get a list of users who joined the membership

You can obtain a list of user IDs for users who have joined the membership of your LINE Official Account by calling client.getJoinedMembershipUsers(...).

Documents: https://developers.line.biz/en/reference/messaging-api/#get-membership-user-ids

Membership Webhook

We have introduced new Webhook events MembershipEvent that indicates that a user has joined, left or renewed a membership of your LINE Official Account.

Documents: https://developers.line.biz/en/reference/messaging-api/#membership-event

For more details

For more details, check out the announcement: https://developers.line.biz/en/news/2025/02/13/membership-api/

(original PR is line/line-openapi#86)

Other Changes

  • Support membership webhook event by @eucyt in #664

Full Changelog: v10.1.0...v10.2.0


This release is prepared by @eucyt

v10.1.0 Support API of Shared Audiences in Business Manager

12 Feb 09:50
02fee2e
Compare
Choose a tag to compare

What's Changed

Add /v2/bot/audienceGroup/shared path by @github-actions in #662

Shared Audiences in Business Manager API Support

We have added and supported new API endpoints related to Shared Audiences in Business Manager.

API to Get Shared Audience Information

You can obtain detailed information about a specific audience shared in Business Manager by calling the endpoint:

  • GET https://api.line.me/v2/bot/audienceGroup/shared/{audienceGroupId}

API to Get List of Shared Audiences

You can acquire a list of audiences shared in Business Manager using the following endpoint:

  • GET https://api.line.me/v2/bot/audienceGroup/shared/list

By using the "Get Shared Audience Information" endpoint, you can retrieve more detailed data about each audience.

Documents and Reference

For more information, please refer to the links provided above.

(original PR is line/line-openapi#85)


line-openapi updates

  • chore(deps): update line-openapi digest to 5eeed11 by @renovate in #661

Dependency updates

  • chore(deps): update dependency squizlabs/php_codesniffer to v3.11.3 by @renovate in #658

Full Changelog: v10.0.3...v10.1.0


This release is prepared by @eucyt

v10.0.3 Remove obsolete GET /v2/bot/message/delivery/ad_phone

23 Jan 08:41
4ef9fb7
Compare
Choose a tag to compare

What's Changed

  • Retire GET /v2/bot/message/delivery/ad_phone by @github-actions in #656

GET /v2/bot/message/delivery/ad_phone was sunset.
This change removes it as it's no longer necessary to include it in line-openapi.

(original PR is line/line-openapi#82)

line-openapi updates

  • Retire GET /v2/bot/message/delivery/ad_phone by @github-actions in #656

Other Changes

  • Fix renovate config for gitsubmodule by @Yang-33 in #654
  • Fix double-quote handling in release creation workflow by @Yang-33 in #657

Full Changelog: v10.0.2...v10.0.3

v10.0.2 Remove obsolete feature: Audience Match

20 Jan 03:06
5538dce
Compare
Choose a tag to compare

What's Changed

  • Remove obsolete feature: Audience Match by @github-actions in #650

The Audience Match feature (/bot/ad/multicast/phone) was sunset in October 2023. This change removes it as it's no longer necessary to include it in line-openapi.

(original PR is line/line-openapi#80)

Dependency updates

  • chore(deps): update line-openapi digest to 5ae51b6 by @renovate in #651

Other Changes

  • Update and rename diff-check.yml to generate-code.yml by @eucyt in #648
  • Limit the timing of git submodule updates by renovate to avoid disrupting work during working hours by @Yang-33 in #649

Full Changelog: v10.0.1...v10.0.2


This release is prepared by @Yang-33

v10.0.1 Add new errorCode 4 of NarrowcastProgressResponse

15 Jan 09:14
c902425
Compare
Choose a tag to compare

What's Changed

A new value in "NarrowcastProgressResponse#errrorCode" was defined and comments have been added to the SDK.
https://developers.line.biz/en/reference/messaging-api/#get-narrowcast-progress-status

  • Add new errorCode 4 of NarrowcastProgressResponse by @github-actions in #642

Dependency updates

  • chore(deps): update line-openapi digest to 491e118 by @renovate in #643

Full Changelog: v10.0.0...v10.0.1


This release is prepared by @eucyt

v10.0.0 All `*AllOf.php` are deleted

26 Dec 02:33
9b453a6
Compare
Choose a tag to compare

What's Changed

  • Bump up openapi generator version to 7.10.0 by @Yang-33 in #640
    • we bumped up openapi generator version internally. As a result, all *AllOf.php are deleted. See in below to understand how to migrate.
  • Support phpstan 2.0 by @eucyt in #635
    • just modifying comment in EventRequestParser to use phpstan@2.0

How to migrate v9 to v10

If your application uses any *AllOf.php provided in this repository, please use *.php instead. only changing class name is enough, because they are same internally.

e.g.

  • MessageEventAllOf -> MessageEvent.
  • use LINE\Webhook\Model\MessageEventAllOf; -> use LINE\Webhook\Model\MessageEvent;
  • ClipboardActionAllOf -> ClipboardAction
  • use LINE\Clients\MessagingApi\Model\ClipboardActionAllOf; -> use LINE\Clients\MessagingApi\Model\ClipboardAction;

line-openapi updates

  • Codes are generated by openapi generator by @github-actions in #628

Dependency updates

  • chore(deps): update dependency squizlabs/php_codesniffer to v3.11.0 by @renovate in #623
  • chore(deps): update dependency squizlabs/php_codesniffer to v3.11.1 by @renovate in #624
  • chore(deps): update line-openapi digest to 6312d4b by @renovate in #627
  • chore(deps): update actions/github-script action to v7 by @renovate in #629
  • chore(deps): update line-openapi digest to e8fbce9 by @renovate in #631
  • chore(deps): update dependency squizlabs/php_codesniffer to v3.11.2 by @renovate in #634

Other Changes

  • Automate to prepare release note with next version by @Yang-33 in #626
  • Allow renovate PR to have un committed changes by @Yang-33 in #630
  • Set title and description written in line-openapi PR by @Yang-33 in #633
  • Show filenames of diff from auto-generated files in CI by @eucyt in #638
  • Refactor duplicated CI code by @eucyt in #639

Full Changelog: 9.12.0...v10.0.0


This release is prepared by @Yang-33