Skip to content

Commit

Permalink
feat: Allow enabling payment callbacks when creating an order
Browse files Browse the repository at this point in the history
  • Loading branch information
LittlestFluffy authored Jun 3, 2022
2 parents ce4979e + db99ac2 commit 262f559
Show file tree
Hide file tree
Showing 14 changed files with 676 additions and 156 deletions.
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/.gitattributes export-ignore
/.github export-ignore
/.gitignore export-ignore
/CONTRIBUTING.md export-ignore
/phpcs.xml.dist export-ignore
/phpunit.xml.dist export-ignore
/psalm.xml.dist export-ignore
/README.md export-ignore
/tests export-ignore
39 changes: 0 additions & 39 deletions .github/workflows/run-tests.yml

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Test

on: push

jobs:
setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: 8.1
coverage: none
- uses: ramsey/composer-install@v2
- id: set-php-versions
run: echo "::set-output name=php-versions::$(vendor/bin/devtools list:php-versions)"
- id: set-tools
run: echo "::set-output name=tools::$(vendor/bin/devtools list:enabled-tools)"
outputs:
php-versions: ${{ steps.set-php-versions.outputs.php-versions }}
tools: ${{ steps.set-tools.outputs.tools }}

test:
needs: setup
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ${{ fromJson(needs.setup.outputs.php-versions) }}
tool: ${{ fromJson(needs.setup.outputs.tools) }}
fail-fast: false
name: ${{ matrix.php-version }} - ${{ matrix.tool }}
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: cs2pr
- uses: ramsey/composer-install@v2
- run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
- run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- run: vendor/bin/devtools ${{ matrix.tool }} --format=github
22 changes: 9 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,19 @@
"psr-4": { "Omnipay\\Mollie\\Test\\": "tests/" }
},
"require": {
"php": "^7.2|^8.0",
"php": "^8.1",
"omnipay/common": "^3.1"
},
"require-dev": {
"omnipay/tests": "^4.1",
"vimeo/psalm": "^4.10",
"myonlinestore/coding-standard": "^3.1"
"vimeo/psalm": "^4.23",
"myonlinestore/coding-standard": "^3.1",
"myonlinestore/php-devtools": "^0.3.2"
},
"extra": {
"branch-alias": {
"dev-master": "5.4.x-dev"
"prefer-stable": true,
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"scripts": {
"test": "phpunit",
"check-style": "phpcs -p --standard=PSR2 src/",
"fix-style": "phpcbf -p --standard=PSR2 src/"
},
"prefer-stable": true
}
}
13 changes: 12 additions & 1 deletion phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,16 @@
<file>src</file>
<file>tests</file>

<rule ref="MyOnlineStore"/>
<rule ref="MyOnlineStore">
<exclude name="Generic.Files.LineLength"/>
<exclude name="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming"/>
<exclude name="SlevomatCodingStandard.Classes.SuperfluousTraitNaming"/>
<exclude name="SlevomatCodingStandard.Operators.DisallowEqualOperators"/>
<exclude name="SlevomatCodingStandard.TypeHints.DeclareStrictTypes"/>
<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint"/>
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint"/>
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint"/>
<exclude name="Squiz.Commenting.FunctionComment"/>
<exclude name="Squiz.Strings.DoubleQuoteUsage"/>
</rule>
</ruleset>
25 changes: 9 additions & 16 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
<phpunit bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
>
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">src</directory>
</include>
</coverage>

<testsuites>
<testsuite name="Omnipay Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>

<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
</whitelist>
</filter>
</phpunit>
Loading

0 comments on commit 262f559

Please sign in to comment.