PHPackages                             cdburgess/addressing-standards - 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. cdburgess/addressing-standards

ActiveLibrary

cdburgess/addressing-standards
==============================

USPS Publication 28 compliant address normalization for Laravel / PHP

001PHPCI passing

Since Aug 28Pushed todayCompare

[ Source](https://github.com/cdburgess/addressing-standards)[ Packagist](https://packagist.org/packages/cdburgess/addressing-standards)[ RSS](/packages/cdburgess-addressing-standards/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (1)

Addressing Standards
====================

[](#addressing-standards)

USPS Publication 28 compliant address normalization for Laravel and plain PHP.

Takes messy, human-entered US addresses and returns a clean, standardized `Address` value object ready for mailing, storage, or further validation.

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

[](#installation)

```
composer require cdburgess/addressing-standards
```

The service provider and facade are auto-discovered by Laravel.

Publish the config (optional):

```
php artisan vendor:publish --tag=addressing-standards-config
```

Quick Start
-----------

[](#quick-start)

### Using the Facade

[](#using-the-facade)

```
use Cdburgess\AddressingStandards\Address;

$address = Address::normalize(
    "123 south main street apt 4b\nspringfield va 22162"
);

echo $address->deliveryAddressLine(); // 123 S MAIN ST APT 4B
echo $address->lastLine();            // SPRINGFIELD VA 22162
echo $address->toBlock();
```

### Using the Container

[](#using-the-container)

```
use Cdburgess\AddressingStandards\Contracts\AddressNormalizer;

$normalizer = app(AddressNormalizer::class);
$address = $normalizer->normalize([...]);
```

### Array input

[](#array-input)

```
use Cdburgess\AddressingStandards\Address;

$address = Address::normalize([
    'street_line' => '456 North Oak Avenue Suite 200',
    'city'        => 'Richmond',
    'state'       => 'Virginia',
    'zip'         => '23219-1234',
]);
```

Address Object
--------------

[](#address-object)

The returned `Address` is immutable and provides:

Method / PropertyDescription`deliveryAddressLine()`Standardized street line`lastLine()`City + State + ZIP(+4)`toBlock()`Multi-line mailpiece block`toString()` / `__toString()`Single-line representation`toArray()`All components, corrections, and completeness`isComplete()`Has delivery line + city + state + ZIP5`hasIncompleteSecondary()`Designator present but required number missing`isFullyQualified()`Complete and no secondary problems`wasCorrected()`One or more standardization changes were applied`completenessReport()`Missing fields and correction list`corrections`Array of `{field, from, to}` changes### Completeness report

[](#completeness-report)

```
$report = $address->completenessReport();

// [
//     'is_complete' => true,
//     'is_fully_qualified' => true,
//     'has_incomplete_secondary' => false,
//     'missing' => [],
//     'corrections' => [
//         ['field' => 'state', 'from' => 'Virginia', 'to' => 'VA'],
//     ],
// ]
```

What gets standardized
----------------------

[](#what-gets-standardized)

- Street suffixes to official USPS abbreviations (`STREET` to `ST`, `AVENUE` to `AVE`, and so on)
- Directionals to `N`, `S`, `E`, `W`, `NE`, `NW`, `SE`, `SW`
- Secondary units to `APT`, `STE`, `BLDG`, `FL`, and related designators
- Secondary units that do not require a number (`BSMT`, `PH`, `FRNT`, and similar)
- Fallback `# 12` when a number is present but no recognized designator is
- State names to two-letter codes, including full names such as `Virginia`
- Uppercase formatting (Publication 28 preference)
- ZIP and ZIP+4 normalization
- PO Box
- Dual addresses on one line (street + PO Box → PO Box is used)
- Rural Route and Highway Contract, including obsolete `RFD` and `STAR ROUTE`
- General Delivery
- Puerto Rico urbanization (`URB LAS GLADIOLAS`)
- Alphanumeric and fractional primary numbers (`123A`, `123 1/2`)
- Two-suffix streets (`MAIN AVENUE DRIVE` → street `MAIN AVENUE`, suffix `DR`)

Testing
-------

[](#testing)

```
composer test
```

Or:

```
./vendor/bin/pest
```

Roadmap / Limitations
---------------------

[](#roadmap--limitations)

- This package performs **rule-based** standardization per Publication 28.
- It does **not** perform CASS certification or live USPS delivery-point validation.
- Optional USPS Addresses API integration can be added later for ZIP+4 confirmation and DPV.

License
-------

[](#license)

MIT

###  Health Score

21

—

LowBetter than 17% of packages

Maintenance65

Regular maintenance activity

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

[![cdburgess](https://avatars.githubusercontent.com/u/216284?v=4)](https://github.com/cdburgess "cdburgess (9 commits)")

### Embed Badge

![Health badge](/badges/cdburgess-addressing-standards/health.svg)

```
[![Health](https://phpackages.com/badges/cdburgess-addressing-standards/health.svg)](https://phpackages.com/packages/cdburgess-addressing-standards)
```

PHPackages © 2026

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