Skip to content

fix(printing): preserve non-boolean PPD option values - #69

Draft
kduma wants to merge 1 commit into
masterfrom
fix/ppd-option-type-coercion
Draft

kduma wants to merge 1 commit into
masterfrom
fix/ppd-option-type-coercion

Conversation

@kduma

@kduma kduma commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

The print-service job endpoint converts every PPD option with a non-empty type into a boolean. For example, a job submitted with PageSize=A4 and Duplex=None reaches the service as false for both options. This was reproduced against the published FPM image at digest sha256:082e72cfc5d48413ea44efe3b93bcc64131c67323e3a9e4fbbad31da51653a7f.

Parenthesize the null-coalescing expression before comparing the type to Boolean. Choice values and their defaults remain strings; only Boolean options are converted. The regression test covers explicit selections, defaults, a missing type, and both boolean values.

Validation:

  • The new regression test fails before the fix with the actual A4/None → false mismatch.
  • PHP 8.5.12: full SQLite suite passes (215 tests, 676 assertions, 11 existing MySQL-dependent skips); Pint passes for both changed files.
  • Studio's production Android HTTPS client was tested against the official image with only this controller replaced: RAW and PPD/PDF payload hashes match the service receiver, PPD options are preserved, and status reconciliation submits no extra jobs. The receiver is simulated; this does not certify CUPS or physical printing.

No production deployment or image publication has been performed.

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.

1 participant