Skip to content

Commit 94f4a09

Browse files
Update BrowserFactory.php
1 parent 8de6ff1 commit 94f4a09

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/BrowserFactory.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,13 @@ class BrowserFactory
5050
*/
5151
protected $options = [];
5252

53+
protected $envOptions = [];
54+
5355
public function __construct(?string $chromeBinary = null)
5456
{
5557
$autoDiscover = new AutoDiscover();
5658
$this->chromeBinary = $chromeBinary ?? $autoDiscover->guessChromeBinaryPath();
57-
$this->options = \array_merge($this->options, $autoDiscover->getDefaultOptions());
59+
$this->envOptions = $autoDiscover->getDefaultOptions();
5860
}
5961

6062
/**
@@ -68,7 +70,7 @@ public function __construct(?string $chromeBinary = null)
6870
*/
6971
public function createBrowser(?array $options = null): ProcessAwareBrowser
7072
{
71-
$options = \array_merge($this->options, $options ?? []);
73+
$options = \array_merge($this->envOptions, $this->options, $options ?? []);
7274

7375
// create logger from options
7476
$logger = self::createLogger($options);

0 commit comments

Comments
 (0)