php-client icon indicating copy to clipboard operation
php-client copied to clipboard

LocalhostSplitManager provides invalid number of arguments to SplitView constructor

Open tcarrio opened this issue 3 months ago • 0 comments

Bug Report

Environment

  • Version: v7.3.0
  • Language/Platform: PHP 8.2
  • OS: macOS, Linux

Description

The SplitView class expects 8 arguments and its constructor, however the usage inside LocalhostSplitManager provide provides only six. This will be a runtime exception for local environments. This is particularly impactful for test suites that want to utilize Split flagging without a Redis instance.

Steps to Reproduce

  1. Initialize Split in localhost mode
  2. Access the manager
  3. Access the splits
  4. 💥 ArgumentCountException is thrown

Expected Behavior

Splits are safely accessed without exceptions.

Actual Behavior

Access splits in localhost mode throws exceptions.

Code Sample (if applicable)

I created a quick reproduction of the bug in the following repository: https://github.com/tcarrio/split-localhost-bug-reproduction

Disclaimer that the reproduction was scaffolded by Cursor.

I have manually modified and validated it myself. It captures the expected exception and logs so you can quickly reproduce the failure mode.

I'm using asdf so there's a .tool-versions specifying PHP 8.2. When running the project it is configured for >= 8.2 so you would need at least that set up locally. From there just composer install and composer run reproduce-bug.

tcarrio avatar Oct 24 '25 16:10 tcarrio