PHPackages                             jerome-breton/casperjs-installer - 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. jerome-breton/casperjs-installer

ActiveCustom-installer

jerome-breton/casperjs-installer
================================

A Composer package which installs the CasperJS binary for your project.

1.1-beta3(10y ago)333.3k↓100%4MITPHP

Since Jul 2Pushed 4y ago2 watchersCompare

[ Source](https://github.com/jerome-breton/casperjs-installer)[ Packagist](https://packagist.org/packages/jerome-breton/casperjs-installer)[ RSS](/packages/jerome-breton-casperjs-installer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

casperjs-installer
==================

[](#casperjs-installer)

[![Latest Stable Version](https://camo.githubusercontent.com/2ad4a03ce7c80831e69cf367ff7e3b5abaddaa9959c115f3c247111cefb08d09/68747470733a2f2f706f7365722e707567782e6f72672f6a65726f6d652d627265746f6e2f6361737065726a732d696e7374616c6c65722f762f737461626c65)](https://packagist.org/packages/jerome-breton/casperjs-installer) [![Total Downloads](https://camo.githubusercontent.com/106162c92ad3bfb90f0dfd68b07a21544141c406543ef45f47bf6c3511186858/68747470733a2f2f706f7365722e707567782e6f72672f6a65726f6d652d627265746f6e2f6361737065726a732d696e7374616c6c65722f646f776e6c6f616473)](https://packagist.org/packages/jerome-breton/casperjs-installer) [![Latest Unstable Version](https://camo.githubusercontent.com/b8616161c66d3d0e82c8633a9128a0a6c809133e38ca3d846f550d33b8518a31/68747470733a2f2f706f7365722e707567782e6f72672f6a65726f6d652d627265746f6e2f6361737065726a732d696e7374616c6c65722f762f756e737461626c65)](https://packagist.org/packages/jerome-breton/casperjs-installer) [![Build Status](https://camo.githubusercontent.com/3e259fd85e51307d19719573ac97f23d3d41fcb2f9a38491c2174dacd3337b9e/68747470733a2f2f7472617669732d63692e6f72672f6a65726f6d652d627265746f6e2f6361737065726a732d696e7374616c6c65722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/jerome-breton/casperjs-installer) [![License](https://camo.githubusercontent.com/1d02a4ae71aca1d443008ec03abc3368a9d50f57373f3f1d4483b7e11f00eae9/68747470733a2f2f706f7365722e707567782e6f72672f6a65726f6d652d627265746f6e2f6361737065726a732d696e7374616c6c65722f6c6963656e7365)](https://packagist.org/packages/jerome-breton/casperjs-installer)

A Composer package which installs the CasperJS and PhantomJS binary (Linux, Windows, Mac) into the bin path of your project.

Installation
------------

[](#installation)

To install CasperJS and PhantomJS as a local, per-project dependency to your project, simply add a dependency on `jerome-breton/casperjs-installer` to your project's `composer.json` file.

```
{
    "require": {
        "jerome-breton/casperjs-installer": "dev-master"
    },
    "scripts": {
        "post-install-cmd": [
            "CasperJsInstaller\\Installer::install"
        ],
        "post-update-cmd": [
            "CasperJsInstaller\\Installer::install"
        ]
    }
}
```

For a development dependency, change `require` to `require-dev`.

The version number of the package specifies the CasperJS version! But for now, no versions of PhantomJS are prebuilt for 1.0.\* versions, so for now, only dev-master is working, and will fetch the last 1.9.\* PhantomJS version.

The download source used is:

You can set the Composer configuration directive `bin-dir` to change the [vendor binaries](https://getcomposer.org/doc/articles/vendor-binaries.md#can-vendor-binaries-be-installed-somewhere-other-than-vendor-bin-)installation folder. **Important! Composer will install the binaries into `vendor\bin` by default.**

The `scripts` section is necessary, because currently Composer does not pass events to the handler scripts of dependencies. If you leave it away, you might execute the installer manually.

Now, assuming that the scripts section is set up as required, CasperJS and PhantomJS binary will be installed into the bin folder and updated alongside the project's Composer dependencies.

How does this work internally?
------------------------------

[](#how-does-this-work-internally)

1. **Fetching the CasperJS Installer**In your composer.json you require the package "casperjs-installer". The package is fetched by composer and stored into `./vendor/jerome-breton/casperjs-installer`. It contains only one file the `CasperJsInstaller\\Installer`.
2. **Fetching PhantomJS**This installer depends on [jakoch/phantomjs-installer](https://github.com/jakoch/phantomjs-installer) to install PhantomJS and follows the same strategy. This project has been created with major part of Jakoch work. The CasperJsInstaller will call Jakoch's `PhantomJSInstaller\\Installer`.
3. **Platform-specific download of PhantomJS**The `PhantomInstaller\\Installer` is run as a "post-install-cmd". That's why you need the "scripts" section in your "composer.json". The installer creates a new composer in-memory package "casperjs" and downloads the correct Phantom version to the folder `./vendor/jerome-breton/casperjs`. All CasperJS files reside there, especially the `samples`.
4. **Installation into bin folder**A launcher is created to declare PhantomJS path and launch CasperJS from `./vendor/jerome-breton/casperjs` to your composer configured `bin-dir` folder.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84.6% 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

Unknown

Total

1

Last Release

3964d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/25daa1874cf87939a1cd03d578f88f6b6a91f7d25324956ce827c2ed3df3d2bd?d=identicon)[jerome-breton](/maintainers/jerome-breton)

---

Top Contributors

[![jerome-breton](https://avatars.githubusercontent.com/u/1228857?v=4)](https://github.com/jerome-breton "jerome-breton (11 commits)")[![rjsmelo](https://avatars.githubusercontent.com/u/464493?v=4)](https://github.com/rjsmelo "rjsmelo (1 commits)")[![xorti](https://avatars.githubusercontent.com/u/1307414?v=4)](https://github.com/xorti "xorti (1 commits)")

---

Tags

headlessphantomjsbinariescasperJs

### Embed Badge

![Health badge](/badges/jerome-breton-casperjs-installer/health.svg)

```
[![Health](https://phpackages.com/badges/jerome-breton-casperjs-installer/health.svg)](https://phpackages.com/packages/jerome-breton-casperjs-installer)
```

###  Alternatives

[jakoch/phantomjs-installer

A Composer package which installs the PhantomJS binary (Linux, Windows, Mac) into `/bin` of your project.

1515.4M72](/packages/jakoch-phantomjs-installer)[jcalderonzumba/mink-phantomjs-driver

PhantomJS driver for Mink framework

15910.9M63](/packages/jcalderonzumba-mink-phantomjs-driver)[jcalderonzumba/gastonjs

PhantomJS API based server for webpage automation

13111.1M72](/packages/jcalderonzumba-gastonjs)[site5/phantoman

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

481.1M17](/packages/site5-phantoman)[urlbox/screenshots

Use urlbox to easily generate website thumbnail screenshots from a URL

14250.4k](/packages/urlbox-screenshots)

PHPackages © 2026

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