PHPackages                             pma987/test2 - 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. pma987/test2

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

pma987/test2
============

Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.

1.2.9(5y ago)04MITPHPPHP ^5.3.2 || ^7.0 || ^8.0

Since Apr 11Pushed 4y ago1 watchersCompare

[ Source](https://github.com/pma87/test2)[ Packagist](https://packagist.org/packages/pma987/test2)[ RSS](/packages/pma987-test2/feed)WikiDiscussions main Synced 4d ago

READMEChangelogDependencies (4)Versions (26)Used By (0)

composer/ca-bundle
==================

[](#composerca-bundle)

Small utility library that lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.

Originally written as part of [composer/composer](https://github.com/composer/composer), now extracted and made available as a stand-alone library.

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

[](#installation)

Install the latest version with:

```
$ composer require composer/ca-bundle
```

Requirements
------------

[](#requirements)

- PHP 5.3.2 is required but using the latest version of PHP is highly recommended.

Basic usage
-----------

[](#basic-usage)

### `Composer\CaBundle\CaBundle`

[](#composercabundlecabundle)

- `CaBundle::getSystemCaRootBundlePath()`: Returns the system CA bundle path, or a path to the bundled one as fallback
- `CaBundle::getBundledCaBundlePath()`: Returns the path to the bundled CA file
- `CaBundle::validateCaFile($filename)`: Validates a CA file using openssl\_x509\_parse only if it is safe to use
- `CaBundle::isOpensslParseSafe()`: Test if it is safe to use the PHP function openssl\_x509\_parse()
- `CaBundle::reset()`: Resets the static caches

#### To use with curl

[](#to-use-with-curl)

```
$curl = curl_init("https://example.org/");

$caPathOrFile = \Composer\CaBundle\CaBundle::getSystemCaRootBundlePath();
if (is_dir($caPathOrFile)) {
    curl_setopt($curl, CURLOPT_CAPATH, $caPathOrFile);
} else {
    curl_setopt($curl, CURLOPT_CAINFO, $caPathOrFile);
}

$result = curl_exec($curl);
```

#### To use with php streams

[](#to-use-with-php-streams)

```
$opts = array(
    'http' => array(
        'method' => "GET"
    )
);

$caPathOrFile = \Composer\CaBundle\CaBundle::getSystemCaRootBundlePath();
if (is_dir($caPathOrFile)) {
    $opts['ssl']['capath'] = $caPathOrFile;
} else {
    $opts['ssl']['cafile'] = $caPathOrFile;
}

$context = stream_context_create($opts);
$result = file_get_contents('https://example.com', false, $context);
```

#### To use with Guzzle

[](#to-use-with-guzzle)

```
$client = new \GuzzleHttp\Client([
    \GuzzleHttp\RequestOptions::VERIFY => \Composer\CaBundle\CaBundle::getSystemCaRootBundlePath()
]);
```

License
-------

[](#license)

composer/ca-bundle is licensed under the MIT License, see the LICENSE file for details.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor1

Top contributor holds 51.2% 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 ~72 days

Recently: every ~99 days

Total

25

Last Release

1949d ago

PHP version history (2 changes)1.0.0PHP ^5.3.2 || ^7.0

1.2.0PHP ^5.3.2 || ^7.0 || ^8.0

### Community

Maintainers

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

---

Top Contributors

[![Seldaek](https://avatars.githubusercontent.com/u/183678?v=4)](https://github.com/Seldaek "Seldaek (62 commits)")[![exussum12](https://avatars.githubusercontent.com/u/1102850?v=4)](https://github.com/exussum12 "exussum12 (11 commits)")[![garas](https://avatars.githubusercontent.com/u/2265694?v=4)](https://github.com/garas "garas (6 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (6 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (5 commits)")[![adv-mponomarev](https://avatars.githubusercontent.com/u/141914723?v=4)](https://github.com/adv-mponomarev "adv-mponomarev (4 commits)")[![JanPetterMG](https://avatars.githubusercontent.com/u/11933090?v=4)](https://github.com/JanPetterMG "JanPetterMG (4 commits)")[![carusogabriel](https://avatars.githubusercontent.com/u/16328050?v=4)](https://github.com/carusogabriel "carusogabriel (3 commits)")[![1ma](https://avatars.githubusercontent.com/u/1456708?v=4)](https://github.com/1ma "1ma (2 commits)")[![alcohol](https://avatars.githubusercontent.com/u/21414?v=4)](https://github.com/alcohol "alcohol (2 commits)")[![andreybolonin](https://avatars.githubusercontent.com/u/2576509?v=4)](https://github.com/andreybolonin "andreybolonin (2 commits)")[![jyggen](https://avatars.githubusercontent.com/u/264300?v=4)](https://github.com/jyggen "jyggen (2 commits)")[![tgalopin](https://avatars.githubusercontent.com/u/1651494?v=4)](https://github.com/tgalopin "tgalopin (2 commits)")[![Iandenh](https://avatars.githubusercontent.com/u/2911923?v=4)](https://github.com/Iandenh "Iandenh (1 commits)")[![Deuchnord](https://avatars.githubusercontent.com/u/7600265?v=4)](https://github.com/Deuchnord "Deuchnord (1 commits)")[![stof](https://avatars.githubusercontent.com/u/439401?v=4)](https://github.com/stof "stof (1 commits)")[![darenas31415](https://avatars.githubusercontent.com/u/16238028?v=4)](https://github.com/darenas31415 "darenas31415 (1 commits)")[![reedy](https://avatars.githubusercontent.com/u/67615?v=4)](https://github.com/reedy "reedy (1 commits)")[![rhukster](https://avatars.githubusercontent.com/u/1084697?v=4)](https://github.com/rhukster "rhukster (1 commits)")[![AnrDaemon](https://avatars.githubusercontent.com/u/6532485?v=4)](https://github.com/AnrDaemon "AnrDaemon (1 commits)")

---

Tags

certificatetlssslcabundlecacert

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/pma987-test2/health.svg)

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

###  Alternatives

[composer/ca-bundle

Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.

3.0k346.2M191](/packages/composer-ca-bundle)[paragonie/certainty

Up-to-date, verifiable repository for Certificate Authorities

2642.4M20](/packages/paragonie-certainty)[kelunik/certificate

Access certificate details and transform between different formats.

10938.3M8](/packages/kelunik-certificate)[kelunik/acme

ACME library written in PHP.

121603.9k3](/packages/kelunik-acme)[kelunik/acme-client

Let's Encrypt / ACME client written in PHP for the CLI.

3933.9k1](/packages/kelunik-acme-client)[sop/crypto-encoding

A PHP implementation of textual encodings of cryptographic structures.

161.4M27](/packages/sop-crypto-encoding)

PHPackages © 2026

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