Skip to content

Upgrade chillerlan/php-qrcode to ^4.4 for PHP 8.4/8.5 compatibility#63

Merged
kayjoosten merged 3 commits into
developfrom
fix/upgrade-php-qrcode-4.4.2
Jun 18, 2026
Merged

Upgrade chillerlan/php-qrcode to ^4.4 for PHP 8.4/8.5 compatibility#63
kayjoosten merged 3 commits into
developfrom
fix/upgrade-php-qrcode-4.4.2

Conversation

@kayjoosten

Copy link
Copy Markdown
Contributor

Problem

php-qrcode ^3.4 depends on chillerlan/php-settings-container ^1.2.2. Version 1.x of that library has implicit nullable parameters deprecated in PHP 8.4+:

Deprecated: chillerlan\Settings\SettingsContainerAbstract::__construct():
Implicitly marking parameter $properties as nullable is deprecated in
php-settings-container/src/SettingsContainerAbstract.php line 26

This surfaces in consumers that promote deprecations to exceptions (e.g. Behat in Stepup-tiqr) and causes test failures on PHP 8.4+.

Fix

Upgrade to chillerlan/php-qrcode ^4.4 which requires php-settings-container ^3.3 — fixed upstream. The API used by this library (QRCode::ECC_L, QRCode::OUTPUT_IMAGE_PNG, QROptions, ->render()) is unchanged between 3.x and 4.x.

Verification

  • find library -name '*.php' -exec php -l {} \; on PHP 8.5: zero deprecations
  • ./ci/qa/phpunit: OK (277 tests, 677 assertions)

php-qrcode 3.x pulls in php-settings-container 1.x which has implicit
nullable parameters deprecated in PHP 8.4+. php-qrcode 4.4.2 requires
php-settings-container ^3.3 which is clean. The QRCode API used by
the library (ECC_L, OUTPUT_IMAGE_PNG, QROptions, render()) is
unchanged between 3.x and 4.x.
pushok 0.16.x has implicit nullable parameters in Pushok\Payload\Alert
(setTitleLocKey, setTitleLocArgs, setActionLocKey) and Pushok\Response
(__construct) that are deprecated in PHP 8.4+. These classes are loaded
during APNS push notification Behat tests, causing step failures.

pushok 0.19.1 uses explicit nullable types. This also requires upgrading
web-token/jwt-library from ^3 to ^4.
php-qrcode 4.x still calls imagedestroy() which is deprecated in PHP
8.5. 5.0.5 removes it. Bump constraint from ^4.4 to ^5.0.
@kayjoosten
kayjoosten merged commit 0ad123d into develop Jun 18, 2026
1 of 2 checks passed
@kayjoosten

Copy link
Copy Markdown
Contributor Author

Note: The PR description mentions ^4.4 but the final merged code uses ^5.0. During CI validation we discovered that php-qrcode 4.x still calls imagedestroy() which is deprecated in PHP 8.5 (fixed in 5.0.5). The constraint was updated to ^5.0 before merge. The CHANGELOG entry for 4.4.2 reflects the correct final version.

kayjoosten added a commit to OpenConext/Stepup-tiqr that referenced this pull request Jun 18, 2026
Prior to this change, Stepup-tiqr targeted PHP 8.4 and several vendor
libraries contained PHP 8.4/8.5 deprecations (implicit nullable
parameters, non-canonical casts, deprecated functions) that caused
Behat test failures when PHP promoted them to exceptions.

This change upgrades the base image to php85-apache2-node24, updates
the composer platform to PHP 8.5, and fixes all deprecations:

- Upgrade tiqr/tiqr-server-libphp to 4.4.2, which fixes implicit
  nullable params in Tiqr_DeviceStorage, Tiqr_OcraService,
  Tiqr_Service and Tiqr_Message exceptions, upgrades
  chillerlan/php-qrcode to ^5.0 (removes imagedestroy() and
  settings-container 1.x deprecations) and edamov/pushok to ^0.19
  (fixes implicit nullable params in Pushok\Payload\Alert and
  Pushok\Response)
- Fix non-canonical cast deprecation in FileLogger (League\Csv)
- Fix phpcs Override attribute import
- Revert new-without-parens syntax incompatible with phpmd/pdepend 2.x

Upstream fixes: Tiqr/tiqr-server-libphp#62
                Tiqr/tiqr-server-libphp#63
PR: #402
kayjoosten added a commit to OpenConext/Stepup-tiqr that referenced this pull request Jun 22, 2026
Prior to this change, Stepup-tiqr targeted PHP 8.4 and several vendor
libraries contained PHP 8.4/8.5 deprecations (implicit nullable
parameters, non-canonical casts, deprecated functions) that caused
Behat test failures when PHP promoted them to exceptions.

This change upgrades the base image to php85-apache2-node24, updates
the composer platform to PHP 8.5, and fixes all deprecations:

- Upgrade tiqr/tiqr-server-libphp to 4.4.2, which fixes implicit
  nullable params in Tiqr_DeviceStorage, Tiqr_OcraService,
  Tiqr_Service and Tiqr_Message exceptions, upgrades
  chillerlan/php-qrcode to ^5.0 (removes imagedestroy() and
  settings-container 1.x deprecations) and edamov/pushok to ^0.19
  (fixes implicit nullable params in Pushok\Payload\Alert and
  Pushok\Response)
- Fix non-canonical cast deprecation in FileLogger (League\Csv)
- Fix phpcs Override attribute import
- Revert new-without-parens syntax incompatible with phpmd/pdepend 2.x

Upstream fixes: Tiqr/tiqr-server-libphp#62
                Tiqr/tiqr-server-libphp#63
PR: #402
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