Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laravel 11 #6

Merged
merged 18 commits into from
Nov 13, 2024
52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Bug Report
description: Report an Issue or Bug with the Package
title: "[Bug]: "
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
We're sorry to hear you have a problem. Can you help us solve it by providing the following details.
- type: textarea
id: what-happened
attributes:
label: What happened?
description: What did you expect to happen?
placeholder: I cannot currently do X thing because when I do, it breaks X thing.
validations:
required: true

- type: input
id: package-version
attributes:
label: Package Version
description: What version of our Package are you running? Please be as specific as possible
placeholder: 2.0.0
validations:
required: true
- type: input
id: php-version
attributes:
label: PHP Version
description: What version of PHP are you running? Please be as specific as possible
placeholder: 8.2.0
validations:
required: true
- type: input
id: laravel-version
attributes:
label: Laravel Version
description: What version of Laravel are you running? Please be as specific as possible
placeholder: 9.0.0
validations:
required: true
- type: dropdown
id: operating-systems
attributes:
label: Which operating systems does with happen with?
description: You may select more than one.
multiple: true
options:
- macOS
- Windows
- Linux
51 changes: 51 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Bug Report
description: Report an Issue or Bug with the Package
title: "[Bug]: "
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
We're sorry to hear you have a problem. Can you help us solve it by providing the following details.
- type: textarea
id: what-happened
attributes:
label: What happened?
description: What did you expect to happen?
placeholder: I cannot currently do X thing because when I do, it breaks X thing.
validations:
required: true
- type: input
id: package-version
attributes:
label: Package Version
description: What version of our Package are you running? Please be as specific as possible
placeholder: 1.0.0
validations:
required: true
- type: input
id: php-version
attributes:
label: PHP Version
description: What version of PHP are you running? Please be as specific as possible
placeholder: 8.3.0
validations:
required: true
- type: input
id: laravel-version
attributes:
label: Laravel Version
description: What version of Laravel are you running? Please be as specific as possible
placeholder: 11.0.0
validations:
required: true
- type: dropdown
id: operating-systems
attributes:
label: Which operating systems does with happen with?
description: You may select more than one.
multiple: true
options:
- macOS
- Windows
- Linux
11 changes: 0 additions & 11 deletions .github/ISSUE_TEMPLATE/config.yml

This file was deleted.

12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Question or Feature
description: Open a Question or Feature Request
title: "[Feature]: "
labels: ["feature"]
body:
- type: textarea
id: question-feature
attributes:
label: Question or Feature?
description: Enter a Question or Feature Request
validations:
required: true
10 changes: 6 additions & 4 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

name: dependabot-auto-merge
on: pull_request_target

Expand All @@ -10,20 +11,21 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:

- name: Dependabot metadata
id: metadata
uses: dependabot/[email protected]

uses: dependabot/[email protected]
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Auto-merge Dependabot PRs for semver-minor updates
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Auto-merge Dependabot PRs for semver-patch updates
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
run: gh pr merge --auto --merge "$PR_URL"
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
name: 'Dependency Review'
on: [pull_request]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
- name: 'Dependency Review'
uses: actions/dependency-review-action@v3
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
name: Check & fix styling
name: Fix PHP code style issues

on:
push:
branches:
- styling
on: [push]

jobs:
php-cs-fixer:
php-code-styling:
runs-on: ubuntu-latest

steps:
Expand All @@ -15,10 +12,8 @@ jobs:
with:
ref: ${{ github.head_ref }}

- name: Run PHP CS Fixer
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --config=.php-cs-fixer.dist.php --allow-risky=yes
- name: Fix PHP code style issues
uses: aglipanci/[email protected]

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: PHPStan

on:
push:
paths:
- '**.php'
- 'phpstan.neon.dist'
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
phpstan:
Expand All @@ -16,11 +16,11 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
coverage: none

- name: Install composer dependencies
uses: ramsey/composer-install@v1
uses: ramsey/composer-install@v2

- name: Run PHPStan
run: ./vendor/bin/phpstan --error-format=github
run: ./vendor/bin/phpstan analyse src --error-format=github
11 changes: 4 additions & 7 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,10 @@ jobs:
matrix:
# os: [ ubuntu-latest, windows-latest ]
os: [ ubuntu-latest ]
php: [ 8.1 ]
laravel: [ 9.* ]
php: [ 8.2, 8.3 ]
laravel: [ 11.* ]
#stability: [ prefer-lowest, prefer-stable ]
stability: [ prefer-stable ]
include:
- laravel: 9.*
testbench: 7.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

Expand All @@ -42,7 +39,7 @@ jobs:

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction

- name: Execute tests
Expand All @@ -58,4 +55,4 @@ jobs:
name: Store report
retention-days: 1
path: |
./reports
./reports
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.php_cs.cache
.php-cs-fixer.cache
.phpunit.result.cache
.phpunit.cache
.DS_STORE
build
composer.lock
Expand Down
5 changes: 5 additions & 0 deletions .phpunit.cache/test-results
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<<<<<<< HEAD
{"version":"pest_2.34.0","defects":{"P\\Tests\\Feature\\GetInvoicePayerTest::__pest_evaluable_it_b2b_service_getInvoicePayer_test":7},"times":{"P\\Tests\\Feature\\GetInvoicePayerTest::__pest_evaluable_it_b2b_service_getInvoicePayer_test":0.542,"P\\Tests\\Feature\\GetInvoiceListPayerTest::__pest_evaluable_it_b2b_service_getInvoiceListPayer_test":0.405,"P\\Tests\\Feature\\PingTest::__pest_evaluable_it_b2b_service_executePing_test":0.408}}
=======
{"version":"pest_2.34.4","defects":{"P\\Tests\\Feature\\GetInvoicePayerTest::__pest_evaluable_it_b2b_service_getInvoicePayer_test":7},"times":{"P\\Tests\\Feature\\PingTest::__pest_evaluable_it_b2b_service_executePing_test":0.575,"P\\Tests\\Feature\\GetInvoicePayerTest::__pest_evaluable_it_b2b_service_getInvoicePayer_test":0.462,"P\\Tests\\Feature\\GetInvoiceListPayerTest::__pest_evaluable_it_b2b_service_getInvoiceListPayer_test":0.463}}
>>>>>>> 6d29bea28ed7d27993a1e62aa85c64de050b54c2
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,16 @@ cp phpunit.xml.dist phpunit.xml
Modify environment variables in the phpunit.xml-file:

```xml


<env name="POSTFINANCE_B2B_WSDL" value="wds"/>
<env name="POSTFINANCE_B2B_CACHE_WSDL" value="wsdl"/>
<env name="POSTFINANCE_B2B_USERNAME" value="username"/>
<env name="POSTFINANCE_B2B_PASSWORD" value="password"/>
<env name="POSTFINANCE_B2B_DEBUG" value="debug"/>

<env name="POSTFINANCE_B2B_TESTS_PAYER_ID" value=""/>
<env name="POSTFINANCE_B2B_TESTS_BILLER_ID" value=""/>
<env name="POSTFINANCE_B2B_TESTS_TRANSACTION_ID" value=""/>
<env name="POSTFINANCE_B2B_TESTS_FILE_TYPE" value="RGXMLSIG"/>
```

Run the tests:
Expand Down
Loading