Container to retrieve php versions infos programmatically.
Created to replace fetching infos from php.net website, as a DDOS prevention mechanism has been implemented, preventing people to use it programmatically.
See actives.json
file, content is the same as https://www.php.net/releases/active.php
Example with 7.4+
versions:
{
"7": {
"7.4": { [...Original content...] },
},
"8": {
"8.0": { [...Original content...] },
"8.1": { [...Original content...] },
[...]
}
Tip
- Retrieve lowest supported version:
Output:
bin/fetch_lowest_supported_version.sh
7.4
- Retrieve latest supported version:
Output:
bin/fetch_latest_supported_version.sh
8.1
See qa-releases.json
file, content mostly comes from https://www.php.net/release-candidates.php?format=json but is filtered and enhanced.
Caution
Be aware that the list may be empty !
In that case, it means there is no QA releases to test at this point in time
The original content is filtered to remove versions without any releases available.
Additional properties are added:
version
: The long version (e.g.X.Y.Z
)short_version
: Major and minor version (e.g.X.Y
)major_version
: Only the major version (e.g.X
)supported
: Whether the version is supported (=active) or not.
Resulting output resemble to the one use for actives.json
file !
Example with 8.5
version:
{
"8": {
"8.4": {
[...Original content...]
"version": "8.4.12",
"short_version": "8.4",
"major_version": "8",
"supported": true
},
"8.5": {
[...Original content...]
"version": "8.5.0",
"short_version": "8.5",
"major_version": "8",
"supported": false
}
}
}
Tip
Retrieve nightly version:
bin/fetch_nightly_version.sh
Output: 8.5
- Version files are updated each week on Sunday morning thanks to
update-versions
workflow
In case you use gitHub API, you can leverage conditional requests mechanism to avoid consuming uselessly your quota if file hasn't been updated since your last fetch