PHPackages                             aaronsaray/us-states - 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. aaronsaray/us-states

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

aaronsaray/us-states
====================

Tools to work with the US States

1.0.1(4y ago)07.3k↓33.3%MITPHPPHP ^7.1|^8.0|^8.1

Since Sep 1Pushed 4y ago1 watchersCompare

[ Source](https://github.com/aaronsaray/us-states)[ Packagist](https://packagist.org/packages/aaronsaray/us-states)[ RSS](/packages/aaronsaray-us-states/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

US State Utilities
==================

[](#us-state-utilities)

This library adds in the US states in various formats. Why re-invent the wheel?

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

[](#installation)

Install with composer

`composer require aaronsaray/us-states`

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

[](#requirements)

- PHP 7.1+

Usage
-----

[](#usage)

This is just about providing the US states. You will end up using them in your own application in custom ways. For example, you might pass the results of abbreviations to the `Rule::in` in Laravel- like this:

```
return [
    'state' => [
        'required',
        Rule::in(USStates::abbreviations())
    ]
];
```

All abbreviations are capitalized and all state names are proper noun capitalized.

### Functions

[](#functions)

All of these examples are assuming you're using the library in your scope doing something like this:

`use AaronSaray\USStates\USStates;`

`USStates::abbreviations()` returns an array of capitalized abbreviations only.

`USStates::namesKeyedByAbbreviations()` returns a key of abbreviation and a value of the state name.

`USStates::abbreviationsKeyedByNames()` returns a key of state name and a value of the abbreviation.

Todo
----

[](#todo)

- figure out if there is some sort of unit test that makes sense for this package

Credits
-------

[](#credits)

This package is created and maintained by [Aaron Saray](https://github.com/aaronsaray)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity68

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

Total

2

Last Release

1633d ago

PHP version history (2 changes)1.0.0PHP ^7.1

1.0.1PHP ^7.1|^8.0|^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/5a9ad2a426eb84bbb6d5fd7f8a9000797796581c2aeda0d27b39391e55c0e7a3?d=identicon)[aaronsaray](/maintainers/aaronsaray)

---

Top Contributors

[![aaronsaray](https://avatars.githubusercontent.com/u/956888?v=4)](https://github.com/aaronsaray "aaronsaray (5 commits)")

### Embed Badge

![Health badge](/badges/aaronsaray-us-states/health.svg)

```
[![Health](https://phpackages.com/badges/aaronsaray-us-states/health.svg)](https://phpackages.com/packages/aaronsaray-us-states)
```

###  Alternatives

[koala-framework/file-watcher

Library for watching for file system changes

1339.2k1](/packages/koala-framework-file-watcher)

PHPackages © 2026

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