Closed kbond closed 2 years ago
I recently added the ability to pass options to the test browser factory methods (https://github.com/zenstruck/browser/commit/79e8130d5752dd9ccc688e61de02a8b0252fe7ea):
protected function pantherBrowser(array $options = [], array $kernelOptions = [], array $managerOptions = []): PantherBrowser protected function httpBrowser(array $kernelOptions = [], array $pantherOptions = []): HttpBrowser protected function kernelBrowser(array $options = []): KernelBrowser
I find all these different options confusing - what about just a single $options array for each:
protected function pantherBrowser(array $options = []): PantherBrowser protected function httpBrowser(array $options = []): HttpBrowser protected function kernelBrowser(array $options = []): KernelBrowser
The single $options could be passed to each place it's needed. I don't think there would be any issues with key conflicts or extra keys.
$options
Decided to not do this. But #75 adds some docblocks to help with documentation.
I recently added the ability to pass options to the test browser factory methods (https://github.com/zenstruck/browser/commit/79e8130d5752dd9ccc688e61de02a8b0252fe7ea):
I find all these different options confusing - what about just a single $options array for each:
The single
$options
could be passed to each place it's needed. I don't think there would be any issues with key conflicts or extra keys.