PHPackages                             ministryofjustice/common-utils - 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. ministryofjustice/common-utils

AbandonedArchivedLibrary

ministryofjustice/common-utils
==============================

Common code that is needed for all projects

0.7.3(6y ago)04.8k2[2 issues](https://github.com/ministryofjustice/common-utils/issues)[3 PRs](https://github.com/ministryofjustice/common-utils/pulls)MITPHPPHP &gt;=7.1

Since Dec 11Pushed 6y ago59 watchersCompare

[ Source](https://github.com/ministryofjustice/common-utils)[ Packagist](https://packagist.org/packages/ministryofjustice/common-utils)[ Docs](https://github.com/ministryofjustice/common-utils)[ RSS](/packages/ministryofjustice-common-utils/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (6)Dependencies (8)Versions (38)Used By (0)

common-utils
============

[](#common-utils)

A Zend Framework 2 module which currently does logging. The idea with this was to perhaps create a shared library that was needed across front-end,back-end,membrane. The requirements for the logger will built from this ticket in JIRA: . Any update to this library means that you need to run composer for all three repos to update the logging for it.

There is a sample configuration file for the logger contained [in this repo](https://github.com/ministryofjustice/common-utils/blob/master/config/sample.logger.global.php)logger.global.php needs to be in the repo where you want logging. An example is [here](https://github.com/ministryofjustice/opg-core-back-end/blob/master/config/autoload/logger.global.php)

```
'extractions' => array(0 => array('property' => 'response',
                                        'method_name' => 'getStatusCode',
                                        'method_values' => 'status_code'),
                             1 => array('property' => 'request',
                                        'method_name' => 'getServer',
                                        'method_values' => array(
                                        'QUERY_STRING','SERVER_NAME','HTTP_HOST','REQUEST_METHOD',
                                        'REQUEST_URI','QUERY_STRING','CONTENT_TYPE','CONTENT_LENGTH',
                                        'REMOTE_ADDR','REMOTE_PORT','SERVER_ADDR','HTTPS','APP_ENV',
                                        'HTTP_HOST','HTTP_USER_AGENT','HTTP_X_USER_ID','HTTP_CONTENT_TYPE')),
                            ),

```

The logger is configurable. There is a [Extractor Class](https://github.com/ministryofjustice/common-utils/blob/master/src/CommonUtils/Sirius/Logging/Extractor.php)which has the request and response objects set on it. The configurations then can extract variables based on configuration.

property: Is either response or request.

method\_name : the method to call on the property.

method\_values : the method value to pass to the method.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community26

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor3

3 contributors hold 50%+ of commits

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 ~56 days

Recently: every ~40 days

Total

31

Last Release

2472d ago

PHP version history (3 changes)0.1.0PHP &gt;=5.4

0.6.0PHP &gt;=5.5

0.7.0PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/9025c7b030862eabb8877bfe173b2358db04463e16d50703c6d9287e55fe5804?d=identicon)[dragoonis](/maintainers/dragoonis)

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

![](https://avatars.githubusercontent.com/u/1422984?v=4)[Ali Bahman](/maintainers/webit4me)[@webit4me](https://github.com/webit4me)

---

Top Contributors

[![vitorbrandao](https://avatars.githubusercontent.com/u/109226?v=4)](https://github.com/vitorbrandao "vitorbrandao (23 commits)")[![jeremyquinton](https://avatars.githubusercontent.com/u/1847770?v=4)](https://github.com/jeremyquinton "jeremyquinton (18 commits)")[![webit4me](https://avatars.githubusercontent.com/u/1422984?v=4)](https://github.com/webit4me "webit4me (18 commits)")[![rs-saunders](https://avatars.githubusercontent.com/u/4743056?v=4)](https://github.com/rs-saunders "rs-saunders (10 commits)")[![dragoonis](https://avatars.githubusercontent.com/u/146321?v=4)](https://github.com/dragoonis "dragoonis (7 commits)")[![slizzio](https://avatars.githubusercontent.com/u/5849883?v=4)](https://github.com/slizzio "slizzio (4 commits)")[![ShrwdFlrst](https://avatars.githubusercontent.com/u/1634863?v=4)](https://github.com/ShrwdFlrst "ShrwdFlrst (3 commits)")[![carnage](https://avatars.githubusercontent.com/u/846596?v=4)](https://github.com/carnage "carnage (2 commits)")[![PaulVM](https://avatars.githubusercontent.com/u/3284594?v=4)](https://github.com/PaulVM "PaulVM (1 commits)")[![knasher](https://avatars.githubusercontent.com/u/1300648?v=4)](https://github.com/knasher "knasher (1 commits)")[![m3dwards](https://avatars.githubusercontent.com/u/1204616?v=4)](https://github.com/m3dwards "m3dwards (1 commits)")[![bnppl](https://avatars.githubusercontent.com/u/1390716?v=4)](https://github.com/bnppl "bnppl (1 commits)")

---

Tags

opgministryofjustice

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ministryofjustice-common-utils/health.svg)

```
[![Health](https://phpackages.com/badges/ministryofjustice-common-utils/health.svg)](https://phpackages.com/packages/ministryofjustice-common-utils)
```

###  Alternatives

[api-platform/metadata

API Resource-oriented metadata attributes and factories

223.5M96](/packages/api-platform-metadata)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[flowwow/cloudpayments-php-client

cloudpayments api client

2188.2k](/packages/flowwow-cloudpayments-php-client)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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