PHPackages                             site5/phantoman - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. site5/phantoman

ActiveLibrary[Testing &amp; Quality](/categories/testing)

site5/phantoman
===============

The Codeception extension for automatically starting and stopping PhantomJS when running tests.

v2.0.1(8y ago)481.1M↓18.6%24[1 issues](https://github.com/grantlucas/phantoman/issues)[3 PRs](https://github.com/grantlucas/phantoman/pulls)17MITPHPPHP &gt;=5.4.0

Since Jul 25Pushed 3y ago13 watchersCompare

[ Source](https://github.com/grantlucas/phantoman)[ Packagist](https://packagist.org/packages/site5/phantoman)[ Docs](https://github.com/grantlucas/phantoman)[ RSS](/packages/site5-phantoman/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (24)Used By (17)

Phantoman
=========

[](#phantoman)

[![Latest Version](https://camo.githubusercontent.com/4fc9ec0b472ac68d71e7e4cab10709f44ece00444a6df1511171a43d7a05ce80/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73697465352f7068616e746f6d616e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/site5/phantoman)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Total Downloads](https://camo.githubusercontent.com/c83df1538cced13b6b5a945bb680131742f64f4a5d8d55ad5e3f890b221a063a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73697465352f7068616e746f6d616e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/site5/phantoman)

The [Codeception](http://codeception.com/) extension for automatically starting and stopping [PhantomJS](http://phantomjs.org/) when running tests.

Minimum Requirements
--------------------

[](#minimum-requirements)

- Codeception 2.2.7
- PHP 5.4

Installation using [Composer](https://getcomposer.org)
------------------------------------------------------

[](#installation-using-composer)

```
$ composer require site5/phantoman
```

Be sure to enable the extension in `codeception.yml` as shown in [configuration](#configuration) below.

Recommended Additional Packages
-------------------------------

[](#recommended-additional-packages)

### PhantomJS Installer via Composer

[](#phantomjs-installer-via-composer)

It is highly recommended that you use the [PhantomJS Installer](https://github.com/jakoch/phantomjs-installer) package which will install PhantomJS locally to your project in `vendor/bin`. Please follow the [installation instructions](https://github.com/jakoch/phantomjs-installer#installation)provided.

**Phantoman uses `vendor/bin/phantomjs` by default. If any other installation of PhantomJS is used, please set the path as shown in the configuration below.**

Configuration
-------------

[](#configuration)

By default Phantoman will use the path `vendor/bin/phantomjs` and port `4444`.

Enabling and configuration can be done in `codeception.yml` or in your suite config file.

### Enabling Phantoman with defaults

[](#enabling-phantoman-with-defaults)

```
extensions:
    enabled:
        - Codeception\Extension\Phantoman
```

### Enabling Phantoman with alternate settings

[](#enabling-phantoman-with-alternate-settings)

```
extensions:
    enabled:
        - Codeception\Extension\Phantoman
    config:
        Codeception\Extension\Phantoman:
            path: '/usr/bin/phantomjs'
            port: 4445
            suites: ['acceptance']
```

### Enabling Phantoman in the acceptance suite except on the `ci` environment

[](#enabling-phantoman-in-the-acceptance-suite-except-on-the-ci-environment)

```
extensions:
  enabled:
    - Codeception\Extension\Phantoman:
        suites: ['acceptance']
env:
  ci:
    extensions:
      enabled:
        - Codeception\Extension\Phantoman:
            suites: []
```

### Available options

[](#available-options)

Options set in the Phantoman configuration are mapped to [PhantomJS CLI options](http://phantomjs.org/api/command-line.html). The currently supported options are listed below.

#### Basic

[](#basic)

- `path: {path}`
    - Full path to the PhantomJS binary.
    - Default: `vendor/bin/phantomjs`
- `port: {port}`
    - Webdriver port to start PhantomJS with.
    - Default: `4444`
- `debug: {true|false}`
    - Display debug output while Phantoman runs
    - Default: `false`

#### Proxy Support

[](#proxy-support)

- `proxy: {address:port}`
    - Sets the proxy server.
- `proxyType: {[http|socks5|none]}`
    - Specifies the proxy type.
- `proxyAuth: {username:password}`
    - Provides authentication information for the proxy.

#### Other

[](#other)

- `suites: {array|string}`
    - If omitted, PhantomJS is started for all suites.
    - Specify an array of suites or a single suite name.
- `webSecurity: {true|false}`
    - Enables web security
- `ignoreSslErrors: {true|false}`
    - Ignores errors in the SSL validation.
    - Defaults to `false`
- `sslProtocol: {sslv3|sslv2|tlsv1|any}`
    - Sets the SSL protocol for secure connections
    - Defaults to `sslv3`
- `sslCertificatesPath: {path}`
    - Sets the location for custom CA certificates (if none set, uses system default).
- `remoteDebuggerPort: {port}`
    - Starts PhantomJS in a debug harness and listens on the specified port
- `remoteDebuggerAutorun: {true|false}`
    - Runs the script in the debugger immediately
    - Defaults to `false`
- `cookiesFile: {file path}`
    - Sets the file name to store the persistent cookies
- `diskCache: {true|false}`
    - Enabled disk cache
    - Defaults to `false`
- `maxDiskCacheSize: {number}`
    - Limit the size of the disk cache in KB
- `loadImages: {true|false}`
    - Loads all inlined images
    - Defaults to `true`
- `localStoragePath: {file path}`
    - The path to save LocalStorage content and WebSQL content
- `localStorageQuota: {number}`
    - Maximum size to allow for data in local storage in KB
- `localToRemoteUrlAccess: {true|false}`
    - Allows local content to access remote URL
    - Defaults to `false`
- `outputEncoding: {encoding}`
    - Sets the encoding for the terminal output
    - Default is `utf8`
- `scriptEncoding: {encoding}`
    - Sets the encoding used for starting the script
    - Default is `utf8`
- `silent: {true|false}`
    - Suppresses messages about starting and stopping the server
    - Default is `false`
- `webdriverLoglevel: {ERROR|WARN|INFO|DEBUG)}`
    - WebDriver Logging Level
    - Defaults to `INFO`
- `webdriverLogfile: {path}`
    - File where to write the WebDriver’s Log

Usage
-----

[](#usage)

Once installed and enabled, running your tests with `php codecept run` will automatically start the PhantomJS server and wait for it to be accessible before proceeding with the tests.

```
Starting PhantomJS Server.
Waiting for the PhantomJS server to be reachable..
PhantomJS server now accessible.
```

Once the tests are complete, PhantomJS will be shut down.

```
Stopping PhantomJS Server.
```

Contributing
------------

[](#contributing)

This repository makes use of [EditorConfig](https://editorconfig.org/) to ensure code style consistency across editors. Please be sure to either have an EditorConfig plugin installed for your desire editor or ensure that all indenting is 4 space indenting with linux line endings.

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity51

Moderate usage in the ecosystem

Community36

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 71.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~62 days

Recently: every ~112 days

Total

20

Last Release

3125d ago

Major Versions

v1.1.7 → v2.0.02017-08-06

### Community

Maintainers

![](https://www.gravatar.com/avatar/41b959aa5242becaaeb7326c76f1f602feca4f6400703cf546b33e615f9f9ae7?d=identicon)[grantlucas](/maintainers/grantlucas)

![](https://www.gravatar.com/avatar/f0ffaadfaacdc25198be75d2f24d51bc92b54ced570db0f33beea648be4754fe?d=identicon)[jmazzi](/maintainers/jmazzi)

---

Top Contributors

[![grantlucas](https://avatars.githubusercontent.com/u/215729?v=4)](https://github.com/grantlucas "grantlucas (50 commits)")[![oblogic7](https://avatars.githubusercontent.com/u/453840?v=4)](https://github.com/oblogic7 "oblogic7 (5 commits)")[![boone](https://avatars.githubusercontent.com/u/6807?v=4)](https://github.com/boone "boone (3 commits)")[![itspriddle](https://avatars.githubusercontent.com/u/49571?v=4)](https://github.com/itspriddle "itspriddle (3 commits)")[![tralafiti](https://avatars.githubusercontent.com/u/197687?v=4)](https://github.com/tralafiti "tralafiti (2 commits)")[![TrafeX](https://avatars.githubusercontent.com/u/415312?v=4)](https://github.com/TrafeX "TrafeX (2 commits)")[![mzahir](https://avatars.githubusercontent.com/u/539802?v=4)](https://github.com/mzahir "mzahir (1 commits)")[![newx](https://avatars.githubusercontent.com/u/17840?v=4)](https://github.com/newx "newx (1 commits)")[![apkostka](https://avatars.githubusercontent.com/u/788482?v=4)](https://github.com/apkostka "apkostka (1 commits)")[![acuthbert](https://avatars.githubusercontent.com/u/408400?v=4)](https://github.com/acuthbert "acuthbert (1 commits)")[![fortuneteller](https://avatars.githubusercontent.com/u/1685654?v=4)](https://github.com/fortuneteller "fortuneteller (1 commits)")

---

Tags

codeceptionheadlessextensionphantomjs

### Embed Badge

![Health badge](/badges/site5-phantoman/health.svg)

```
[![Health](https://phpackages.com/badges/site5-phantoman/health.svg)](https://phpackages.com/packages/site5-phantoman)
```

###  Alternatives

[jcalderonzumba/mink-phantomjs-driver

PhantomJS driver for Mink framework

15910.9M63](/packages/jcalderonzumba-mink-phantomjs-driver)[mcustiel/phiremock-codeception-extension

Codeception extension for Phiremock. Allows to stub remote services for HTTP requests.

311.0M5](/packages/mcustiel-phiremock-codeception-extension)[codeception/module-webdriver

WebDriver module for Codeception

3831.4M245](/packages/codeception-module-webdriver)[mcustiel/codeception-http-mock

Extension for HTTP Mock.

1424.3k1](/packages/mcustiel-codeception-http-mock)[docler-labs/codeception-slim-module

Codeception Module for Slim framework.

13178.0k1](/packages/docler-labs-codeception-slim-module)[kolyunya/codeception-markup-validator

Markup validator module for Codeception.

1413.8k3](/packages/kolyunya-codeception-markup-validator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
