Skip to content

revert(CPD-31586): chillerlan/php-qrcode back to v4 - #71

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

revert(CPD-31586): chillerlan/php-qrcode back to v4#71
salkhwlani merged 1 commit into
masterfrom
feature/CPD-31586-revert-upgrade-3.0.5

Conversation

@thaifanisalla

@thaifanisalla thaifanisalla commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

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)

Greptile Summary

Reverts chillerlan/php-qrcode from v5 to v4 and restores the plain v4 QROptions rendering path while retaining the nullable file parameter.

  • Changes the Composer constraint from ^5.0 to ^4.3.
  • Removes v5-specific output-interface and transparency defaults.
  • Leaves the restored default PNG path dependent on an undeclared GD extension.

Confidence Score: 4/5

The undeclared GD dependency should be fixed before merging because supported installations can otherwise fail on the documented default QR-rendering path.

The downgrade restores a GD-backed default renderer, while Composer permits installation without GD and the public render API invokes that renderer without selecting a non-GD alternative.

Files Needing Attention: composer.json

Important Files Changed

Filename Overview
composer.json Restores php-qrcode v4 but does not declare ext-gd, which its documented default PNG path requires at runtime.
src/GenerateQrCode.php Restores the v4-compatible plain QROptions render path and retains the explicitly nullable file parameter.
Prompt To Fix All With AI
### Issue 1
composer.json:28-31
**GD dependency remains undeclared**

If a consumer installs this package without `ext-gd`, Composer accepts the installation but php-qrcode v4's default PNG renderer fails when the documented no-options `render()` path is called.

```suggestion
        "ext-dom": "*",
        "ext-gd": "*",
        "robrichards/xmlseclibs": "^3.1",
        "josemmo/uxml": "^0.1.4",
        "chillerlan/php-qrcode": "^4.3",
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "revert(CPD-31586): `chillerlan/php-qrcod..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

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)
@thaifanisalla
thaifanisalla requested a review from a team as a code owner August 19, 2026 14:40
@sallainternalbot
sallainternalbot Bot marked this pull request as draft August 19, 2026 14:40
@thaifanisalla
thaifanisalla marked this pull request as ready for review August 19, 2026 14:41
@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.

Comment thread composer.json
@salkhwlani
salkhwlani merged commit 3db6192 into master Aug 20, 2026
2 checks passed
@salkhwlani
salkhwlani deleted the feature/CPD-31586-revert-upgrade-3.0.5 branch August 20, 2026 10:42
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