Skip to content

Commit

Permalink
Document the new Composer integration method.
Browse files Browse the repository at this point in the history
Closes #1
  • Loading branch information
paragonie-security committed Oct 30, 2018
1 parent 97ff57e commit d3e2777
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docs/features/RemoteFetch.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,30 @@ $data = file_get_contents(
);
```

#### Composer Integration

**Since version 2.2.0.**

You can have Certainty request an up-to-date bundle at runtime by ensuring
you add this entry to your composer.json file:

```json
{
"scripts": {
"post-autoload-dump": [
"ParagonIE\\Certainty\\Composer::postAutoloadDump"
]
}
}
```

Then, you can simply use the local `Fetch` class instead of `RemoteFetch` in
your application code. Every time you run `composer update`, it will fetch
the latest bundles from Certainty.

This is a great way to reduce your runtime performance overhead while
guaranteeing that you have the latest CACert bundle.

### Changing the Path or URL

By default, Certainty's `RemoteFetch` feature pulls from Github and uses the most recent CA-Cert
Expand Down

0 comments on commit d3e2777

Please sign in to comment.