Skip to content

Document which versions of PHP are supported #539

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 1 commit into from
Feb 2, 2025
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
25 changes: 10 additions & 15 deletions .github/workflows/auto-regenerate.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,57 @@

name: "Auto Regenerate"

on:
schedule:
- cron: '0 3 * * *'
- cron: "0 3 * * *"
workflow_dispatch:

jobs:

auto-regenerate:
name: "Auto Regenerate"
runs-on: "ubuntu-24.04"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"

- name: "Install PHP with extensions"
uses: "shivammathur/setup-php@v2"
with:
coverage: "pcov"
php-version: "8.3"
php-version: "8.4"

- name: "Check out salathe/phpdoc-base"
uses: "actions/checkout@v4"
with:
path: "generator/doc/doc-en/doc-base"
repository: "salathe/phpdoc-base"
fetch-depth: 0

- name: "Check out php/doc-en"
uses: "actions/checkout@v4"
with:
path: "generator/doc/doc-en/en"
repository: "php/doc-en"
fetch-depth: 0

- name: "Install dependencies with composer in generator/ directory"
run: "composer install --no-interaction"
working-directory: "generator"

- name: "Install dependencies with composer in root/ directory"
run: "composer install --no-interaction"

- name: "Dump autoloader with composer in root directory"
run: "composer dump-autoload"

- name: "Regenerate files"
run: "./safe.php generate"
working-directory: "generator"

- name: "Check for differences"
id: diff
run: "git diff --exit-code && (echo diff=no-diff >> $GITHUB_OUTPUT) || (echo diff=diff >> $GITHUB_OUTPUT)"
working-directory: "generator"

- name: "Create a pr if the files are different"
if: "${{ steps.diff.outputs.diff == 'diff' }}"
uses: peter-evans/create-pull-request@v6
Expand All @@ -63,6 +61,3 @@ jobs:
title: "Automatically regenerate the files"
labels: "regenerate, auto"
assignees: "shish, OskarStark, silasjoisten, moufmouf"



7 changes: 2 additions & 5 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main
- master
tags:
- 'v*'
- "v*"
pull_request:

jobs:
Expand All @@ -19,7 +19,7 @@ jobs:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "Get current date for the daily cache"
id: 'date'
id: "date"
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: "Cache the php documentation"
id: cache-php-doc
Expand Down Expand Up @@ -50,8 +50,6 @@ jobs:
fail-fast: false
matrix:
php-version:
- "8.1"
- "8.2"
- "8.3"
- "8.4"
steps:
Expand Down Expand Up @@ -190,4 +188,3 @@ jobs:
- name: "Run tests"
run: "composer test"
working-directory: "generator/tests/rector"

9 changes: 8 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ Safe-PHP code is generated automatically from the PHP doc.
`generated/` and the files in `lib/` auto-loaded; they shouldn't
need to worry about any files outside those two directories.

## Minimum Supported PHP Version

See https://www.php.net/supported-versions.php

* The `generator` code should be compatible with "Active Support" versions
* The `generated` code should be compatible with "Active Support" and "Security Fixes" versions

## Installing dev dependencies

### With a devcontainer
Expand All @@ -48,7 +55,7 @@ pre-installed.

### Manually

- php8.2+ CLI (with dom and curl modules)
- php CLI (with dom and curl modules)
- composer

### With docker
Expand Down
4 changes: 2 additions & 2 deletions generator/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}
},
"require": {
"php": "^8.1",
"php": "^8.3",
"ext-simplexml": "*",
"ext-json": "*",
"symfony/console": "^6",
Expand All @@ -31,7 +31,7 @@
},
"config": {
"platform": {
"php": "8.1.31"
"php": "8.3"
}
}
}
Loading