Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Mink Goutte Driver

Mink Goutte Driver Laravel Package

behat/mink-goutte-driver

Deprecated Mink driver for the Goutte browser client, enabling fast, headless HTTP-based browsing and DOM interaction in Behat/Mink tests. Use for simple crawling/navigation without JavaScript; superseded by behat/mink-browserkit-driver.

View on GitHub
Deep Wiki
Context7

Goutte driver for Mink framework

Frequently asked questions about Mink Goutte Driver
Can I use behat/mink-goutte-driver in Laravel for scraping external APIs or websites in tests?
Yes, this driver enables Goutte-based scraping in Laravel tests, but it’s deprecated. For new projects, prefer Symfony’s BrowserKit via `behat/mink-browserkit-driver` or Laravel’s native HTTP client. Goutte lacks JavaScript support, so it won’t work for dynamic content.
How do I install behat/mink-goutte-driver in a Laravel project?
Run `composer require behat/mink-goutte-driver:^2.0 behat/mink:^1.9` and configure Mink sessions in your test classes. Note: This requires PHP 7.2+ and Laravel 7+ compatibility. Avoid mixing with `behat/mink-browserkit-driver` to prevent conflicts.
Is behat/mink-goutte-driver compatible with Laravel’s testing helpers (e.g., TestCase, HttpTests)?
No, this package is standalone and requires manual Mink session setup. It won’t integrate natively with Laravel’s `TestCase` or `HttpTests`. Use it only for Goutte-specific scraping tasks, not as a replacement for Laravel’s built-in testing tools.
Why is behat/mink-goutte-driver deprecated, and should I still use it in Laravel?
Goutte is deprecated in favor of Symfony’s BrowserKit, and this driver hasn’t seen updates since 2021. Use it only for legacy BDD tests or if you rely on Goutte’s specific features. For new projects, migrate to `behat/mink-browserkit-driver` or Laravel’s HTTP client.
Will behat/mink-goutte-driver work with Laravel’s service container or dependency injection?
No, this package doesn’t integrate with Laravel’s service container. You’ll need to manually instantiate Mink sessions in your test classes. For Laravel-specific testing, consider `laravel/browser-kit-testing` or Pest instead.
Can I use behat/mink-goutte-driver for testing JavaScript-heavy SPAs in Laravel?
No, Goutte is headless and lacks JavaScript execution. For SPAs, use Laravel Dusk, Playwright, or Puppeteer. This driver is only for static HTML scraping or simple navigation without JS.
Are there alternatives to behat/mink-goutte-driver for scraping in Laravel?
Yes, consider `spatie/browsershot` for PDF/HTML snapshots, `symfony/browser-kit` via `behat/mink-browserkit-driver`, or Laravel’s `Http::get()` for API scraping. Avoid this package for new projects due to its deprecated status.
How do I configure behat/mink-goutte-driver in Laravel’s phpunit.xml?
You can’t directly configure it in `phpunit.xml`—this package requires manual setup in test classes. Add autoloading for Mink/Goutte in `composer.json` and initialize sessions in your test classes using the example from the README.
Does behat/mink-goutte-driver support Laravel’s caching (e.g., config, routes) in tests?
No, this package operates independently of Laravel’s caching systems. If your tests rely on cached routes or config, ensure they’re refreshed before running Mink sessions, as Goutte won’t interact with Laravel’s cache.
What’s the migration path from behat/mink-goutte-driver to behat/mink-browserkit-driver in Laravel?
Replace `GoutteDriver` with `BrowserKitDriver` in your test classes and update dependencies to `behat/mink-browserkit-driver`. Replace Goutte-specific selectors with BrowserKit’s methods. Test thoroughly, as BrowserKit uses Symfony’s HTTP client under the hood.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource