diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1bba6ba..229bf6f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,6 @@ name: ci on: - push: - branches: [ main ] pull_request: branches: [ main ] @@ -14,19 +12,19 @@ jobs: strategy: fail-fast: false matrix: - php-version: [ '7.4', '8.0' ] + php-version: [ '7.4', '8.0', '8.1', '8.2', '8.3' ] allow-failure: [ false ] coverage: [ false ] composer-flags: [ '' ] include: - php-version: '7.3' coverage: true - - php-version: '8.1' + - php-version: '8.4' allow-failure: true composer-flags: '--ignore-platform-req php' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: php-setup uses: shivammathur/setup-php@v2 @@ -38,7 +36,7 @@ jobs: - name: composer-cache id: composer-cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: vendor key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.lock') }} @@ -63,7 +61,7 @@ jobs: - name: coverage if: ${{ matrix.coverage }} - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} - directory: ./build + directory: ./.coverage/coverage.xml diff --git a/LICENSE b/LICENSE index a790b84..0d86584 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2016-2018 Romain Monteil +Copyright (c) 2016-2025 Romain Monteil Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 5c48e3f..318bc79 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,9 @@ -
+[![Tests](https://img.shields.io/github/actions/workflow/status/ker0x/messenger/ci.yml?label=tests&style=for-the-badge)](https://github.com/ker0x/fcm/actions/workflows/ci.yml) +[![Coverage](https://img.shields.io/codecov/c/gh/ker0x/messenger?style=for-the-badge)](https://codecov.io/gh/ker0x/messenger/) +![PHP Version](https://img.shields.io/badge/php->=7.3-4f5b93.svg?style=for-the-badge) +[![Download](https://img.shields.io/packagist/dt/kerox/messenger.svg?style=for-the-badge)](https://packagist.org/packages/kerox/messenger) +[![Packagist](https://img.shields.io/packagist/v/kerox/messenger.svg?style=for-the-badge)](https://packagist.org/packages/kerox/messenger) +[![License](https://img.shields.io/packagist/l/kerox/messenger.svg?style=for-the-badge)](https://github.com/ker0x/messenger/blob/main/LICENSE) # Messenger diff --git a/tests/TestCase/Api/SendTest.php b/tests/TestCase/Api/SendTest.php index 12d1b65..7e8a770 100644 --- a/tests/TestCase/Api/SendTest.php +++ b/tests/TestCase/Api/SendTest.php @@ -147,7 +147,7 @@ public function testInvalidNotificationType(): void public function testInvalidTagType(): void { $this->expectException(MessengerException::class); - $this->expectExceptionMessage('"tag" must be either "CONFIRMED_EVENT_UPDATE, POST_PURCHASE_UPDATE, ACCOUNT_UPDATE, BUSINESS_PRODUCTIVITY, COMMUNITY_ALERT, CONFIRMED_EVENT_REMINDER, NON_PROMOTIONAL_SUBSCRIPTION, PAIRING_UPDATE, APPLICATION_UPDATE, PAYMENT_UPDATE, PERSONAL_FINANCE_UPDATE, SHIPPING_UPDATE, RESERVATION_UPDATE, ISSUE_RESOLUTION, APPOINTMENT_UPDATE, GAME_EVENT, TRANSPORTATION_UPDATE, FEATURE_FUNCTIONALITY_UPDATE, TICKET_UPDATE".'); + $this->expectExceptionMessage('"tag" must be either "HUMAN_AGENT, CONFIRMED_EVENT_UPDATE, POST_PURCHASE_UPDATE, ACCOUNT_UPDATE, BUSINESS_PRODUCTIVITY, COMMUNITY_ALERT, CONFIRMED_EVENT_REMINDER, NON_PROMOTIONAL_SUBSCRIPTION, PAIRING_UPDATE, APPLICATION_UPDATE, PAYMENT_UPDATE, PERSONAL_FINANCE_UPDATE, SHIPPING_UPDATE, RESERVATION_UPDATE, ISSUE_RESOLUTION, APPOINTMENT_UPDATE, GAME_EVENT, TRANSPORTATION_UPDATE, FEATURE_FUNCTIONALITY_UPDATE, TICKET_UPDATE".'); $this->sendApi->message('1008372609250235', 'Hello World!', [ 'notification_type' => SendInterface::NOTIFICATION_TYPE_REGULAR, 'tag' => 'INVOICE_UPDATE',