generated from spatie/package-skeleton-laravel
-
-
Notifications
You must be signed in to change notification settings - Fork 78
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 #131 from imdhemy/chore/update-ci-workflows
- Loading branch information
Showing
12 changed files
with
185 additions
and
170 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: | ||
- '*' | ||
- '*/*' | ||
- '**' | ||
pull_request: | ||
branches: | ||
- '*' | ||
- '*/*' | ||
- '**' | ||
jobs: | ||
# PSR-12 Coding standards | ||
psr-12: | ||
name: PSR-12 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Check PSR-12 | ||
uses: docker://oskarstark/php-cs-fixer-ga | ||
with: | ||
args: --config=.php-cs-fixer.dist.php --dry-run | ||
|
||
# Static code analysis | ||
static_code_analysis: | ||
name: Psalm - Static code analysis | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: PHP setup | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '7.4' | ||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick | ||
coverage: none | ||
|
||
- name: Cache composer dependencies | ||
uses: actions/cache@v1 | ||
with: | ||
path: vendor | ||
key: composer-${{ hashFiles('composer.lock') }} | ||
|
||
- name: Install dependencies | ||
run: composer install -n --prefer-dist | ||
|
||
- name: Psalm | ||
run: composer psalm | ||
|
||
# Tests | ||
tests: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: [ ubuntu-latest, windows-latest, macos-latest ] | ||
php: [ 7.4, 8.0, 8.1 ] | ||
name: Tests - ${{ matrix.os }} - ${{ matrix.php }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: PHP setup | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '7.4' | ||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, | ||
iconv, imagick,fileinfo | ||
coverage: none | ||
|
||
- name: Install dependencies | ||
run: composer install | ||
|
||
- name: Security advice | ||
run: composer security-advice | ||
|
||
- name: Execute PHPUnit tests | ||
run: composer test |
This file was deleted.
Oops, something went wrong.
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
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,74 +1,85 @@ | ||
<?php | ||
|
||
use Imdhemy\Purchases\Events\AppStore\Cancel; | ||
use Imdhemy\Purchases\Events\AppStore\DidChangeRenewalPref; | ||
use Imdhemy\Purchases\Events\AppStore\DidChangeRenewalStatus; | ||
use Imdhemy\Purchases\Events\AppStore\DidFailToRenew; | ||
use Imdhemy\Purchases\Events\AppStore\DidRecover; | ||
use Imdhemy\Purchases\Events\AppStore\DidRenew; | ||
use Imdhemy\Purchases\Events\AppStore\InitialBuy; | ||
use Imdhemy\Purchases\Events\AppStore\InteractiveRenewal; | ||
use Imdhemy\Purchases\Events\AppStore\PriceIncreaseConsent; | ||
use Imdhemy\Purchases\Events\AppStore\Refund; | ||
use Imdhemy\Purchases\Events\AppStore\Revoke; | ||
use Imdhemy\Purchases\Events\GooglePlay\SubscriptionCanceled; | ||
use Imdhemy\Purchases\Events\GooglePlay\SubscriptionDeferred; | ||
use Imdhemy\Purchases\Events\GooglePlay\SubscriptionExpired; | ||
use Imdhemy\Purchases\Events\GooglePlay\SubscriptionInGracePeriod; | ||
use Imdhemy\Purchases\Events\GooglePlay\SubscriptionOnHold; | ||
use Imdhemy\Purchases\Events\GooglePlay\SubscriptionPaused; | ||
use Imdhemy\Purchases\Events\GooglePlay\SubscriptionPauseScheduleChanged; | ||
use Imdhemy\Purchases\Events\GooglePlay\SubscriptionPriceChangeConfirmed; | ||
use Imdhemy\Purchases\Events\GooglePlay\SubscriptionPurchased; | ||
use Imdhemy\Purchases\Events\GooglePlay\SubscriptionRecovered; | ||
use Imdhemy\Purchases\Events\GooglePlay\SubscriptionRenewed; | ||
use Imdhemy\Purchases\Events\GooglePlay\SubscriptionRestarted; | ||
use Imdhemy\Purchases\Events\GooglePlay\SubscriptionRevoked; | ||
|
||
return [ | ||
'routing' => [ | ||
'signed' => false, | ||
], | ||
/* | ||
|-------------------------------------------------------------------------- | ||
| Routing configuration | ||
|-------------------------------------------------------------------------- | ||
| | ||
| This configuration is used to determine the routing behavior of the | ||
| Server notifications handler endpoint. | ||
| | ||
| You can find more information on documentation. | ||
| @see https://imdhemy.com/laravel-iap-docs/docs/get-started/routing | ||
*/ | ||
|
||
'routing' => [ | ||
'signed' => false, | ||
'middleware' => [], | ||
'prefix' => '', | ||
], | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Google Play Default Package name | ||
|-------------------------------------------------------------------------- | ||
| | ||
| This value is the default package name used when the package name is not | ||
| provided while verifying the receipts. | ||
| | ||
*/ | ||
'google_play_package_name' => env('GOOGLE_PLAY_PACKAGE_NAME', 'com.some.thing'), | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| App Store Password | ||
|-------------------------------------------------------------------------- | ||
| | ||
| This value is the app-specific share password generated by the app store. | ||
| @see https://imdhemy.com/laravel-iap-docs/docs/credentials/app-store | ||
| | ||
*/ | ||
'appstore_password' => env('APPSTORE_PASSWORD', ''), | ||
|
||
'google_play_package_name' => env('GOOGLE_PLAY_PACKAGE_NAME', 'com.some.thing'), | ||
/* | ||
|-------------------------------------------------------------------------- | ||
| Event Listeners | ||
|-------------------------------------------------------------------------- | ||
| | ||
| This configuration is used to determine the event listeners that will be | ||
| registered with the application. | ||
| You can find a list of all available events of the documentation | ||
| | ||
| @see https://imdhemy.com/laravel-iap-docs/docs/server-notifications/event-list | ||
| @see https://imdhemy.com/laravel-iap-docs/docs/get-started/event-listeners | ||
| | ||
*/ | ||
'eventListeners' => [ | ||
/* | ||
|-------------------------------------------------------------------------- | ||
| App Store Events | ||
|-------------------------------------------------------------------------- | ||
| | ||
| These event listeners are triggered when a new notification is received from App Store. | ||
| @see https://imdhemy.com/laravel-iap-docs/docs/server-notifications/event-list#app-store-events | ||
| | ||
*/ | ||
|
||
'appstore_password' => env('APPSTORE_PASSWORD', ''), | ||
/* \Imdhemy\Purchases\Events\AppStore\Cancel::class => [ | ||
\App\Listeners\AppStore\Cancel::class, | ||
],*/ | ||
|
||
'eventListeners' => [ | ||
/** | ||
* -------------------------------------------------------- | ||
* Google Play Events | ||
* -------------------------------------------------------- | ||
*/ | ||
SubscriptionPurchased::class => [], | ||
SubscriptionRenewed::class => [], | ||
SubscriptionInGracePeriod::class => [], | ||
SubscriptionExpired::class => [], | ||
SubscriptionCanceled::class => [], | ||
SubscriptionPaused::class => [], | ||
SubscriptionRestarted::class => [], | ||
SubscriptionDeferred::class => [], | ||
SubscriptionRevoked::class => [], | ||
SubscriptionOnHold::class => [], | ||
SubscriptionRecovered::class => [], | ||
SubscriptionPauseScheduleChanged::class => [], | ||
SubscriptionPriceChangeConfirmed::class => [], | ||
/* | ||
|-------------------------------------------------------------------------- | ||
| Google Play Events | ||
|-------------------------------------------------------------------------- | ||
| | ||
| These event listeners are triggered when a new notification is received from Google Play | ||
| @see @see https://imdhemy.com/laravel-iap-docs/docs/server-notifications/event-list#google-play-events | ||
*/ | ||
|
||
/** | ||
* -------------------------------------------------------- | ||
* App Store Events | ||
* -------------------------------------------------------- | ||
*/ | ||
Cancel::class => [], | ||
DidChangeRenewalPref::class => [], | ||
DidChangeRenewalStatus::class => [], | ||
DidFailToRenew::class => [], | ||
DidRecover::class => [], | ||
DidRenew::class => [], | ||
InitialBuy::class => [], | ||
InteractiveRenewal::class => [], | ||
PriceIncreaseConsent::class => [], | ||
Refund::class => [], | ||
Revoke::class => [], | ||
], | ||
/* \Imdhemy\Purchases\Events\GooglePlay\SubscriptionRecovered::class => [ | ||
\App\Listeners\GooglePlay\SubscriptionRecovered::class, | ||
],*/ | ||
], | ||
]; |
Oops, something went wrong.