PHPackages                             slam/php-p7m-reader - 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. slam/php-p7m-reader

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

slam/php-p7m-reader
===================

P7M Reader

v1.4.0(5mo ago)318.0k↓28.6%1[2 issues](https://github.com/Slamdunk/php-p7m-reader/issues)MITPHPPHP ~8.4.0 || ~8.5.0CI passing

Since Oct 7Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/Slamdunk/php-p7m-reader)[ Packagist](https://packagist.org/packages/slam/php-p7m-reader)[ Fund](https://paypal.me/filippotessarotto)[ GitHub Sponsors](https://github.com/Slamdunk)[ RSS](/packages/slam-php-p7m-reader/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (16)Used By (0)

Slam P7M Reader
===============

[](#slam-p7m-reader)

[![Latest Stable Version](https://camo.githubusercontent.com/8064fa7ef6d2cf8f0398bee7013777a4544485cc1feed937a9fe6a4eed911ae3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736c616d2f7068702d70376d2d7265616465722e737667)](https://packagist.org/packages/slam/php-p7m-reader)[![Downloads](https://camo.githubusercontent.com/ce0cb7fff9ec0de00b24af13c26d92422bd4a17ad667c7eb2b9d78da2a9c14d0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736c616d2f7068702d70376d2d7265616465722e737667)](https://packagist.org/packages/slam/php-p7m-reader)[![Integrate](https://github.com/Slamdunk/php-p7m-reader/workflows/CI/badge.svg)](https://github.com/Slamdunk/php-p7m-reader/actions)[![Code Coverage](https://camo.githubusercontent.com/925a052468ca231ae5c37d238c2a1033985ec2843f7c057fc8b54cf8664eef4a/68747470733a2f2f636f6465636f762e696f2f67682f536c616d64756e6b2f7068702d70376d2d7265616465722f636f7665726167652e737667)](https://codecov.io/gh/Slamdunk/php-p7m-reader)

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

[](#installation)

`composer require slam/php-p7m-reader`

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

[](#requirements)

1. `openssl` binary
2. `ext-openssl`

Usage
-----

[](#usage)

*WARNING*: the signature is verified, but the validity of the certificate it is not!

```
$p7mReader = \Slam\P7MReader\P7MReader::decodeFromFile(
    new \SplFileObject('/path/to/my.xml.p7m'),
    __DIR__ . '/tmp'    // Optional custom temporary directory, defaults to sys_get_temp_dir()
);
// OR
$p7mReader = \Slam\P7MReader\P7MReader::decodeFromBase64(
    'Abc==',            // base64 encoded content file
    __DIR__ . '/tmp'    // Optional custom temporary directory, defaults to sys_get_temp_dir()
);

var_dump($p7mReader->getP7mFile());     // string:        The original P7M file
var_dump($p7mReader->getContentFile()); // SplFileObject: The signed content
var_dump($p7mReader->getCertFile());    // SplFileObject: The certificate
var_dump($p7mReader->getCertData());    // array:         Certificate data in openssl_x509_parse output format
```

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance68

Regular maintenance activity

Popularity30

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity83

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 83.7% 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 ~187 days

Total

13

Last Release

168d ago

Major Versions

v0.4.0 → v1.0.02023-11-22

PHP version history (8 changes)v0.1.0PHP ^7.1

v0.2.0PHP ^7.3

v0.3.3PHP ^7.4 || ^8.0

v0.3.4PHP ~8.0.0 || ~8.1.0

v0.4.0PHP ~8.1.0 || ~8.2.0

v1.0.0PHP ~8.2.0 || ~8.3.0

v1.2.0PHP ~8.3.0 || ~8.4.0

v1.3.0PHP ~8.4.0 || ~8.5.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/50348?v=4)[Sahn Lam](/maintainers/Slam)[@slam](https://github.com/slam)

---

Top Contributors

[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (215 commits)")[![Slamdunk](https://avatars.githubusercontent.com/u/152236?v=4)](https://github.com/Slamdunk "Slamdunk (41 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

opensslp7mphppkcs7

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/slam-php-p7m-reader/health.svg)

```
[![Health](https://phpackages.com/badges/slam-php-p7m-reader/health.svg)](https://phpackages.com/packages/slam-php-p7m-reader)
```

###  Alternatives

[symplify/monorepo-builder

Not only Composer tools to build a Monorepo.

5205.3M82](/packages/symplify-monorepo-builder)[spatie/typescript-transformer

This is my package typescript-transformer

3706.5M16](/packages/spatie-typescript-transformer)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[shivas/versioning-bundle

Symfony application versioning, simple console command to manage version (with providers e.g. git tag) of your application using Semantic Versioning 2.0.0 recommendations

1121.2M1](/packages/shivas-versioning-bundle)[eclipxe/cfdiutils

PHP Common utilities for Mexican CFDI 3.2, 3.3 &amp; 4.0

141129.9k6](/packages/eclipxe-cfdiutils)[shyim/danger-php

Port of danger to PHP

8544.9k](/packages/shyim-danger-php)

PHPackages © 2026

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