symfony/panther: browser testing and web scraping for PHP
A browser testing and web crawling library for PHP and Symfony
At a glance
- What is it?
- Panther drives real Chrome and Firefox over the W3C WebDriver protocol so PHP tests and scrapers run against a genuine browser. The README is thin on setup, and the real documentation lives on the Symfony site.
- Who is it for?
- Adopt Panther when your PHP project needs assertions on rendered DOM, JavaScript execution or real navigation, and when you can run Chrome or Firefox plus a matching driver in the same environment as PHPUnit. Skip it if your tests only exercise HTTP responses or your CI cannot host a browser.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 118 days ago.
- What is it written in?
- Mainly PHP, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What Panther is for, and who actually needs it
Panther is a standalone PHP library for two jobs: scraping websites and running end-to-end tests against real browsers. The README describes it as a library that drives native browsers such as Google Chrome and Firefox through the W3C WebDriver protocol. That protocol choice matters more than the marketing line. Panther does not ship its own rendering engine or a headless DOM emulator. When a test clicks a button, a real browser process receives the command.
The audience is narrow but well defined. If you write PHP and your test suite currently asserts on HTTP status codes and response bodies, Panther does not replace that. It covers the layer above: the DOM after JavaScript has run, the state of a form after client-side validation, the URL after a redirect chain. Teams that already use Symfony's test tooling get the most out of it, because Panther is maintained inside the Symfony organisation and the official documentation sits in the Symfony testing guide rather than in the repository.
The scraping use case is the same mechanism pointed at a different target. The README lists scraping and end-to-end testing together, and the topics on the repository include scraping and e2e-testing. Nothing in the README separates the two modes, so the practical difference is what you assert on: a test asserts, a scraper extracts.
The WebDriver mechanism behind every Panther call
Panther is built on top of PHP WebDriver, which is the client library that speaks the W3C WebDriver wire protocol. The README credits PHP WebDriver and several other FOSS libraries, and says Panther was inspired by Nightwatch.js, a WebDriver-based testing tool for JavaScript. The architecture is therefore three layers: your PHP test or script, the PHP WebDriver client that Panther wraps, and an external browser driver process that the client talks to over HTTP.
That third layer is the part people underestimate. Panther does not bundle Chrome or Firefox, and it does not bundle the driver binaries that control them. The repository topics list chromedriver and selenium, which tells you which external pieces the project expects to be present. The consequence is that a Panther run has more moving parts than a unit test run: the PHP process, the driver process, and the browser process all have to be alive and agree on a session.
Because the protocol is standard, the browser is interchangeable in principle. The README names Chrome and Firefox specifically. It does not document a supported version matrix for either, so pinning browser and driver versions is left to whoever operates the environment.
Installing symfony/panther and running a first script
The README does not contain installation steps. It points to the Symfony end-to-end testing documentation as the place to start, and the repository is a Composer package, so the package name is the entry point. The examples directory contains a single file, examples/basic.php, which is the smallest runnable thing in the repository. The README does not print its contents, so treat the file itself as the reference rather than any snippet quoted elsewhere.
Install the library with Composer from your project root. The README gives no version constraint, and the repository's composer.json is the package manifest that declares the name symfony/panther:
{
"require": {
"symfony/panther": "^2.0"
}
}That snippet reflects how the package is declared in a Composer manifest. The README does not supply a version constraint of its own, so let Composer resolve the current release when you add it.
A browser and its driver must exist separately. The topics list chromedriver, and the README names Chrome and Firefox as the browsers Panther drives, but neither the README nor the repository listing documents how to install or start those binaries. That step belongs to your environment, not to Composer.
With the package present, the first real use is a script that opens a page and reads the rendered DOM. The README does not publish a code sample, so open examples/basic.php in the repository and follow it. What you should see when it runs is a browser process starting, a session being created, and the page content coming back to PHP. If nothing happens, the failure is almost always the driver endpoint rather than Panther's PHP code, because Panther has no browser of its own to fall back on.
Where Panther is the wrong tool
The clearest limitation is environmental. Panther needs a real browser and a driver process. Anywhere that is awkward, Panther is awkward: a minimal CI container with no browser, a shared host where you cannot run a background process, a machine where you cannot install chromedriver. A test suite that only checks routing, serialization or database state gains nothing from a browser and pays the startup cost of one.
The second limitation is documentation depth in the repository itself. The README is short. It links out to the Symfony documentation for end-to-end testing, points contributors at the main Symfony repository for issues and pull requests, and credits the libraries Panther is built on. It does not document rollback, retries, timeouts, parallel execution or a supported browser version matrix. If you need those answers, the README is silent and you will be reading the Symfony testing guide or the source under src/.
The third is that Panther is a client, not a test framework. It gives you a way to drive a browser from PHP. Assertions, fixtures, setup and teardown come from whatever test runner you already use. Teams expecting a batteries-included browser testing product will find less here than the name suggests.
Panther against HTTP-level PHP testing
The realistic alternative for most PHP teams is not another browser driver but the HTTP-level testing tools they already run, where a request is dispatched inside the PHP process and the response object is asserted directly. That approach is faster and has no external dependencies. It is also blind to anything the browser does: JavaScript that mutates the DOM, client-side routing, third-party scripts, and the actual rendered markup a user sees.
The difference in approach is where the boundary sits. An HTTP-level test stops at the response. Panther starts a browser session and continues from there, at the cost of a driver process and a browser process per run. Choosing between them is a question of what your bug reports look like. If defects arrive as "the form does not submit" or "the page is blank after load", HTTP-level tests will keep passing while users see the failure, and Panther is the tool that reproduces it.
Panther's own lineage points the same way. It was inspired by Nightwatch.js, a WebDriver-based tool from the JavaScript world, and it reuses the same protocol rather than inventing a PHP-specific one. That means the mental model transfers if your team has written Selenium or WebDriver tests before, and it means Panther inherits the operational weight of that model.
Maintenance, release cadence and the MIT licence
The repository is not archived, and the last push was on 2026-06-04. Release tags are spaced rather than continuous: v2.2.0 on 2025-01-30, v2.3.0 on 2025-11-21, and v2.4.0 on 2026-01-08. That is a slow, deliberate cadence, which is normal for a library whose surface is a protocol client. Plan upgrades around tagged releases rather than around the main branch.
The upgrade cost is dominated by the external pieces, not by Panther's PHP code. A new Chrome or Firefox version can change driver behaviour without any Composer change on your side, so a green suite can go red after a browser update. Panther's own version bumps are the smaller risk. The repository ships phpunit.xml.dist plus phpunit.xml.dist.10 and phpunit.xml.dist.11, which indicates the project tests against more than one PHPUnit major version and therefore takes its own compatibility surface seriously.
Licensing is MIT, stated in the repository's LICENSE file and in the package metadata. MIT is permissive: it allows commercial and closed-source use with the licence and copyright notice retained. Panther depends on PHP WebDriver and other FOSS libraries, each with its own licence, so a legal review of the dependency tree is a separate exercise. Nothing here is legal advice.
Editorial conclusion
Adopt Panther when your PHP project needs assertions on rendered DOM, JavaScript execution or real navigation, and when you can run Chrome or Firefox plus a matching driver in the same environment as PHPUnit. Skip it if your tests only exercise HTTP responses or your CI cannot host a browser. Verify first that the WebDriver endpoint responds before your suite starts, and check the documented Symfony end-to-end testing page for the current setup steps, because the README itself does not describe installation.
Frequently asked questions
Does symfony/panther include a browser?
No. Panther drives native browsers such as Chrome and Firefox over the W3C WebDriver protocol, and the repository topics list chromedriver and selenium, so the browser and its driver are external pieces you provide.
How do I install symfony/panther?
It is a Composer package, so it is added to your project's Composer manifest and installed with Composer. The README does not include installation steps and points to the Symfony end-to-end testing documentation instead.
Can symfony/panther be used for web scraping as well as testing?
Yes. The README describes it as a library to scrape websites and to run end-to-end tests using real browsers, and the repository topics include both scraping and e2e-testing.
What is symfony/panther built on?
The README states it is built on top of PHP WebDriver and several other FOSS libraries, and that it was inspired by Nightwatch.js, a WebDriver-based testing tool for JavaScript.
Is symfony/panther still maintained?
The repository is not archived and the last push was on 2026-06-04. The most recent tagged release listed is v2.4.0 from 2026-01-08.
Where do I report a bug in symfony/panther?
The README directs issues and pull requests to the main Symfony repository rather than to the Panther repository.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/symfony-panther)