Skip to content

feat: use callable instead of Closure|array|string for handler type#41

Merged
CodeWithKyrian merged 2 commits into
mainfrom
fix/use-callable-type-for-handlers
Jun 30, 2025
Merged

feat: use callable instead of Closure|array|string for handler type#41
CodeWithKyrian merged 2 commits into
mainfrom
fix/use-callable-type-for-handlers

Conversation

@CodeWithKyrian

Copy link
Copy Markdown
Contributor

This PR updates handler type hints from \Closure|array|string to callable|array|string throughout the codebase.

Changes

  • Updated all RegisteredElement classes to use callable type hint
  • Fixed RegisteredElement constructor to properly handle callable parameter
  • Updated ServerBuilder and Registry method signatures

Why

The callable type hint is more semantically correct and covers the same use cases as \Closure|array|string but is cleaner and more inclusive.

Breaking Changes

None - this is a type hint improvement that maintains backward compatibility.

@CodeWithKyrian CodeWithKyrian merged commit 3c98d3a into main Jun 30, 2025
8 checks passed
@CodeWithKyrian CodeWithKyrian deleted the fix/use-callable-type-for-handlers branch June 30, 2025 22:09
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