-
Notifications
You must be signed in to change notification settings - Fork 15
Description
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
- Initialize Split in localhost mode
- Access the manager
- Access the splits
- 💥 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.