PHPackages                             sebastian/global-state - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. sebastian/global-state

ActiveLibrary[Testing &amp; Quality](/categories/testing)

sebastian/global-state
======================

Snapshotting of global state

9.0.0(3mo ago)6.6k861.1M↓13.4%19[1 issues](https://github.com/sebastianbergmann/global-state/issues)[2 PRs](https://github.com/sebastianbergmann/global-state/pulls)20BSD-3-ClausePHPPHP &gt;=8.4CI passing

Since Oct 6Pushed today5 watchersCompare

[ Source](https://github.com/sebastianbergmann/global-state)[ Packagist](https://packagist.org/packages/sebastian/global-state)[ Docs](https://www.github.com/sebastianbergmann/global-state)[ GitHub Sponsors](https://github.com/sebastianbergmann)[ Fund](https://liberapay.com/sebastianbergmann)[ RSS](/packages/sebastian-global-state/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (3)Versions (37)Used By (20)

[![Latest Stable Version](https://camo.githubusercontent.com/ddeffa297d07e5ee2011739976f2e7ca08b39e39f133d365abfda88c20af52c0/68747470733a2f2f706f7365722e707567782e6f72672f73656261737469616e2f676c6f62616c2d73746174652f76)](https://packagist.org/packages/sebastian/global-state)[![CI Status](https://github.com/sebastianbergmann/global-state/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/global-state/actions)[![codecov](https://camo.githubusercontent.com/d6a82ffc0fbee26047aa23736f55bbfe6115f3070d1f0f0c2cd31b8cbafb0d92/68747470733a2f2f636f6465636f762e696f2f67682f73656261737469616e626572676d616e6e2f676c6f62616c2d73746174652f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/sebastianbergmann/global-state)

sebastian/global-state
======================

[](#sebastianglobal-state)

Snapshotting of global state, factored out of PHPUnit into a stand-alone component.

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

[](#installation)

You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):

```
composer require sebastian/global-state

```

If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:

```
composer require --dev sebastian/global-state

```

###  Health Score

81

↑

ExcellentBetter than 100% of packages

Maintenance92

Actively maintained with recent releases

Popularity83

Widely adopted with strong download metrics

Community36

Small or concentrated contributor base

Maturity92

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 92.1% 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 ~118 days

Recently: every ~40 days

Total

36

Last Release

102d ago

Major Versions

3.0.6 → 5.0.x-dev2025-08-10

5.0.8 → 8.0.12025-08-28

6.0.x-dev → 7.0.x-dev2025-09-26

7.0.x-dev → 8.0.x-dev2025-12-31

8.0.x-dev → 9.0.02026-02-06

PHP version history (11 changes)1.0.0PHP &gt;=5.3.3

2.0.0PHP ^7.0

3.0.0PHP ^7.2

4.0.0PHP ^7.3

5.0.0PHP ^7.3 || ^8.0

5.0.1PHP &gt;=7.3

3.0.1PHP &gt;=7.2

6.0.0PHP &gt;=8.1

7.0.0PHP &gt;=8.2

8.0.0PHP &gt;=8.3

9.0.0PHP &gt;=8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1089?v=4)[Sebastian Probst Eide](/maintainers/sebastian)[@sebastian](https://github.com/sebastian)

---

Top Contributors

[![sebastianbergmann](https://avatars.githubusercontent.com/u/25218?v=4)](https://github.com/sebastianbergmann "sebastianbergmann (419 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (10 commits)")[![localheinz](https://avatars.githubusercontent.com/u/605483?v=4)](https://github.com/localheinz "localheinz (7 commits)")[![whatthejeff](https://avatars.githubusercontent.com/u/306525?v=4)](https://github.com/whatthejeff "whatthejeff (7 commits)")[![Seb35](https://avatars.githubusercontent.com/u/772681?v=4)](https://github.com/Seb35 "Seb35 (2 commits)")[![staabm](https://avatars.githubusercontent.com/u/120441?v=4)](https://github.com/staabm "staabm (2 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (2 commits)")[![mrclay](https://avatars.githubusercontent.com/u/170687?v=4)](https://github.com/mrclay "mrclay (1 commits)")[![henriquemoody](https://avatars.githubusercontent.com/u/154023?v=4)](https://github.com/henriquemoody "henriquemoody (1 commits)")[![lolli42](https://avatars.githubusercontent.com/u/2178068?v=4)](https://github.com/lolli42 "lolli42 (1 commits)")[![mbeccati](https://avatars.githubusercontent.com/u/282388?v=4)](https://github.com/mbeccati "mbeccati (1 commits)")[![anthonyvancauwenberghe](https://avatars.githubusercontent.com/u/7100315?v=4)](https://github.com/anthonyvancauwenberghe "anthonyvancauwenberghe (1 commits)")[![remicollet](https://avatars.githubusercontent.com/u/270445?v=4)](https://github.com/remicollet "remicollet (1 commits)")

---

Tags

global state

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sebastian-global-state/health.svg)

```
[![Health](https://phpackages.com/badges/sebastian-global-state/health.svg)](https://phpackages.com/packages/sebastian-global-state)
```

###  Alternatives

[phpunit/phpunit

The PHP Unit Testing framework.

20.0k910.7M134.8k](/packages/phpunit-phpunit)[sebastian/object-enumerator

Traverses array structures and object graphs to enumerate all referenced objects

6.5k805.2M30](/packages/sebastian-object-enumerator)[sebastian/exporter

Provides the functionality to export PHP variables for visualization

6.8k882.7M75](/packages/sebastian-exporter)[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)

PHPackages © 2026

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