Skip to content

feat!: Add larastan, update Request Response, move to only laravel 9 compatibility #195

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

Merged
merged 25 commits into from
Feb 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
125577d
feat(laravel-soap-179)!: Add PHP 8.1 Support & Laravel 9
Feb 9, 2022
9f884a6
refactor(laravel-soap-179): Apply review discussion
Feb 9, 2022
8485d13
refactor(laravel-soap-179): Update last not working middlewares
Feb 9, 2022
f9442c4
Apply fixes from StyleCI (#191)
CodeDredd Feb 10, 2022
94e7f49
Merge remote-tracking branch 'origin/feature/laravel-soap-179' into f…
Feb 9, 2022
35cc157
Apply fixes from StyleCI (#192)
CodeDredd Feb 10, 2022
4b1426c
Merge remote-tracking branch 'origin/feature/laravel-soap-179' into f…
Feb 9, 2022
8946cd6
fix(laravel-soap-179): Response body not working with soap fault error
Feb 11, 2022
ed01b71
fix: update unit test workflow
Feb 11, 2022
2696d74
fix: update test workflow & cleanUp unit test
Feb 11, 2022
e8cddb7
fix!: response & request
Feb 12, 2022
b0e3b40
feat: Add larastan & PHP CS Fixer workflow
Feb 12, 2022
549340c
Merge remote-tracking branch 'origin/master' into feature/laravel-soa…
Feb 12, 2022
f476c1d
chore: fix workflow
Feb 12, 2022
6334c6f
chore: PhpStan Lvl 3
Feb 12, 2022
06972a8
chore: add phpstan workflow
Feb 12, 2022
487aa15
chore: update test workflow
Feb 12, 2022
01836cb
chore: update composer version workflows
Feb 12, 2022
14a1543
chore: use evaluate to find soapfault string
Feb 12, 2022
1aa6f5b
Fix styling
CodeDredd Feb 12, 2022
0c74d4c
Merge remote-tracking branch 'origin/feature/laravel-soap-179' into f…
Feb 12, 2022
425f74c
Fix styling
CodeDredd Feb 12, 2022
82da23d
Apply fixes from StyleCI (#196)
CodeDredd Feb 12, 2022
db8ec96
Merge remote-tracking branch 'origin/feature/laravel-soap-179' into f…
Feb 12, 2022
c316231
Fix styling
CodeDredd Feb 12, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/php-cs-fixer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Check & fix styling

on: [push]

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

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}

- name: Run PHP CS Fixer
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --config=.php_cs.dist.php --allow-risky=yes

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Fix styling
26 changes: 26 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: PHPStan

on:
push:
paths:
- '**.php'
- 'phpstan.neon'

jobs:
phpstan:
name: phpstan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
coverage: none

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

- name: Run PHPStan
run: ./vendor/bin/phpstan --error-format=github
89 changes: 72 additions & 17 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,81 @@
name: test
name: Unit Tests

on: push
on:
pull_request: null

env:
# see https://github.com/composer/composer/issues/9368#issuecomment-718112361
COMPOSER_ROOT_VERSION: "dev-master"

jobs:
phpunit:
provide_php_versions_json:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
# git clone + use PHP + composer install
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: 8.0
tools: composer:v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
extensions: mbstring, intl
ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug
tools: php-cs-fixer, phpunit
- run: composer install --no-progress --ansi

-
# to see the output
run: vendor/bin/easy-ci php-versions-json

# here we create the json, we need the "id:" so we can use it in "outputs" bellow

-
id: output_data
run: echo "::set-output name=matrix::$(vendor/bin/easy-ci php-versions-json)"

# here, we save the result of this 1st phase to the "outputs"
outputs:
matrix: ${{ steps.output_data.outputs.matrix }}

unit_tests:
needs: provide_php_versions_json

runs-on: ubuntu-latest

- name: Composer dependencies
run: composer install --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
strategy:
fail-fast: false
matrix:
php: ${{ fromJson(needs.provide_php_versions_json.outputs.matrix) }}

name: PHP ${{ matrix.php }} tests

steps:
- uses: actions/checkout@v2
# required for "git tag" presence for changelog-linker git tags resolver; default is 1
# https://github.com/actions/checkout#fetch-all-tags
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*

# see https://github.com/shivammathur/setup-php
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, intl
ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug
tools: php-cs-fixer, phpunit, composer:v2

# composer install cache - https://github.com/ramsey/composer-install
-
if: "matrix.php == 7.3"
run: composer update --no-progress --ansi --prefer-lowest

-
if: "matrix.php == 7.4"
uses: "ramsey/composer-install@v2"

-
if: "matrix.php >= 8"
uses: "ramsey/composer-install@v2"
with:
composer-options: "--ignore-platform-req php"

- name: Run Testsuite
run: vendor/bin/phpunit tests/
-
run: vendor/bin/phpunit
26 changes: 0 additions & 26 deletions .github/workflows/tests81.yml

This file was deleted.

15 changes: 12 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
.idea
vendor
.env.test
.php_cs
.php_cs.cache
.phpunit.result.cache
/phpunit.xml.bak
build
composer.lock
coverage
docs
phpunit.xml
phpstan.neon
testbench.yaml
vendor
node_modules
.php-cs-fixer.cache
40 changes: 40 additions & 0 deletions .php_cs.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php

$finder = Symfony\Component\Finder\Finder::create()
->in([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->name('*.php')
->notName('*.blade.php')
->ignoreDotFiles(true)
->ignoreVCS(true);

return (new PhpCsFixer\Config())
->setRules([
'@PSR12' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'no_unused_imports' => true,
'not_operator_with_successor_space' => true,
'trailing_comma_in_multiline' => 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' => 'one',
],
],
'method_argument_space' => [
'on_multiline' => 'ensure_fully_multiline',
'keep_multiple_spaces_after_comma' => true,
],
'single_trait_insert_per_statement' => true,
])
->setFinder($finder);
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
[![documentation](https://img.shields.io/github/workflow/status/codedredd/laravel-soap/documentation?label=docs&logo=read-the-docs&style=flat-square)](https://codedredd.github.io/laravel-soap/)

## Versions
Laravel SOAP Version | Laravel Support | PHP Version
-------- | ------------------ | -------------
1.x | 5.6, 6.x, 7x | 7.3 - 8.0
2.x | 8.x | 7.3 - 8.0
3.x | 8.x, 9.x | 8.0 - 8.1
| Laravel SOAP Version | Laravel Support | PHP Version |
|----------------------|-----------------|-------------|
| 1.x | 5.6, 6.x, 7.x | 7.3 - 8.0 |
| 2.x | 8.x | 7.3 - 8.0 |
| 3.x | 9.x | 8.0 - 8.1 |

<a name="installation"></a>
## Installation

Expand Down
15 changes: 9 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@
}
],
"require": {
"php": "^8.0 || 8.1",
"php": "^8.0 || ^8.1",
"ext-soap": "*",
"ext-bcmath": "*",
"ext-intl": "*",
"ext-json": "*",
"ext-dom": "*",
"ext-simplexml": "*",
"illuminate/support": "^8.0 || ^9.0",
"illuminate/http": "^9.0",
"illuminate/support": "^9.0",
"phpro/soap-client": "^v2.1.0",
"php-http/guzzle7-adapter": "^1.0",
"php-http/discovery": "^1.7",
Expand All @@ -26,14 +27,16 @@
"robrichards/wse-php": "^2.0",
"php-soap/psr18-transport": "^1.2",
"php-soap/psr18-wsse-middleware": "^1.1",
"php-http/mock-client": "^1.5"
"veewee/xml": "^1.3"
},
"require-dev": {
"symfony/var-dumper": "^5.0",
"symfony/options-resolver": "^5.4.3",
"phpunit/phpunit": "^9.1",
"orchestra/testbench": "^6.0 || ^7.0",
"laminas/laminas-code": "^4.5.1"
"orchestra/testbench": "^7.0",
"laminas/laminas-code": "^4.5.1",
"nunomaduro/larastan": "^2.0",
"nunomaduro/collision": "^6.1",
"symplify/easy-ci": "^10.0"
},
"autoload": {
"psr-4": {
Expand Down
Loading