forked from spatie/laravel-webhook-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from quick-order/v1.13.0
Upgrade fork to resemble upstream at tag 1.13.0
- Loading branch information
Showing
19 changed files
with
299 additions
and
93 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Security Policy | ||
|
||
If you discover any security related issues, please email [email protected] instead of using the issue tracker. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Check & fix styling | ||
|
||
on: [push] | ||
|
||
jobs: | ||
style: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Fix style | ||
uses: docker://oskarstark/php-cs-fixer-ga | ||
with: | ||
args: --config=.php_cs --allow-risky=yes | ||
|
||
- name: Extract branch name | ||
shell: bash | ||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | ||
id: extract_branch | ||
|
||
- name: Commit changes | ||
uses: stefanzweifel/[email protected] | ||
with: | ||
commit_message: Fix styling | ||
branch: ${{ steps.extract_branch.outputs.branch }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ composer.lock | |
docs | ||
vendor | ||
coverage | ||
.idea/ | ||
.php_cs.cache | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
$finder = Symfony\Component\Finder\Finder::create() | ||
->notPath('bootstrap/*') | ||
->notPath('storage/*') | ||
->notPath('vendor') | ||
->in([ | ||
__DIR__ . '/src', | ||
__DIR__ . '/tests', | ||
]) | ||
->name('*.php') | ||
->notName('*.blade.php') | ||
->ignoreDotFiles(true) | ||
->ignoreVCS(true); | ||
|
||
return PhpCsFixer\Config::create() | ||
->setRules([ | ||
'@PSR2' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'ordered_imports' => ['sortAlgorithm' => 'alpha'], | ||
'no_unused_imports' => true, | ||
'not_operator_with_successor_space' => true, | ||
'trailing_comma_in_multiline_array' => true, | ||
'phpdoc_scalar' => true, | ||
'unary_operator_spaces' => true, | ||
'binary_operator_spaces' => true, | ||
'blank_line_before_statement' => [ | ||
'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'], | ||
], | ||
'phpdoc_single_line_var_spacing' => true, | ||
'phpdoc_var_without_name' => true, | ||
'class_attributes_separation' => [ | ||
'elements' => [ | ||
'method', 'property', | ||
], | ||
], | ||
'method_argument_space' => [ | ||
'on_multiline' => 'ensure_fully_multiline', | ||
'keep_multiple_spaces_after_comma' => true, | ||
] | ||
]) | ||
->setFinder($finder); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,6 @@ | |
|
||
[![Latest Version on Packagist](https://img.shields.io/packagist/v/spatie/laravel-webhook-server.svg?style=flat-square)](https://packagist.org/packages/spatie/laravel-webhook-server) | ||
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/spatie/laravel-webhook-server/run-tests?label=tests) | ||
[![Quality Score](https://img.shields.io/scrutinizer/g/spatie/laravel-webhook-server.svg?style=flat-square)](https://scrutinizer-ci.com/g/spatie/laravel-webhook-server) | ||
[![StyleCI](https://github.styleci.io/repos/191252974/shield?branch=master)](https://github.styleci.io/repos/191252974) | ||
[![Total Downloads](https://img.shields.io/packagist/dt/spatie/laravel-webhook-server.svg?style=flat-square)](https://packagist.org/packages/spatie/laravel-webhook-server) | ||
|
||
A webhook is a way for an app to provide information to another app about a particular event. The way the two apps communicate is with a simple HTTP request. | ||
|
@@ -14,7 +12,9 @@ If you need to receive and process webhooks take a look at our [laravel-webhook- | |
|
||
## Support us | ||
|
||
We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us). | ||
[<img src="https://github-ads.s3.eu-central-1.amazonaws.com/laravel-webhook-server.jpg?t=1" width="419px" />](https://spatie.be/github-ad-click/laravel-webhook-server) | ||
|
||
We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us). | ||
|
||
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards). | ||
|
||
|
@@ -115,7 +115,6 @@ WebhookCall::create() | |
->dispatchNow(); | ||
``` | ||
|
||
|
||
### How signing requests works | ||
|
||
When setting up, it's common to generate, store, and share a secret between your app and the app that wants to receive webhooks. Generating the secret could be done with `Illuminate\Support\Str::random()`, but it's entirely up to you. The package will use the secret to sign a webhook call. | ||
|
@@ -143,7 +142,6 @@ WebhookCall::create() | |
|
||
By calling this method, the `Signature` header will not be set. | ||
|
||
|
||
### Customizing signing requests | ||
|
||
If you want to customize the signing process, you can create your own custom signer. A signer is any class that implements `Spatie\WebhookServer\Signer`. | ||
|
@@ -220,7 +218,6 @@ WebhookCall::create() | |
|
||
Under the hood, the retrying of the webhook calls is implemented using [delayed dispatching](https://laravel.com/docs/master/queues#delayed-dispatching). Amazon SQS only has support for a small maximum delay. If you're using Amazon SQS for your queues, make sure you do not configure the package in a way so there are more than 15 minutes between each attempt. | ||
|
||
|
||
### Customizing the HTTP verb | ||
|
||
By default, all webhooks will use the `post` method. You can customize that by specifying the HTTP verb you want in the `http_verb` key of the `webhook-server` config file. | ||
|
@@ -289,7 +286,7 @@ WebhookCall::create() | |
### Exception handling | ||
By default, the package will not log any exceptions that are thrown when sending a webhook. | ||
|
||
To handle exceptions you need to create listen for the `Spatie\WebhookServer\Events\WebhookCallFailedEvent` and/or `Spatie\WebhookServer\Events|FinalWebhookCallFailedEvent` events. | ||
To handle exceptions you need to create listeners for the `Spatie\WebhookServer\Events\WebhookCallFailedEvent` and/or `Spatie\WebhookServer\Events\FinalWebhookCallFailedEvent` events. | ||
|
||
### Events | ||
|
||
|
@@ -332,7 +329,7 @@ If you discover any security-related issues, please email [email protected] instea | |
|
||
You're free to use this package, but if it makes it to your production environment, we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. | ||
|
||
Our address is: Spatie, Samberstraat 69D, 2060 Antwerp, Belgium. | ||
Our address is: Spatie, Kruikstraat 22, 2018 Antwerp, Belgium. | ||
|
||
We publish all received postcards [on our company website](https://spatie.be/en/opensource/postcards). | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit bootstrap="vendor/autoload.php" | ||
backupGlobals="false" | ||
backupStaticAttributes="false" | ||
colors="true" | ||
verbose="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false"> | ||
<testsuites> | ||
<testsuite name="Spatie Test Suite"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<php> | ||
<env name="QUEUE_CONNECTION" value="database"/> | ||
</php> | ||
<filter> | ||
<whitelist> | ||
<directory suffix=".php">src/</directory> | ||
</whitelist> | ||
</filter> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" backupStaticAttributes="false" colors="true" verbose="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> | ||
<coverage> | ||
<include> | ||
<directory suffix=".php">src/</directory> | ||
</include> | ||
</coverage> | ||
<testsuites> | ||
<testsuite name="Spatie Test Suite"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<php> | ||
<env name="QUEUE_CONNECTION" value="database"/> | ||
</php> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.