PHPackages                             rtens/fido - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. rtens/fido

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

rtens/fido
==========

Asset fetcher for PHP

v1.0(11y ago)13MITPHPPHP &gt;=5.3

Since Oct 18Pushed 11y ago1 watchersCompare

[ Source](https://github.com/rtens/fido)[ Packagist](https://packagist.org/packages/rtens/fido)[ Docs](http://github.com/watoki/fido)[ RSS](/packages/rtens-fido/feed)WikiDiscussions master Synced 3w ago

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

\#fido [![Build Status](https://camo.githubusercontent.com/7d80f31e013e4a530c23f97138b088dbffb69381277a3e792852537aabc27ee9/68747470733a2f2f7472617669732d63692e6f72672f7274656e732f6669646f2e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/rtens/fido)

A simple [composer](https://getcomposer.org) plugin that simplifies installing packages without dependency management support (e.g. assets from URLs or git repositories).

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

[](#installation)

Because of [composer](https://getcomposer.org)'s plugin system, you need to install *fido* globally

```
composer global require "rtens/fido:~1.0"

```

(there is a [pull request](https://github.com/composer/composer/pull/3082) to fix that)

Usage
-----

[](#usage)

The requirement definitions go into the `extra` object using the ke `fido-fetch`. Here is an example with two packages.

```
"extra": {
    "fido-fetch": {
        "base-dir": "web/assets/vendor", // defaults to "assets/vendor"
        "jquery": {
            "source": "https://code.jquery.com/jquery-2.1.1.js",
            "type": "file", // optional, inferred from source
            "target": "jquery.js" // Optional, defaults to file name
        },
        "phantom.js runner": {
            "source": "https://github.com/jonkemp/qunit-phantomjs-runner.git",
            "type": "git", // optional, inferred from source
            "target": "phantomjs-runner", // Optional, defaults to repository name
            "reference": "v1.2.0" // optional, defaults to "*"
        }
    }
}
```

This can be shortened in several steps. First, by leaving out the optional definitions.

```
"extra": {
    "fido-fetch": {
        "jquery": {
            "source": "https://code.jquery.com/jquery-2.1.1.js",
        },
        "phantom.js runner": {
            "source": "https://github.com/jonkemp/qunit-phantomjs-runner.git",
        }
    }
}
```

To shorten it even more, the value of `source` can be used as package names.

```
"extra": {
    "fido-fetch": {
        "https://code.jquery.com/jquery-2.1.1.js": {},
        "https://github.com/jonkemp/qunit-phantomjs-runner.git": {}
    }
}
```

Finally, these definitions can also be put into the `require` object (including versions for git repositories) by prefixing them with `fido-fetch:`.

```
"require": {
    "fido-fetch:https://code.jquery.com/jquery-2.1.1.js": "*",
    "fido-fetch:https://github.com/jonkemp/qunit-phantomjs-runner.git": "v1.2.0"
}
```

Dev Mode
--------

[](#dev-mode)

You can also specify packages for dev-mode only using the `fetch-fido-dev` and `require-dev` objects.

Documentation
-------------

[](#documentation)

For a complete documentation, check out *fido*'s [executable documentation](http://dox.rtens.org/projects/rtens-fido)

But.. why?
----------

[](#but-why)

Convenience, mostly.

There are of course several ways to get [bootstrap](http://getbootstrap.com/), [jquery](http://jquery.com/) and their likes into your project without bundling them with it. You could use [bower](http://bower.io/) or [npm](http://nodejs.org/) for example or, if you don't like javascript, you can get the the excellent [bower/npm composer plugin](https://github.com/francoispluchino/composer-asset-plugin).

But some packages, like the [qunit-phantomjs-runner](https://github.com/jonkemp/qunit-phantomjs-runner), don't support *any* dependency management system. For these cases exists composer's [`package` type repository](https://getcomposer.org/doc/05-repositories.md#package-2) (thanks Igor for [pointing that out](https://twitter.com/igorwhiletrue/status/522406046930071552)).

Now if you would like to have these packages in another directory than `vendor`, you can either symlink to them or use the [composer-custom-directory-installer](https://github.com/mnsami/composer-custom-directory-installer) plugin which lets you decide where certain packages should be installed.

This is how the `composer.json` looks like with if you would require [bootstrap](http://getbootstrap.com/) and the [qunit-phantomjs-runner](https://github.com/jonkemp/qunit-phantomjs-runner) with this approach:

```
{
    "require": {
        "mnsami/composer-custom-directory-installer": "1.0.*",
        "jquery":"2.1.1",
        "jonkemp/qunit-phantomjs-runner":"1.1.0"
    },
    "extra": {
        "installer-paths":{
            "web/assets/jquery/jquery.js": ["jquery"],
            "web/assets/phantomjs-runner": ["jonkemp/qunit-phantomjs-runner"]
        }
    },
    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "jquery",
                "version": "2.1.1",
                "dist": {
                    "url": "https://code.jquery.com/jquery-2.1.1.js",
                    "type": "file"
                }
            }
        },
        {
            "type": "package",
            "package": {
                "name": "jonkemp/qunit-phantomjs-runner",
                "version": "1.1.0",
                "source": {
                    "url": "https://github.com/jonkemp/qunit-phantomjs-runner.git",
                    "type": "git",
                    "reference": "tags/v1.1.0"
                }
            }
        }
    ],
    "minimum-stability": "dev"
}
```

And this is actually (more or less) what *fido* compiles to, simply with a shorter, simpler syntax.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

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

4276d ago

### Community

Maintainers

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

---

Top Contributors

[![rtens](https://avatars.githubusercontent.com/u/1468866?v=4)](https://github.com/rtens "rtens (46 commits)")

---

Tags

composerassetwatoki

### Embed Badge

![Health badge](/badges/rtens-fido/health.svg)

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

###  Alternatives

[symfony/runtime

Enables decoupling PHP applications from global state

74798.8M1.0k](/packages/symfony-runtime)[ergebnis/composer-normalize

Provides a composer plugin for normalizing composer.json.

1.1k41.4M2.8k](/packages/ergebnis-composer-normalize)[fxp/composer-asset-plugin

NPM/Bower Dependency Manager for Composer

9434.8M41](/packages/fxp-composer-asset-plugin)[automattic/jetpack-autoloader

Creates a custom autoloader for a plugin or theme.

576.1M124](/packages/automattic-jetpack-autoloader)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5344.1M564](/packages/drupal-core-composer-scaffold)[mnsami/composer-custom-directory-installer

A composer plugin, to help install packages of different types in custom paths.

1465.4M62](/packages/mnsami-composer-custom-directory-installer)

PHPackages © 2026

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