Thanks to visit codestin.com
Credit goes to github.com

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
42 changes: 42 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "Continuous Integration"

on:
push:
branches:
- 5.x.x
pull_request:
branches:
- 5.x.x

jobs:
tests:
name: "PHP ${{ matrix.php-version }}"

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php-version: ['7.1', '7.2', '7.3', '7.4']

Comment on lines +15 to +21
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using ubuntu-latest for an EOL PHP matrix (7.1–7.4) makes CI brittle because ubuntu-latest moves over time and can break old PHP builds unexpectedly. Pin the runner to a specific Ubuntu version known to work with these PHP versions (e.g., ubuntu-22.04/20.04) to keep the backport branch stable.

Copilot uses AI. Check for mistakes.
steps:
- name: "Checkout"
uses: "actions/checkout@v4"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
extensions: "intl, zip"
ini-values: "memory_limit=-1, phar.readonly=0, error_reporting=E_ALL, display_errors=On"
php-version: "${{ matrix.php-version }}"
tools: composer

- name: "Update dependencies"
run: "composer update --ansi --no-interaction --no-progress --prefer-dist"

- name: "Validate composer.json"
run: "composer validate"

- name: "Run tests"
run: "composer test"
6 changes: 6 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@
"bin": [
"bin/validate-json"
],
"config": {
"audit": {
"ignored": ["PKSA-z3gr-8qht-p93v"],
"block-insecure": false
}
},
Comment thread
DannyvdSluijs marked this conversation as resolved.
"scripts": {
"coverage": "@php phpunit --coverage-text",
"style-check": "@php php-cs-fixer fix --dry-run --verbose --diff",
Expand Down
4 changes: 3 additions & 1 deletion src/JsonSchema/Uri/Retrievers/Curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ public function retrieve($uri)
$this->fetchMessageBody($response);
$this->fetchContentType($response);

curl_close($ch);
if (PHP_VERSION_ID < 80000) {
curl_close($ch);
}
Comment thread
DannyvdSluijs marked this conversation as resolved.

return $this->messageBody;
}
Expand Down
Loading