Skip to content
This repository was archived by the owner on Jun 28, 2024. It is now read-only.

Commit ea71e31

Browse files
committed
Merge branch 'code-lts:main' into main
2 parents 809bcd5 + bbf3ea3 commit ea71e31

File tree

113 files changed

+6688
-3422
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+6688
-3422
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
/.github export-ignore
33
/.gitattributes export-ignore
44
/.gitignore export-ignore
5+
/scripts export-ignore
6+
/doc export-ignore

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
php-version: ["5.5", "5.6", "7.1", "7.2", "7.3", "7.4", "8.0"]
1212
os: [ubuntu-latest]
1313
steps:
14-
- uses: actions/checkout@v1
14+
- uses: actions/checkout@v2
1515
- name: Use php ${{ matrix.php-version }}
1616
uses: shivammathur/setup-php@v2
1717
with:

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,26 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7-
## [v1.x.x]
7+
## [v1.6.2] - 2021-04-03
8+
9+
- Set FCMManager::getContainer public
10+
11+
## [v1.6.1]
12+
13+
- Fix PHP 8.0 support
14+
15+
## [v1.6.0]
816

917
- Support laravel 8
1018
- Support `illuminate/support` 8
1119
- Support `guzzlehttp/guzzle` 7
1220
- Add support for setDirectBootOk on OptionsBuilder
1321
- Mark setDryRun as deprecated v1 FCM on OptionsBuilder
1422
- Add Topics Creation And Subscription
23+
- Drop dev dependency `mockery/mockery`
24+
- Update rendered documentation
25+
- Exclude `doc` folder from composer tarballs
26+
- Add support for fcmOptions (#3)
1527

1628
## [v1.5.0]
1729

README.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ It currently **only supports HTTP protocol** for :
2323

2424
To get the latest version of Laravel-FCM on your project, require it from "composer":
2525

26-
```bash
26+
```sh
2727
composer require code-lts/laravel-fcm
2828
```
2929

3030
Or you can add it directly in your composer.json file:
3131

3232
```json
3333
{
34-
"require": {
35-
"code-lts/laravel-fcm": "1.5.*"
36-
}
34+
"require": {
35+
"code-lts/laravel-fcm": "1.6.*"
36+
}
3737
}
3838
```
3939

@@ -66,9 +66,9 @@ Add the facade aliases in the same file:
6666
6767
Publish the package config file using the following command:
6868

69-
70-
$ php artisan vendor:publish --provider="LaravelFCM\FCMServiceProvider"
71-
69+
```sh
70+
$ php artisan vendor:publish --provider="LaravelFCM\FCMServiceProvider"
71+
```
7272

7373
### Lumen
7474

@@ -135,7 +135,7 @@ $optionBuilder->setTimeToLive(60*20);
135135

136136
$notificationBuilder = new PayloadNotificationBuilder('my title');
137137
$notificationBuilder->setBody('Hello world')
138-
->setSound('default');
138+
->setSound('default');
139139

140140
$dataBuilder = new PayloadDataBuilder();
141141
$dataBuilder->addData(['a_data' => 'my_data']);
@@ -173,7 +173,7 @@ $optionBuilder->setTimeToLive(60*20);
173173

174174
$notificationBuilder = new PayloadNotificationBuilder('my title');
175175
$notificationBuilder->setBody('Hello world')
176-
->setSound('default');
176+
->setSound('default');
177177

178178
$dataBuilder = new PayloadDataBuilder();
179179
$dataBuilder->addData(['a_data' => 'my_data']);
@@ -223,7 +223,7 @@ use LaravelFCM\Message\Topics;
223223
```php
224224
$notificationBuilder = new PayloadNotificationBuilder('my title');
225225
$notificationBuilder->setBody('Hello world')
226-
->setSound('default');
226+
->setSound('default');
227227

228228
$notification = $notificationBuilder->build();
229229

@@ -249,7 +249,7 @@ It sends notification to devices registered at the following topics:
249249
```php
250250
$notificationBuilder = new PayloadNotificationBuilder('my title');
251251
$notificationBuilder->setBody('Hello world')
252-
->setSound('default');
252+
->setSound('default');
253253

254254
$notification = $notificationBuilder->build();
255255

@@ -303,7 +303,7 @@ $key = FCMTopic::unsubscribeTopic($topic_id, $recipients_tokens);
303303

304304
$notificationBuilder = new PayloadNotificationBuilder('my title');
305305
$notificationBuilder->setBody('Hello world')
306-
->setSound('default');
306+
->setSound('default');
307307

308308
$notification = $notificationBuilder->build();
309309

@@ -361,7 +361,7 @@ You can construct an option as follows:
361361
$optionsBuilder = new OptionsBuilder();
362362

363363
$optionsBuilder->setTimeToLive(42*60)
364-
->setCollapseKey('a_collapse_key');
364+
->setCollapseKey('a_collapse_key');
365365

366366
$options = $optionsBuilder->build();
367367
```
@@ -381,9 +381,9 @@ See the [official documentation](https://firebase.google.com/docs/cloud-messagin
381381
```php
382382
$notificationBuilder = new PayloadNotificationBuilder();
383383
$notificationBuilder->setTitle('title')
384-
->setBody('body')
385-
->setSound('sound')
386-
->setBadge('badge');
384+
->setBody('body')
385+
->setSound('sound')
386+
->setBadge('badge');
387387

388388
$notification = $notificationBuilder->build();
389389
```
@@ -429,9 +429,9 @@ For topics message, Laravel-FCM offers an easy to use api which abstract firebas
429429
$topics = new Topics();
430430

431431
$topics->topic('TopicA')
432-
->andTopic(function($condition) {
433-
$condition->topic('TopicB')->orTopic('TopicC');
434-
});
432+
->andTopic(function($condition) {
433+
$condition->topic('TopicB')->orTopic('TopicC');
434+
});
435435
```
436436

437437
## Validating
@@ -440,7 +440,7 @@ $topics->topic('TopicA')
440440

441441
```php
442442
$isValid = FCMValidator::validateToken($token);
443-
```
443+
```
444444

445445
## Testing
446446

@@ -455,8 +455,8 @@ There are 3 kinds of "MockResponse" given by the package:
455455
You can mock the FCM call as in the following example:
456456

457457
```php
458-
$numberSucess = 2;
459-
$mockResponse = new \LaravelFCM\Mocks\MockDownstreamResponse(numberSucess);
458+
$numberSuccess = 2;
459+
$mockResponse = new \LaravelFCM\Mocks\MockDownstreamResponse($numberSuccess);
460460

461461
$mockResponse->addTokenToDelete('token_to_delete');
462462
$mockResponse->addTokenToModify('token_to_modify', 'token_modified');
@@ -472,7 +472,7 @@ $this->app->singleton('fcm.sender', function($app) use($sender) {
472472

473473
## API Documentation
474474

475-
You can find more documentation about the API in the [API reference](./doc/Readme.md).
475+
You can find more documentation about the API in the [API reference](./doc/index.md).
476476

477477

478478
## Licence

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@
1515
}
1616
],
1717
"require": {
18-
"php": ">=5.5.9",
18+
"php": "^5.5.9 || ^7.0 || ^8.0",
1919
"illuminate/support": "5.* || ^6 || ^7 || ^8",
2020
"guzzlehttp/guzzle": "^6 || ^7",
2121
"monolog/monolog": "^1.12|^2.0"
2222
},
2323
"require-dev": {
24-
"mockery/mockery" : "0.9.* || 1.4.*",
2524
"phpunit/phpunit" : "^4 || ^5 || ^6 || ^7 || ^8 || ^9",
2625
"laravel/laravel": "5.* || ^6 || ^7 || ^8"
2726
},

doc/LaravelFCM-Message-Exceptions-InvalidOptionsException.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

doc/LaravelFCM-Message-Exceptions-NoTopicProvidedException.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

doc/LaravelFCM-Message-Options.md

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)