Skip to content

feat: deprecate non-int values in Counter::set()#17

Merged
kimpepper merged 2 commits into
mainfrom
feat/deprecate-counter-mixed-value
Jul 10, 2026
Merged

feat: deprecate non-int values in Counter::set()#17
kimpepper merged 2 commits into
mainfrom
feat/deprecate-counter-mixed-value

Conversation

@kimpepper

Copy link
Copy Markdown
Member

Passing a non-int value to Counter::set() now triggers an E_USER_DEPRECATED notice before the existing InvalidArgumentException is thrown; behaviour is otherwise unchanged. The parameter type will be narrowed to int in 2.0.0.

Closes #16

@kimpepper kimpepper requested review from acbramley and Copilot and removed request for Copilot July 10, 2026 01:43
Passing a non-int value to Counter::set() now triggers an
E_USER_DEPRECATED notice before the existing InvalidArgumentException is
thrown. The parameter type will be narrowed to int in the next major
release. Documents the value as int<0, max>.

Closes #16
The TriggerErrorSeeUrlFormat sniff is now excluded globally in
phpcs.xml, so the inline phpcs:ignore is no longer needed.
@kimpepper kimpepper force-pushed the feat/deprecate-counter-mixed-value branch from 371514b to a84657b Compare July 10, 2026 01:50
@kimpepper kimpepper merged commit 5348251 into main Jul 10, 2026
4 checks passed
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.

Deprecate non-int values in Counter::set()

1 participant