Skip to content

Commit 1fd3048

Browse files
author
OneSignal
committed
Update PHP API
1 parent dbf7b13 commit 1fd3048

File tree

118 files changed

+46550
-2
lines changed

Some content is hidden

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

118 files changed

+46550
-2
lines changed
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: 🙋‍♂️ Ask a question
2+
description: Tell us what's on your mind
3+
title: "[question]: "
4+
labels: ["triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Having issues integrating this API library?
10+
- type: textarea
11+
id: question
12+
attributes:
13+
label: How can we help?
14+
description: Specific question regarding integrating this API library.
15+
placeholder: How do I...?
16+
validations:
17+
required: true
18+
- type: checkboxes
19+
id: terms
20+
attributes:
21+
label: Code of Conduct
22+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/OneSignal/api/blob/main/CONTRIBUTING.md)
23+
options:
24+
- label: I agree to follow this project's Code of Conduct
25+
required: true

.github/ISSUE_TEMPLATE/bug-report.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: 🪳 Bug report
2+
description: File a bug report
3+
title: "[Bug]: "
4+
labels: ["bug", "triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to fill out this bug report!
10+
- type: textarea
11+
id: what-happened
12+
attributes:
13+
label: What happened?
14+
description: Provide a thorough description of whats going on.
15+
placeholder: The latest version of the API library throws an exception when creating a notification targetting all Active Users.
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: reproduction-steps
20+
attributes:
21+
label: Steps to reproduce?
22+
description: Provide as much detail as posible to reproduce the issue.
23+
placeholder: |
24+
1. Install vX.Y.Z of dependency
25+
2. Run provided code snippet
26+
3. Note that the app crashes
27+
render: Markdown
28+
validations:
29+
required: true
30+
- type: textarea
31+
id: what-are-expectations
32+
attributes:
33+
label: What did you expect to happen?
34+
description: Also tell us, what did you expect to happen?
35+
placeholder: I expected the API library to properly deserialize any response returned by OneSignal.
36+
validations:
37+
required: true
38+
- type: textarea
39+
id: logs
40+
attributes:
41+
label: Relevant log output
42+
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
43+
render: Shell
44+
- type: checkboxes
45+
id: terms
46+
attributes:
47+
label: Code of Conduct
48+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/OneSignal/api/blob/main/CONTRIBUTING.md)
49+
options:
50+
- label: I agree to follow this project's Code of Conduct
51+
required: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: 📣 General feedback
2+
description: Tell us what's on your mind
3+
title: "[Bug]: "
4+
labels: ["triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for sharing your valuable feedback!
10+
- type: textarea
11+
id: feedback
12+
attributes:
13+
label: What's on your mind?
14+
description: Feedback regarding this API library.
15+
placeholder: Share your feedback...
16+
validations:
17+
required: true
18+
- type: checkboxes
19+
id: terms
20+
attributes:
21+
label: Code of Conduct
22+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/OneSignal/api/blob/main/CONTRIBUTING.md)
23+
options:
24+
- label: I agree to follow this project's Code of Conduct
25+
required: true

.github/pull_request_template.md

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<!-- START -->
2+
# READ AND DELETE THIS SECTION BEFORE SUBMITTING PR
3+
* **Fill out each _REQUIRED_ section**
4+
* **Fill out _OPTIONAL_ sections, remove section if it doesn't apply to your PR**
5+
* **Read and fill out each of the checklists below**
6+
* **Remove this section after reading**
7+
<!-- END -->
8+
9+
# Description
10+
## One Line Summary
11+
**REQUIRED** - Very short description that summaries the changes in this PR.
12+
13+
## Details
14+
15+
### Motivation
16+
**REQUIRED -** Why is this code change being made? Or what is the goal of this PR? Examples: Fixes a specific bug, provides additional logging to debug future issues, feature to allow X.
17+
18+
### Scope
19+
**RECOMMEND - OPTIONAL -** What is intended to be effected. What is known not to change. Example: Notifications are grouped when parameter X is set, not enabled by default.
20+
21+
### OPTIONAL - Other
22+
**OPTIONAL -** Feel free to add any other sections or sub-sections that can explain your PR better.
23+
24+
# Testing
25+
26+
## Manual testing
27+
**REQUIRED -** Explain what scenarios were tested and the environment.
28+
29+
30+
# Checklist
31+
## Overview
32+
- [ ] I have filled out all **REQUIRED** sections above
33+
- [ ] PR does one thing
34+
- If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR
35+
- [ ] Any Public API changes are explained in the PR details and conform to existing APIs
36+
37+
## Testing
38+
- [ ] I have personally tested this on my device, or explained why that is not possible
39+
40+
## Final pass
41+
- [ ] Code is as readable as possible.
42+
- Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
43+
- [ ] I have reviewed this PR myself, ensuring it meets each checklist item
44+
- WIP (Work In Progress) is ok, but explain what is still in progress and what you would like feedback on. Start the PR title with "WIP" to indicate this.

.gitignore

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# ref: https://github.com/github/gitignore/blob/master/Composer.gitignore
2+
3+
composer.phar
4+
/vendor/
5+
6+
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
7+
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
8+
# composer.lock
9+
10+
# php-cs-fixer cache
11+
.php_cs.cache
12+
.php-cs-fixer.cache
13+
14+
# PHPUnit cache
15+
.phpunit.result.cache

.php-cs-fixer.dist.php

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
3+
/**
4+
* @generated
5+
* @link https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/HEAD/doc/config.rst
6+
*/
7+
$finder = PhpCsFixer\Finder::create()
8+
->in(__DIR__)
9+
->exclude('vendor')
10+
->exclude('test')
11+
->exclude('tests')
12+
;
13+
14+
$config = new PhpCsFixer\Config();
15+
return $config->setRules([
16+
'@PSR12' => true,
17+
'phpdoc_order' => true,
18+
'array_syntax' => [ 'syntax' => 'short' ],
19+
'strict_comparison' => true,
20+
'strict_param' => true,
21+
'no_trailing_whitespace' => false,
22+
'no_trailing_whitespace_in_comment' => false,
23+
'braces' => false,
24+
'single_blank_line_at_eof' => false,
25+
'blank_line_after_namespace' => false,
26+
'no_leading_import_slash' => false,
27+
])
28+
->setFinder($finder)
29+
;

LICENSE

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Modified MIT License
2+
3+
Copyright 2022 OneSignal
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
1. The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
2. All copies of substantial portions of the Software may only be used in connection
16+
with services provided by OneSignal.
17+
18+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24+
THE SOFTWARE.

0 commit comments

Comments
 (0)