-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
679 changed files
with
23,791 additions
and
10,536 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,13 @@ | ||
#!/bin/bash | ||
|
||
./vendor/bin/phpcbf | ||
exit_code=$? | ||
|
||
# Check if phpcbf made changes (non-zero exit code indicates fixes were made) | ||
if [ $exit_code -ne 0 ]; then | ||
echo "🛑 phpcbf made changes to the code." | ||
exit 1 | ||
else | ||
echo "✓ no changes were made by phpcbf." | ||
exit 0 | ||
fi |
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,27 @@ | ||
name: Composer security audit | ||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
jobs: | ||
audit: | ||
name: Run composer security audit | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.1' | ||
|
||
- name: Validate PHP Version | ||
run: php -v | ||
|
||
- name: Running composer security audit | ||
shell: bash | ||
run: | | ||
composer install | ||
composer audit | ||
composer install --working-dir=deps-composer | ||
composer audit --working-dir=deps-composer |
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,34 @@ | ||
name: editorconfig check | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
|
||
jobs: | ||
editorconfig-check: | ||
runs-on: ubuntu-24.04 | ||
|
||
strategy: | ||
matrix: | ||
php-version: [ '8.1' ] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
extensions: mbstring, intl | ||
coverage: yes | ||
|
||
- name: php version | ||
run: php -v | ||
|
||
- name: Install Composer dependencies | ||
run: composer install | ||
|
||
- name: Run editorconfig check | ||
run: composer check:ec |
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,35 @@ | ||
name: PHP parallel lint | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
|
||
jobs: | ||
php-parallel-lint: | ||
runs-on: ubuntu-24.04 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-version: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
extensions: mbstring, intl | ||
coverage: none | ||
|
||
- name: php version | ||
run: php -v | ||
|
||
- name: Install php-parallel-lint | ||
run: composer create-project php-parallel-lint/php-parallel-lint ./temp/php-parallel-lint --no-dev | ||
|
||
- name: Run PHP parallel lint | ||
run: ./temp/php-parallel-lint/parallel-lint . --exclude ./tests |
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,34 @@ | ||
name: phpcbf check | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
|
||
jobs: | ||
phpcbf-check: | ||
runs-on: ubuntu-24.04 | ||
|
||
strategy: | ||
matrix: | ||
php-version: [ '8.1' ] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
extensions: mbstring, intl | ||
coverage: yes | ||
|
||
- name: php version | ||
run: php -v | ||
|
||
- name: Install Composer dependencies | ||
run: composer install | ||
|
||
- name: Run phpcbf | ||
run: bash "${GITHUB_WORKSPACE}/.github/run-phpcbf.sh" |
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,38 +1,86 @@ | ||
name: PHPUnit tests | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
|
||
jobs: | ||
phpunit: | ||
runs-on: ubuntu-24.04 | ||
phpunit: | ||
runs-on: ubuntu-24.04 | ||
|
||
strategy: | ||
matrix: | ||
php-version: [ '8.1' ] | ||
strategy: | ||
matrix: | ||
php-version: [ '8.1' ] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
extensions: mbstring, intl | ||
coverage: yes | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
extensions: mbstring, intl | ||
coverage: yes | ||
|
||
- name: php version | ||
run: php -v | ||
- name: php version | ||
run: php -v | ||
|
||
- name: Install Composer dependencies | ||
run: composer install | ||
- name: Install Composer dependencies | ||
run: composer install | ||
|
||
- name: Install Composer dev dependencies | ||
working-directory: phpstan | ||
run: composer install | ||
- name: Run PHPUnit | ||
run: composer run tests-unit | ||
|
||
- name: Run PHPUnit | ||
run: composer run tests-unit | ||
- name: Run PHPUnit with code coverage | ||
run: | | ||
composer run tests-coverage | ||
cat tests-coverage/coverage.txt > tests-coverage/coverage-summary.txt | ||
- name: Post coverage report as comment in PR | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const fs = require('fs'); | ||
const coverageSummary = fs.readFileSync('tests-coverage/coverage-summary.txt', 'utf8'); | ||
const commentBody = ` | ||
## :bar_chart: Code Coverage Report | ||
\`\`\` | ||
${coverageSummary} | ||
\`\`\` | ||
`; | ||
const { data: comments } = await github.rest.issues.listComments({ | ||
...context.repo, | ||
issue_number: context.payload.pull_request.number, | ||
}); | ||
const existingComment = comments.find(comment => comment.body.includes(':bar_chart: Code Coverage Report')); | ||
if (existingComment) { | ||
await github.rest.issues.updateComment({ | ||
...context.repo, | ||
comment_id: existingComment.id, | ||
body: commentBody, | ||
}); | ||
} else { | ||
await github.rest.issues.createComment({ | ||
...context.repo, | ||
issue_number: context.payload.pull_request.number, | ||
body: commentBody, | ||
}); | ||
} | ||
- name: Upload test results | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: junit-results | ||
path: ./tests-coverage/log/junit.xml | ||
|
||
- name: Upload coverage report | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: coverage-report | ||
path: ./tests-coverage/cobertura.xml |
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,13 +1,12 @@ | ||
/.idea/ | ||
/vendor | ||
/phpcs/vendor | ||
/phpstan/vendor | ||
/temp/* | ||
!/temp/.gitignore | ||
/log/ | ||
**/.DS_Store | ||
/tests-coverage/ | ||
/.phpunit.result.cache | ||
/config/config.local.neon | ||
/node_modules/ | ||
phpunit.xml | ||
soap-php-bugfix-dev.wsdl |
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
Oops, something went wrong.