Atom ยท Library

Common Cast

Explicit type coercers. Conversion is a decision, never an accident.

composer require phprise/common-cast

What it is

Common Cast is an atomic repository: the smallest unit that still fulfils a complete contract. It has no subdirectories and no dependencies beyond the contracts it implements. Its full documentation, tests and contribution rules live in the repository.

Contract

Every PHPRise package follows the same promise: small surface, explicit dependencies, no hidden globals, and a contract you can replace. Read the manifesto for the rules this repository obeys.

Shape
Atom
Kind
Library
Language
PHP
Last commit
Jun 1, 2026
Stars
0

Same shape

Other atoms

Common Contracts

Atom

The interfaces every commons package agrees on. Contracts only: no logic, no leaks.

phprise/common-contract

Common Traits

Atom

Small, composable traits shared by the commons. Behaviour you can attach, not inherit.

phprise/common-trait

Common Value Objects

Atom

PHP primitives wrapped with intent: if it is a string, say which string.