Skip to content

feat(CPD-31586)!: chillerlan/php-qrcode from v4 to v5 — release as 4.0.0 - #72

Merged
salkhwlani merged 2 commits into
masterfrom
feature/CPD-31586-revert-revert-upgrade-3.0.5
Aug 20, 2026
Merged

feat(CPD-31586)!: chillerlan/php-qrcode from v4 to v5 — release as 4.0.0#72
salkhwlani merged 2 commits into
masterfrom
feature/CPD-31586-revert-revert-upgrade-3.0.5

Conversation

@thaifanisalla

@thaifanisalla thaifanisalla commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Re-applies the chillerlan/php-qrcode v4 → v5 upgrade that shipped in 3.0.5 and was reverted in #71, so it can be released under a major version instead of a patch.

The upgrade is a breaking change for consumers, but 3.0.5 released it as a patch. The fix is a two-step:

  1. revert(CPD-31586): chillerlan/php-qrcode back to v4 #71 — revert v5 on the 3.x line, released as a patch so existing consumers get a working ^4.3 back.
  2. This PR — re-apply v5, released as 4.0.0.

Changes

  • composer.json: chillerlan/php-qrcode ^4.3^5.0
  • src/GenerateQrCode.php: restores the QROutputInterface import and the GDIMAGE_PNG / imageTransparent defaults in render()
  • CLAUDE.md: stack list updated from ^4.3 to ^5.0 (was stale — the original chore: chillerlan/php-qrcode: from v4 to v5 #65 missed it)

The composer.json and GenerateQrCode.php content is byte-identical to the 3.0.5 state (a296af9); verified with git diff a296af9, which returns empty.

Breaking change

chillerlan/php-qrcode v5 renames the QROptions keys and output constants consumed by GenerateQrCode::render(). Callers passing v4-style option arrays must migrate.

Important

Tag this as 4.0.0. This repo has no version field in composer.json — releases are purely tag-driven, so the major bump must be applied manually at release time.

Downstream impact

some internal projects consume salla/zatca. Neither picks up v5 until their constraint is widened to ^4.0; both should be checked for v4-style render() option usage before this is tagged.

Test plan

  • composer update chillerlan/php-qrcode resolves to 5.0.5
  • composer test — 8 tests, 26 assertions, all passing, no deprecation notices
  • Verify a rendered QR image against a ZATCA validator before tagging 4.0.0
  • Confirm revert(CPD-31586): chillerlan/php-qrcode back to v4 #71 is merged and the 3.x patch is released first

Base branch

Stacked on feature/CPD-31586-revert-upgrade-3.0.5 (#71) so the diff shows only the re-application. GitHub retargets this to master automatically once #71 merges.

Greptile Summary

The PR reapplies the QR-code dependency’s v5 upgrade as a deliberate major release.

  • Updates chillerlan/php-qrcode from ^4.3 to ^5.0.
  • Restores v5-compatible PNG output and transparency defaults in GenerateQrCode::render().
  • Updates repository documentation to reflect the dependency version.

Confidence Score: 5/5

The PR appears safe to merge because no eligible blocking failure remains.

No blocking failure remains.

Important Files Changed

Filename Overview
composer.json Raises the QR-code dependency constraint from v4 to v5 for the planned major release.
src/GenerateQrCode.php Restores the v5 output interface import and preserves the library’s documented PNG rendering behavior.
CLAUDE.md Updates the documented QR-code dependency version to match the manifest.

Reviews (2): Last reviewed commit: "feat(CPD-31586)!: `chillerlan/php-qrcode..." | Re-trigger Greptile

Reverts the v4 -> v5 upgrade released in 3.0.5. Restores the `^4.3`
constraint and the plain QROptions render path, dropping the
GDIMAGE_PNG/imageTransparent defaults that only exist in v5.

The explicit `?string $file` nullable type is kept, since it is
independent of the qrcode major version and avoids a PHP 8.4+
deprecation notice.

Reverts a296af9 (#65)
Re-applies the upgrade that shipped in 3.0.5 and was reverted in #71,
so it can be released under a major version instead of a patch.

Restores the `^5.0` constraint, the QROutputInterface import and the
GDIMAGE_PNG/imageTransparent defaults in render(). Also updates the
CLAUDE.md stack list, which still referenced ^4.3.

BREAKING CHANGE: chillerlan/php-qrcode v5 renames the QROptions keys
and output constants used by GenerateQrCode::render(). Callers passing
v4-style options must migrate. Release this as 4.0.0, not 3.0.x.

Reverts 76b4637 (#71), reinstating a296af9 (#65)
@thaifanisalla
thaifanisalla requested a review from a team as a code owner August 19, 2026 17:40
@sallainternalbot
sallainternalbot Bot marked this pull request as draft August 19, 2026 17:40
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0 (≤ 2 duplication)

View in Codacy

AI Reviewer: run a review on demand. To trigger the first review automatically, go to your organization or repository integration settings. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@thaifanisalla
thaifanisalla marked this pull request as ready for review August 19, 2026 17:46
Base automatically changed from feature/CPD-31586-revert-upgrade-3.0.5 to master August 20, 2026 10:42
@salkhwlani
salkhwlani merged commit 24cf990 into master Aug 20, 2026
2 checks passed
@salkhwlani
salkhwlani deleted the feature/CPD-31586-revert-revert-upgrade-3.0.5 branch August 20, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants