Skip to content

Fix deprecation notice in PosClient constructor#426

Open
danrcastro wants to merge 1 commit into
bitpay:10.1.xfrom
danrcastro:php-8.4-depreaction
Open

Fix deprecation notice in PosClient constructor#426
danrcastro wants to merge 1 commit into
bitpay:10.1.xfrom
danrcastro:php-8.4-depreaction

Conversation

@danrcastro
Copy link
Copy Markdown

PHP 8.4 deprecates implicitly nullable parameters: a parameter typed string but defaulted to null is treated as nullable without saying so.

The $environment parameter in PosClient::__construct relied on this implicit behavior. Declaring it explicitly as ?string removes the deprecation while keeping the same nullable default.

@danrcastro danrcastro force-pushed the php-8.4-depreaction branch from 4663aad to 0ab4191 Compare May 29, 2026 23:06
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