Repository navigation
Trunk-based releases from GitHub Releases; 3.0.1 - #69
Merged
Merged
Conversation
- build.yml replaces main.yml: PR + main builds on PHP 8.1-8.5 (composer validate, lint, offline tests) behind one required `build` check; API tests run in a non-required `integration` job. Composer comes from setup-php (no more http:// installer), actions pinned to SHAs. - release.yml on release: published checks the publisher, SemVer tag on main, ConvertApi::VERSION == tag, runs every test and waits for Packagist to serve the tag from the tagged commit. - Remove curl_close() calls (no-op since PHP 8.0, deprecated in 8.5); PHPUnit now fails on deprecations, notices and warnings from lib/. - ConvertApi::VERSION 3.0.1, CHANGELOG, RELEASING, Dependabot, repo URLs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
Version validation permits invalid or downgraded prereleases, and transient failures terminate Packagist polling instead of retrying.
3 open issues
What changed in this PR
Moves the PHP client to trunk-based releases through GitHub Releases and prepares version 3.0.1.
Changes:
- Adds multi-version CI, release verification, and dependency updates.
- Separates offline and integration tests and strengthens runtime warning checks.
- Removes deprecated cURL calls and documents the release process.
| File | Description |
|---|---|
| tests/ConvertApi/ConvertApiTest.php | Groups API tests and supports configurable endpoints. |
| tests/ConvertApi/ConfigurationTest.php | Adds separate offline configuration tests. |
| RELEASING.md | Documents release procedures and recovery. |
| README.md | Updates repository links and build badge. |
| phpunit.xml.dist | Fails on deprecations, notices, and warnings. |
| lib/ConvertApi/ConvertApi.php | Bumps version to 3.0.1. |
| lib/ConvertApi/Client.php | Removes deprecated curl_close() calls. |
| docker-compose.yml | Adds a PHP 8.4 service. |
| composer.json | Updates repository URLs. |
| CHANGELOG.md | Records 3.0.1 changes. |
| .github/workflows/release.yml | Verifies releases and Packagist availability. |
| .github/workflows/main.yml | Removes the previous build workflow. |
| .github/workflows/build.yml | Adds PHP matrix testing and version checks. |
| .github/dependabot.yml | Schedules weekly dependency updates. |
Review effort: Balanced
| run: | | ||
| set -euo pipefail | ||
| VERSION=$(sed -n "s/^ *const VERSION = '\(.*\)';.*/\1/p" lib/ConvertApi/ConvertApi.php) | ||
| SEMVER='^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$' |
| exit 1 | ||
| fi | ||
| LATEST=$(git tag --list 'v*' | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | sed 's/^v//' | sort -V | tail -n1) | ||
| if [ -n "$LATEST" ] && [ "$(printf '%s\n%s\n' "$LATEST" "${VERSION%%-*}" | sort -V | tail -n1)" != "${VERSION%%-*}" ]; then |
Comment on lines
+144
to
+145
| REF=$(curl -fsS -H 'Cache-Control: no-cache' "https://repo.packagist.org/p2/$PACKAGE.json" \ | ||
| | jq -r --arg p "$PACKAGE" --arg v "$TAG" '.packages[$p][] | select(.version == $v) | .source.reference // empty') |
tomasr78
added a commit
that referenced
this pull request
Oct 20, 2026
Addresses the Copilot review of #69: the Packagist poll in release.yml aborted on the first failed request under bash -e; SemVer validators accepted leading-zero pre-release identifiers; build.yml let VERSION be a pre-release of the latest release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Moves the PHP client to the same trunk-based release flow as convertapi-library-dotnet, and prepares 3.0.1.
Pipeline
build.yml(replacesmain.yml), on PRs and pushes tomain. Runs on PHP 8.1, 8.2, 8.3, 8.4 and 8.5:composer validate --strict, install,php -lon every file, then the offline tests. The single required check isbuild, which passes only when every PHP version passed. It also checks thatConvertApi::VERSIONis SemVer and never lower than the latest release. Composer comes fromshivammathur/setup-phptools; the oldcurl http://getcomposer.org/installeris gone. Every action is pinned to a SHA, withpersist-credentials: false.The
integrationjobs (PHP 8.1 and 8.5) run the API tests with theCONVERT_API_SECRETsecret againstCONVERT_API_BASE, which is currently staging,https://stag-v2.convertapi.com/. They are not required, so an API outage cannot block a merge. They are skipped when the secret is unavailable (forks, Dependabot).release.ymlruns onrelease: published, in the newpackagistenvironment (v*tags only). It checks:tomasr78;main;ConvertApi::VERSIONequals the tag.It then runs every test on PHP 8.5 and polls
repo.packagist.org/p2for up to 15 minutes, until Packagist serves the tag from the tagged commit.Packagist still publishes through its GitHub webhook, so there is no upload step and no registry key.
RELEASING.md,CHANGELOG.mdand Dependabot (actions + composer, weekly) are added.Library (3.0.1)
curl_close()calls. They have done nothing since PHP 8.0 and are deprecated in PHP 8.5, where every request emitted a deprecation notice; the API tests caught this on 8.5.phpunit.xml.distnow fails on deprecations, notices and warnings fromlib/.ConvertApi::VERSIONis now3.0.1, and the repository URLs point toconvertapi-library-php. The default branch is nowmain(renamed frommaster).Verified locally on PHP 8.1 and 8.5: 19 tests, 26 assertions against staging.
🤖 Generated with Claude Code