Skip to content

Fix Agent::__call signature for mobiledetectlib 4.10 compatibility#77

Open
refringe wants to merge 1 commit into
shetabit:masterfrom
refringe:fix/agent-call-signature-php-typed
Open

Fix Agent::__call signature for mobiledetectlib 4.10 compatibility#77
refringe wants to merge 1 commit into
shetabit:masterfrom
refringe:fix/agent-call-signature-php-typed

Conversation

@refringe
Copy link
Copy Markdown

@refringe refringe commented May 8, 2026

  • Updates Agent::__call to use the typed signature (string $name, array $arguments): bool so it remains compatible with Detection\MobileDetect::__call, which became typed in mobiledetect/mobiledetectlib 4.10.0.
  • Bumps the mobiledetect/mobiledetectlib constraint from >=4.8 <4.9 to ^4.10 so installs resolve a parent class whose signature matches the override.

Fixes #76.

mobiledetect/mobiledetectlib 4.10.0 added typed parameter and return type declarations to MobileDetect::__call. Agent's untyped override caused a fatal LSP-incompatibility error at class load time on any install resolving 4.10+.

Adopt the typed signature on Agent::__call and bump the mobiledetect/mobiledetectlib constraint to ^4.10 so installs pull a compatible parent.

Fixes shetabit#76
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.

Agent::__call signature incompatible with mobiledetect/mobiledetectlib v4.10.0

1 participant