Skip to content

Fix PHP deprecation warnings in WebPrintApi#8

Merged
kduma merged 1 commit intomasterfrom
claude/fix-php-deprecations-01H9jnxnTdLvJ2HqD4jTCBFB
Dec 2, 2025
Merged

Fix PHP deprecation warnings in WebPrintApi#8
kduma merged 1 commit intomasterfrom
claude/fix-php-deprecations-01H9jnxnTdLvJ2HqD4jTCBFB

Conversation

@kduma
Copy link
Copy Markdown
Contributor

@kduma kduma commented Dec 2, 2025

Added explicit nullable type hints (?) to parameters with null default values:

  • WebPrintApi::GetPrinters() - $type_filter parameter
  • WebPrintApi::GetPromises() - $total_pages parameter
  • WebPrintApi::CreateDialog() - $redirect_url and $restricted_ip parameters
  • WebPrintApiInterface methods - matching interface signatures
  • Printer::__construct() - $ppd_options and $ppd_options_layout parameters

This resolves the "Implicitly marking parameter as nullable is deprecated" warnings that appear in PHP 8.1 and later versions.

Added explicit nullable type hints (?) to parameters with null default values:
- WebPrintApi::GetPrinters() - $type_filter parameter
- WebPrintApi::GetPromises() - $total_pages parameter
- WebPrintApi::CreateDialog() - $redirect_url and $restricted_ip parameters
- WebPrintApiInterface methods - matching interface signatures
- Printer::__construct() - $ppd_options and $ppd_options_layout parameters

This resolves the "Implicitly marking parameter as nullable is deprecated"
warnings that appear in PHP 8.1 and later versions.
@kduma kduma merged commit 24464ed into master Dec 2, 2025
@kduma kduma deleted the claude/fix-php-deprecations-01H9jnxnTdLvJ2HqD4jTCBFB branch December 2, 2025 14:45
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