Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 26 additions & 10 deletions .github/workflows/php-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,54 @@ on:
branches: [ 3.* ]
pull_request:
branches: [ 3.* ]
types: [opened, synchronize, reopened]

permissions:
contents: read

jobs:
test:
runs-on: ${{ matrix.operating-system }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
operating-system: ['ubuntu-latest']
operating-system: ['ubuntu-22.04'] # ubuntu-22.04 has good support for the PHP 7.2–7.4 toolchain.
php-versions: [7.2, 7.3, 7.4]
steps:
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
# Checkout FIRST so the workspace is ready for all later steps.
# Pin to a full commit SHA for supply-chain safety.
# To find the latest SHA for a tag, run:
# git ls-remote --tags https://github.com/actions/checkout.git | grep v4
# or check https://github.com/actions/checkout/releases
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

# Set git line-ending config
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf

# Setup PHP
# Pin to SHA. Right now using >= 2.37.1 which fixes CVE-2026-46420
# Check https://github.com/shivammathur/setup-php/releases for latest.
- name: Setup PHP ${{ matrix.php-versions }}, with composer and extensions
uses: shivammathur/setup-php@716331904ea2625d93a4f4f8f8c050d235845675 # v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl, mcrypt, xml
tools: composer:v2
ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug2

- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v4

- name: Validate composer.json and composer.lock
run: composer validate

- name: Install Composer dependencies
run: |
composer self-update
composer install --prefer-source --no-interaction

- name: Syntax check PHP
run: |
php vendor/bin/phpcpd --exclude tests --exclude vendor .
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
"robrichards/xmlseclibs": "^3.1.5"
},
"require-dev": {
"phpunit/phpunit": ">8.5.51",
"php-coveralls/php-coveralls": "^1.0.2 || ^2.0",
"sebastian/phpcpd": "^2.0 || ^3.0 || ^4.0",
"phploc/phploc": "^2.1 || ^3.0 || ^4.0",
"pdepend/pdepend": "^2.5.0",
"squizlabs/php_codesniffer": "^3.1.1"
"phpunit/phpunit": "^8.5.51 || ^9.6.33",
"php-coveralls/php-coveralls": "^2.8 || ^2.9",
"sebastian/phpcpd": "^4.0 || ^5.0",
"phploc/phploc": "^5.0 || ^6.0 || ^7.0",
"pdepend/pdepend": "^2.16",
"phpcsstandards/php_codesniffer": "^4.0"
},
"suggest": {
"ext-openssl": "Install openssl lib in order to handle with x509 certs (require to support sign and encryption)",
Expand Down