Skip to content

Commit 6f52357

Browse files
committed
Extracted AppWebhook.
1 parent aa6a50b commit 6f52357

40 files changed

+1737
-0
lines changed

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
; This file is for unifying the coding style for different editors and IDEs.
2+
; More information at https://editorconfig.org
3+
root = true
4+
5+
[*]
6+
indent_style = space
7+
indent_size = 4
8+
end_of_line = lf
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
[*.bat]
13+
end_of_line = crlf
14+
15+
[composer.json]
16+
indent_size = 2

.gitattributes

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Define the line ending behavior of the different file extensions
2+
# Set the default behavior, in case people don't have core.autocrlf set.
3+
* text text=auto eol=lf
4+
5+
*.php diff=php
6+
7+
# Denote all files that are truly binary and should not be modified.
8+
*.png binary
9+
*.jpg binary
10+
*.gif binary
11+
*.jpeg binary
12+
*.zip binary
13+
*.phar binary
14+
*.ttf binary
15+
*.woff binary
16+
*.woff2 binary
17+
*.eot binary
18+
*.ico binary
19+
*.mo binary
20+
*.pdf binary
21+
*.xsd binary
22+
*.exe binary
23+
24+
# Remove files for archives generated using `git archive`
25+
architecture-baseline.json export-ignore
26+
dependency.json export-ignore
27+
phpstan.json export-ignore
28+
phpstan.neon export-ignore
29+
psalm-report.json export-ignore linguist-generated=true
30+
tooling.yml export-ignore
31+
.coveralls.yml export-ignore
32+
.travis.yml export-ignore
33+
.editorconfig export-ignore
34+
.gitattributes export-ignore
35+
.gitignore export-ignore

.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# IDE
2+
.idea/*
3+
.project/
4+
nbproject/
5+
.buildpath/
6+
.settings/
7+
*.sublime-*
8+
9+
# OS
10+
.DS_Store
11+
*.AppleDouble
12+
*.AppleDB
13+
*.AppleDesktop
14+
15+
# tooling
16+
vendor/
17+
composer.lock
18+
19+
# built resources
20+
src/Generated
21+
src/Orm
22+
tests/_data/app_webhook_db
23+
24+
# tests
25+
tests/**/_generated/
26+
tests/_output/*
27+
!tests/_output/.gitkeep

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# AppWebhook Changelog
2+
3+
[Release Changelog](https://github.com/spryker/app-webhook/releases)

CONTRIBUTING.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
CODE CONTRIBUTION LICENSE AGREEMENT
2+
3+
BY DISPLAYING, PUBLISHING, UPLOADING OR PROMOTING (COLLECTIVELY, “POSTING”) SOURCE CODE (“SOURCE CODE”)
4+
TO SPRYKER SYSTEMS GMBH, REGISTERED WITH THE COMMERCIAL REGISTER OF THE LOWER COURT OF HAMBURG UNDER
5+
HRB 134310 (“WE”, “US” OR ”SPRYKER”), YOU AGREE TO THIS CODE CONTRIBUTION LICENSE AGREEMENT (THE “AGREEMENT”).
6+
7+
You grant us and our affiliates an irrevocable, perpetual, worldwide, royalty-free, non-exclusive, unrestricted
8+
license and right to use, reproduce and store, disseminate and otherwise exploit, modify, delete from, add to,
9+
create derivative works of, publicly perform, publicly display, reproduce, exchange parts of Source Code or combine them with
10+
other Source Code, use in data networks and distribute with or without consideration and without limitations as to the
11+
number of items via all distribution channels (and to sublicense the foregoing rights through multiple tiers of licensees)
12+
of such Source Code and any other copyright protected material for any reason and in connection with advertising and
13+
promoting our software and/or our products in any media formats and through any channels now existing or developed in
14+
the future. The transfer and assignment of rights covers any usage and exploitation rights for any unknown types of use
15+
as well as with regard to any known types of use the right to unrestrictedly make publicly available and publish,
16+
irrespective of the medium including any editions and versions and grant simple or exclusive usage, exploitation or
17+
adaptation rights to third parties.
18+
19+
Spryker may reject, refuse to post or delete any Source Code for any or no reason, including, without limitation.
20+
21+
From time to time, we may remove the Source Code permanently or temporarily, provided that even if we do remove such
22+
Source Code, we shall have no obligation to cease our other uses of the Source Code as permitted above.
23+
24+
You agree to be fully responsible for and to pay any and all royalties, fees, and any other monies owing any person or
25+
entity by reason of any Source Code posted by you.
26+
27+
Spryker respects the intellectual property of others, and requires that you do the same. Your postings and the Source Code
28+
must not infringe any copyright, patent, trademark, trade secret or other proprietary rights or other rights of any person
29+
or entity and you may not upload, embed, post, email, transmit or otherwise make available Source Code, software or any other
30+
material that that infringes such rights.
31+
32+
YOU GUARANTEE THAT: (I) YOU OWN THE SOURCE CODE POSTED BY YOU OR OTHERWISE HAVE THE RIGHT TO GRANT THE LICENSES AND RIGHTS
33+
SET FORTH ABOVE, AND (II) THE POSTING OF YOUR SOURCE CODE DOES NOT VIOLATE THE PRIVACY RIGHTS, PUBLICITY RIGHTS, CONTRACT RIGHTS,
34+
INTELLECTUAL PROPERTY OR ANY OTHER RIGHTS OF ANY PERSON OR ENTITY OR ANY APPLICABLE LAW.
35+
36+
YOU AGREE TO INDEMNIFY AND HOLD SPRYKER, ITS SUBSIDIARIES, AND AFFILIATES, AND THEIR RESPECTIVE OFFICERS, AGENTS, PARTNERS
37+
AND EMPLOYEES, HARMLESS FROM ANY LOSS, LIABILITY, COST, EXPENSE, CLAIM OR DEMAND, INCLUDING WITHOUT LIMITATION, REASONABLE
38+
ATTORNEYS’ FEES, DUE OR RELATING TO OR ARISING OUT OF THE USE OF YOUR SOURCE CODE IN VIOLATION OF THIS AGREEMENT AND/OR
39+
ARISING FROM A BREACH OF ANY TERMS OF THIS AGREEMENT AND/OR ANY BREACH OF YOUR REPRESENTATIONS AND WARRANTIES SET FORTH IN
40+
THIS AGREEMENT AND/OR ARISING OUT OF OR RELATING TO ANY SOURCE CODE THAT YOU POST.
41+
42+
This Agreement shall be governed by the laws of Germany to the exclusion of IPR (International Law) and the United Nations Convention
43+
on Contracts for the International Sale of Goods (CISG). The parties consent to the jurisdiction of the courts in Berlin (Germany).
44+
45+
This Agreement constitutes the entire agreement between you and us concerning Spryker’s use of the Source Code. This Agreement
46+
supersedes any prior verbal understanding between the parties. This Agreement may be amended only in a writing signed by an authorized officer of Spryker.

LICENSE

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
SPRYKER SYSTEMS GMBH EVALUATION LICENSE AGREEMENT
2+
3+
SPRYKER SYSTEMS GMBH, REGISTERED WITH THE COMMERCIAL REGISTER OF THE LOWER COURT OF HAMBURG UNDER HRB 134310
4+
(“WE” OR ”SPRYKER”)GRANTS YOU (THE “LICENSEE”) THE RIGHT TO USE THE SOFTWARE (AS DEFINED BELOW)
5+
UNDER THE PROVISIONS OF THIS EVALUATION LICENSE AGREEMENT (THE “AGREEMENT”).
6+
7+
The “Software” includes any software owned and distributed by Spryker under this Agreement. The Software
8+
contains elements of open source components, to which different license terms apply respectively.
9+
These open source components are needed to be installed separately.
10+
11+
Spryker grants to Licensee, during the 45-calendar-day period (the “Evaluation Period”) following the download of the Software,
12+
the nontransferable, nonexclusive limited, free of charge license to permit Licensee’s employees to internally use the Software
13+
to test and evaluate the Software in connection with potentially purchasing non-evaluation licenses to the Software.
14+
15+
Licensee shall not (i) use the Software to set up a productive live system, for development purposes or any other purposes apart
16+
from evaluating the Software; (ii) copy any part of the Software except to make one copy for back-up purposes; (iii) distribute,
17+
disclose, market, rent, lease, or transfer the Software or act as a service bureau with respect to the Software; (iv) export the
18+
Software or install it in multiple locations; (v) disclose any confidential information provided by Spryker; (vi) modify or make
19+
derivative works of the Software; or (vii) allow others to make or obtain copies of the Software.
20+
21+
THE SOFTWARE IS PROVIDED “AS-IS” AND WITHOUT WARRANTY OF ANY KIND. SPRYKER DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING
22+
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, TITLE, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. SPRYKER WILL NOT
23+
BE LIABLE FOR ANY DAMAGES ASSOCIATED WITH THE SOFTWARE, INCLUDING WITHOUT LIMITATION ORDINARY, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL
24+
DAMAGES OF ANY KIND, INCLUDING BUT NOT LIMITED TO DAMAGES RELATING TO LOST DATA OR LOST PROFITS, EVEN IF SPRYKER HAS BEEN ADVISED OF
25+
THE POSSIBILITY OF SUCH DAMAGES.
26+
27+
Licensee's license to use the Software shall terminate on the earlier of (i) the expiration of the Evaluation Period, or (ii) the date
28+
both parties enter into a definitive agreement for the provision by Spryker to Licensee of a non-evaluation license to the Software.
29+
Upon termination of the license as provided above, Licensee shall promptly destroy the Software and any back-up copy of the Software
30+
made during the Evaluation Period if Spryker and the Licensee have not agreed a non-evaluation license to the Software.
31+
32+
This Agreement shall be governed by the laws of Germany to the exclusion of IPR (International Law) and the United Nations Convention
33+
on Contracts for the International Sale of Goods (CISG). The parties consent to the jurisdiction of the courts in Berlin (Germany).
34+
35+
This Agreement is not assignable or transferable by Licensee and any attempt to do so is null and void.
36+
37+
This Agreement constitutes the entire agreement between the parties concerning Licensee’s use of the Software. This Agreement supersedes
38+
any prior verbal understanding between the parties and any Licensee purchase order or other ordering document, regardless of whether such
39+
document is received by Spryker before or after execution of this Agreement. This Agreement may be amended only in a writing signed by
40+
an authorized officer of Spryker.

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# AppWebhook Module
2+
[![Latest Stable Version](https://poser.pugx.org/spryker/app-webhook/v/stable.svg)](https://packagist.org/packages/spryker/app-webhook)
3+
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%208.1-8892BF.svg)](https://php.net/)
4+
5+
Provides SyncAPI and AsyncAPI schema files and the needed code to make the Mini-Framework an App.
6+
7+
## Installation
8+
9+
```
10+
composer require spryker/app-webhook
11+
```
12+
13+
### Configure
14+
15+
#### App Identifier
16+
17+
config/Shared/config_default.php
18+
19+
```
20+
use Spryker\Shared\AppWebhook\AppConstants;
21+
22+
$config[AppConstants::APP_IDENTIFIER] = getenv('APP_IDENTIFIER') ?: 'hello-world';
23+
```
24+
25+
### Testing the AppWebhook
26+
27+
You can test the AppWebhook as usual with Codeception. Before that you need to run some commands:
28+
29+
```
30+
composer setup
31+
```
32+
33+
With these commands you've set up the AppWebhook and can start the tests
34+
35+
```
36+
vendor/bin/codecept build
37+
vendor/bin/codecept run
38+
```

codeception.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
namespace: SprykerTest
2+
3+
include:
4+
- tests/SprykerTest/Glue/AppWebhookBackendApi/
5+
6+
bootstrap: _data/Environment.php
7+
8+
paths:
9+
tests: tests
10+
support: .
11+
output: tests/_output
12+
data: tests/_data
13+
envs: tests/_envs
14+
15+
settings:
16+
suite_class: \PHPUnit\Framework\TestSuite
17+
colors: true
18+
memory_limit: 1024M
19+
log: true

composer.json

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
{
2+
"name": "spryker/app-webhook",
3+
"type": "library",
4+
"description": "AppWebhook module",
5+
"license": "proprietary",
6+
"require": {
7+
"php": ">=8.1",
8+
"spryker/glue-application-extension": "^1.0.0",
9+
"spryker/kernel": "^3.30.0",
10+
"spryker/log": "^3.0.0",
11+
"spryker/message-broker": "^1.11.0",
12+
"spryker/propel-encryption-behavior": "^0.1.1",
13+
"spryker/secrets-manager": "^1.0.0",
14+
"spryker/secrets-manager-extension": "^1.0.0",
15+
"spryker/symfony": "^3.0.0",
16+
"spryker/transfer": "^3.33.0",
17+
"spryker/util-encoding": "^2.0.0",
18+
"spryker/util-text": "^1.0.0"
19+
},
20+
"require-dev": {
21+
"codeception/codeception": "^5.0",
22+
"codeception/module-asserts": "^3.0",
23+
"codeception/module-cli": "^2.0.0",
24+
"codeception/module-filesystem": "^3.0.0",
25+
"codeception/module-phpbrowser": "^3.0.0",
26+
"codeception/module-rest": "^3.0.0",
27+
"codeception/module-webdriver": "^3.0.0",
28+
"infection/infection": "^0.27.8",
29+
"infection/codeception-adapter": "^0.4.3",
30+
"phpstan/phpdoc-parser": "1.25.0",
31+
"phpstan/phpstan": "1.10.66",
32+
"rector/rector": "^0.19.0",
33+
"spryker/app-kernel": "dev-feature/extract-payment-template",
34+
"spryker/code-sniffer": "*",
35+
"spryker/container": "*",
36+
"spryker/development": "^3.34.0",
37+
"spryker/glue-application": "^1.64",
38+
"spryker/message-broker-aws": "^1.7.0",
39+
"spryker/propel": "*",
40+
"spryker/testify": "*",
41+
"spryker/testify-async-api": "^0.1.4"
42+
},
43+
"autoload": {
44+
"psr-4": {
45+
"Spryker\\": "src/Spryker/",
46+
"SprykerTest\\Glue\\AppWebhookBackendApi\\Helper\\": "tests/SprykerTest/Glue/AppWebhookBackendApi/_support/Helper/",
47+
"SprykerTest\\Shared\\AppWebhook\\Helper\\": "tests/SprykerTest/Shared/AppWebhook/_support/Helper/"
48+
}
49+
},
50+
"autoload-dev": {
51+
"psr-4": {
52+
"SprykerTest\\": "tests/SprykerTest/",
53+
"Generated\\": "src/Generated/",
54+
"Orm\\": "src/Orm/"
55+
}
56+
},
57+
"minimum-stability": "dev",
58+
"prefer-stable": true,
59+
"scripts": {
60+
"cs-check": "phpcs -p src/ tests/",
61+
"cs-fix": "phpcbf -p src/ tests/",
62+
"setup": "tests/bin/console app-webhook:setup && tests/bin/console transfer:generate && tests/bin/console transfer:databuilder:generate && tests/bin/console dev:ide-auto-completion:zed:generate && tests/bin/console dev:ide-auto-completion:glue:generate",
63+
"stan": "phpstan analyze src/Spryker/",
64+
"test": "codecept build && codecept run",
65+
"test-strict": "vendor/bin/infection --threads=max --min-msi=100 --min-covered-msi=100",
66+
"test-strict-ci": "vendor/bin/infection --threads=max --logger-github=true --min-msi=100 --min-covered-msi=100",
67+
"test-cover": "codecept build && codecept run --coverage-xml",
68+
"rector": "vendor/bin/rector process src/Spryker/ --config rector.php --ansi",
69+
"rector-ci": "vendor/bin/rector process src/Spryker/ --config rector.php --ansi --dry-run",
70+
"local-ci": "composer cs-fix && composer cs-check && composer stan && composer rector-ci && composer test"
71+
},
72+
"extra": {
73+
"branch-alias": {
74+
"dev-master": "1.0.x-dev"
75+
}
76+
},
77+
"config": {
78+
"use-include-path": true,
79+
"process-timeout": 1800,
80+
"sort-packages": true,
81+
"allow-plugins": {
82+
"dealerdirect/phpcodesniffer-composer-installer": true,
83+
"infection/extension-installer": true
84+
}
85+
}
86+
}

config/Shared/config_default.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
/**
4+
* This configuration is used for TESTING only and will never be used in production!
5+
*/

0 commit comments

Comments
 (0)