Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

1.3 #358

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

1.3 #358

Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added a safeguard for the Goutte version in MinkGoutteDriver
MinkGoutteDriver 1.2 will be compatible with both Goutte 1.x and Goutte
2.x, but MinkExtension 1.3 only supports configuring Goutte 1.x. Upgrading
to Goutte 2.x will be possible only when using MinkExtension 2.0.
  • Loading branch information
stof committed May 15, 2014

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit b885b9407cba50a954f72c69ed1b2f8d3bc694f8
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@
},

"require-dev": {
"fabpot/goutte": "~1.0",
"behat/mink-goutte-driver": "~1.0"
},

7 changes: 7 additions & 0 deletions src/Behat/MinkExtension/Extension.php
Original file line number Diff line number Diff line change
@@ -53,6 +53,13 @@ public function load(array $config, ContainerBuilder $container)
);
}

$refl = new \ReflectionParameter(array('Goutte\Client', 'setClient'), 0);
if (!$refl->getClass() || 'Guzzle\Http\ClientInterface' !== $refl->getClass()->getName()) {
throw new \RuntimeException(
'MinkExtension 1.3 only supports Goutte 1.x for MinkGoutteDriver, not Goutte 2.x.'
);
}

$loader->load('sessions/goutte.xml');
}
if (isset($config['sahi'])) {