PHPackages                             samlitowitz/no-globals - 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. samlitowitz/no-globals

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

samlitowitz/no-globals
======================

PHPStan rules to disallow use of global keyword and $GLOBALS variable

v1.1(7y ago)03MITPHP

Since Apr 19Pushed 7y agoCompare

[ Source](https://github.com/samlitowitz/no-globals)[ Packagist](https://packagist.org/packages/samlitowitz/no-globals)[ RSS](/packages/samlitowitz-no-globals/feed)WikiDiscussions master Synced 2d ago

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

PHPStan rules to disallow use of global keyword and $GLOBALS variable
=====================================================================

[](#phpstan-rules-to-disallow-use-of-global-keyword-and-globals-variable)

[![Build Status](https://camo.githubusercontent.com/27370d63afa4c77e8ea2d2f43106515d6968a66da1adcda3a46d05ecf8599892/68747470733a2f2f7472617669732d63692e6f72672f73616d6c69746f7769747a2f6e6f2d676c6f62616c732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/samlitowitz/no-globals)

Usage
=====

[](#usage)

To use these rules, require it via [Composer](https://getcomposer.org/)

```
composer require samlitowitz/no-globals --dev

```

Include rules.neon in your project's PHPStan config

```
includes:
    - vendor/samlitowitz/no-globals/rules.neon

```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

2582d ago

### Community

Maintainers

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

---

Top Contributors

[![samlitowitz](https://avatars.githubusercontent.com/u/4641296?v=4)](https://github.com/samlitowitz "samlitowitz (11 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/samlitowitz-no-globals/health.svg)

```
[![Health](https://phpackages.com/badges/samlitowitz-no-globals/health.svg)](https://phpackages.com/packages/samlitowitz-no-globals)
```

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k43.5M5.2k](/packages/larastan-larastan)[phpstan/phpstan-symfony

Symfony Framework extensions and rules for PHPStan

78268.9M1.5k](/packages/phpstan-phpstan-symfony)[phpstan/phpstan-doctrine

Doctrine extensions for PHPStan

66466.6M1.1k](/packages/phpstan-phpstan-doctrine)[phpat/phpat

PHP Architecture Tester

1.2k3.5M32](/packages/phpat-phpat)[spaze/phpstan-disallowed-calls

PHPStan rules to detect disallowed method &amp; function calls, constant, namespace, attribute, property &amp; superglobal usages, with powerful rules to re-allow a call or a usage in places where it should be allowed.

33120.0M375](/packages/spaze-phpstan-disallowed-calls)[mglaman/phpstan-drupal

Drupal extension and rules for PHPStan

20729.0M124](/packages/mglaman-phpstan-drupal)

PHPackages © 2026

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