Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/Bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ body:
attributes:
label: Apiato Core Version
description: Provide the Apiato Core version that you are using. [Please ensure it is still supported.](https://apiato.io/docs/prologue/release-notes#support-policy)
placeholder: 8.x
placeholder: 13.x
validations:
required: true
- type: input
attributes:
label: PHP Version
description: Provide the PHP version that you are using.
placeholder: 8.1.x
placeholder: 8.2.x
validations:
required: true
- type: input
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/composer-quality.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "Composer - quality"

on:
push:
branches: [ master, '*.x' ]
pull_request:
types: [ opened, synchronize, reopened ]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
composer-quality:
name: Composer Quality Checks
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
extensions: dom, curl, libxml, mbstring, zip
coverage: none

- name: Setup Composer token
run: composer config -g github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}

- name: Install Composer dependencies
uses: ramsey/composer-install@v3
with:
composer-options: --prefer-dist --optimize-autoloader

- name: Validate composer.json / composer.lock
run: composer validate --strict --no-check-publish --ansi

- name: Detect unused packages
run: vendor/bin/composer-unused --no-progress --ansi
47 changes: 47 additions & 0 deletions .github/workflows/composer-security.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "Composer - security audit"

on:
push:
branches: [ master, '*.x' ]
pull_request:
types: [ opened, synchronize, reopened ]
schedule:
- cron: '0 6 * * *' # daily at 06:00 UTC

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
composer-security:
name: Composer Security Audit
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
extensions: dom, curl, libxml, mbstring, zip
coverage: none

- name: Setup Composer token
run: composer config -g github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}

- name: Install Composer dependencies
uses: ramsey/composer-install@v3
with:
dependency-versions: locked
composer-options: --prefer-dist

- name: Run composer audit
run: composer audit --locked --ansi

- name: Run security check (roave/security-advisories)
run: composer update --dry-run --ansi --quiet --no-scripts --no-interaction roave/security-advisories
16 changes: 2 additions & 14 deletions .github/workflows/matrix_includes.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"runs_on": "ubuntu-latest",
"runOn":"master",
"php_version":"8.4",
"php_unit_version": "phpunit:11.*"
"php_unit_version": "phpunit:12.*"
},
{
"runs_on": "ubuntu-latest",
Expand All @@ -33,18 +33,6 @@
"runs_on": "ubuntu-latest",
"runOn":"13.x",
"php_version":"8.4",
"php_unit_version": "phpunit:11.*"
},
{
"runs_on": "ubuntu-latest",
"runOn":"8.x",
"php_version":"8.1",
"php_unit_version": "phpunit:10.*"
},
{
"runs_on": "ubuntu-latest",
"runOn":"8.x",
"php_version":"8.2",
"php_unit_version": "phpunit:10.*"
"php_unit_version": "phpunit:12.*"
}
]
46 changes: 30 additions & 16 deletions .github/workflows/php-cs-fixer.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,49 @@
name: Check & fix styling
name: "Linter - PHP-CS-Fixer"

on:
push:
branches:
- master
- '*.x'
branches: [ master, '*.x' ]
pull_request:
types: [ opened, synchronize, reopened ]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
php-cs-fixer:
name: PHP-CS-Fixer
runs-on: ubuntu-latest
permissions:
contents: write
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Cache

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
coverage: none

- name: Setup Composer token
run: composer config -g github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}

- name: Cache PHP-CS-Fixer results
uses: actions/cache@v4
with:
path: .php-cs-fixer.cache
key: ${{ runner.OS }}-${{ github.repository }}-phpcsfixer-${{ github.sha }}
key: ${{ runner.OS }}-${{ github.repository }}-php-cs-fixer-${{ github.sha }}
restore-keys: |
${{ runner.OS }}-${{ github.repository }}-phpcsfixer-
- name: Run PHP CS Fixer
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --config=.php-cs-fixer.dist.php
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
${{ runner.OS }}-${{ github.repository }}-php-cs-fixer-

- name: Install Composer dependencies
uses: ramsey/composer-install@v3
with:
commit_message: "style(automated): apply php-cs-fixer rules"
composer-options: --prefer-dist

- name: Run PHP-CS-Fixer
run: vendor/bin/php-cs-fixer fix --dry-run --format=txt --diff --allow-risky=yes --using-cache=yes --ansi -vv
49 changes: 49 additions & 0 deletions .github/workflows/phpcs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: "Linter - PHP_CodeSniffer"

on:
push:
branches: [ master, '*.x' ]
pull_request:
types: [ opened, synchronize, reopened ]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
phpcs:
name: PHP_CodeSniffer
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
coverage: none

- name: Setup Composer token
run: composer config -g github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}

- name: Cache PHPCS results
uses: actions/cache@v4
with:
path: .phpcs-cache
key: ${{ runner.OS }}-${{ github.repository }}-phpcs-${{ github.sha }}
restore-keys: |
${{ runner.OS }}-${{ github.repository }}-phpcs-

- name: Install Composer dependencies
uses: ramsey/composer-install@v3
with:
composer-options: --prefer-dist

- name: Run PHP_CodeSniffer
run: vendor/bin/phpcs -p --error-severity=1 --warning-severity=6 --colors --cache=.phpcs-cache
41 changes: 33 additions & 8 deletions .github/workflows/phpmd.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,50 @@
name: PHPMD
name: "Linter - PHPMD"

on:
push:
branches:
- master
- '*.x'
branches: [ master, '*.x' ]
pull_request:
types: [ opened, synchronize, reopened ]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
phpmd:
name: PHPMD
name: PHP Mess Detector
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP environment

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
coverage: none
tools: phpmd

- name: Setup Composer token
run: composer config -g github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}

- name: Cache PHPMD results
uses: actions/cache@v4
with:
path: .phpmd.result-cache.php
key: ${{ runner.OS }}-${{ github.repository }}-phpmd-${{ github.sha }}
restore-keys: |
${{ runner.OS }}-${{ github.repository }}-phpmd-

- name: Install Composer dependencies
uses: ramsey/composer-install@v3
with:
composer-options: --prefer-dist

- name: Run PHPMD
run: phpmd . github ruleset.xml --exclude 'tests/*,vendor/*'
run: vendor/bin/phpmd . github phpmd.ruleset.xml --ignore-violations-on-exit --color --cache

39 changes: 39 additions & 0 deletions .github/workflows/phpstan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: "Static analysis - PHPStan"

on:
push:
branches: [ master, '*.x' ]
pull_request:
types: [ opened, synchronize, reopened ]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
phpstan:
name: PHPStan Static Analysis
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Composer token
run: composer config -g github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}

- name: Install Composer dependencies
uses: ramsey/composer-install@v3
with:
composer-options: --prefer-dist

- name: Run PHPStan
uses: php-actions/phpstan@v3
with:
configuration: phpstan.neon
path: app/ config/ tests/ database/
version: 'composer'
php_version: '8.3'
Loading