sebastian/type
sebastian/type provides lightweight value objects for representing and working with PHP’s type system (built-in, class, union, intersection, nullable, etc.). Useful for static analysis tools, reflection helpers, and test utilities that need precise type modeling.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| spatie/typed | 0.88 | Userland improved PHP type system with type inference and runtime checking: generics, union types, typed collections/lists, tuples, and structs. Proof-of-concept package from Spatie to add stronger type guarantees without language-level support. | 318 | 321 | 15 | 6 | 0 | 1.9 | 0.1 | MIT | 5 years ago | |
| elasticms/helpers | 0.86 | — | 0 | 0 | 0 | 121 | 0 | 32.0 | 33.7 | LGPL-3.0 | 4 weeks ago | |
| symfony/type-info | 0.86 | Symfony TypeInfo extracts and models PHP type information from reflections and type strings. Resolve scalars, objects, enums, generics, lists, and nullable types via TypeResolver, inspect identifiers and constraints, and stringify types like Collection. | 200 | 200 | 3 | 7M | 0 | 30.7 | 63.7 | MIT | 1 month ago | |
| spatie/better-types | 0.85 | Reflection-powered type checking for PHP: verify whether a ReflectionType or method signature accepts given arguments (including unions/nullables and named params). Useful for dispatching/overload-like method selection and safer dynamic calls. | 82 | 81 | 5 | 218K | 0 | 16.3 | 52.6 | MIT | 5 months ago | |
| php-standard-library/type | 0.84 | Runtime type validation for PHP using “Parse, Don’t Validate”: coerce and assert unstructured input into well-typed data. Useful for APIs, configs, and user input with clear parsing rules, assertions, and predictable failures. | 1 | 1 | 0 | 34K | 0 | 19.1 | 63.9 | MIT | 1 month ago | |
| kiwilan/typescriptable-laravel | 0.84 | — | 39 | 39 | 9 | 2K | 7 | 12.1 | 26.6 | MIT | 1 year ago | |
| korbeil/phpstan-generic-rules | 0.84 | PHPStan extension that enforces and improves the use of PHP generics. Adds custom rules to catch missing or incorrect template types, invalid generic usages, and helps keep docblocks and type hints consistent for safer, more accurate static analysis. | 12 | 12 | 5 | 7K | 2 | 9.0 | 39.5 | — | 9 months ago | |
| typhoon/type | 0.84 | Typhoon Type provides an object abstraction over PHP’s modern type system for building tools that understand complex types. Define, print (stringify), and work with array shapes, object types, non-empty lists, and more in a consistent API. | 65 | 64 | 2 | 5K | 2 | 20.9 | 30.3 | MIT | 2 months ago | |
| atournayre/types | 0.84 | Lightweight PHP library providing reusable types/value objects. Installable via Composer, intended to standardize and validate common domain data. Open-source on GitHub with issue tracker and MIT license. | 0 | 0 | 0 | 19 | 0 | 3.0 | 18.0 | MIT | 2 years ago | |
| sstalle/php7cc | 0.83 | — | 1,510 | 1,456 | 121 | 1K | 20 | 19.0 | 10.6 | MIT | 8 years ago | |
| phpstan/php-8-stubs | 0.82 | Stub files for PHP 8 built-in functions, classes, and extensions, maintained for PHPStan. Improves static analysis and type inference by providing accurate signatures and phpDoc where native reflection is incomplete or inconsistent. | 31 | 31 | 11 | 333K | 4 | 28.7 | 65.9 | MIT | 1 month ago | |
| rector/type-perfect | 0.82 | Type Perfect adds 10 PHPStan rules to tighten type declarations: replace empty/isset checks with instanceof for precise narrowing, prefer explicit getters over magic array access, and enforce interface signatures. Easy to enable even on legacy code; improves reliability fast. | 105 | 105 | 7 | 403K | 0 | 0.7 | 49.5 | MIT | — | |
| sebastian/environment | 0.77 | sebastian/environment helps PHP libraries handle runtime-specific execution paths by detecting and describing the current environment (PHP version, features, etc.). Useful for writing portable code that adapts to different runtimes and configurations. | 6,778 | 6,789 | 37 | 15M | 1 | 49.9 | 53.3 | BSD-3-Clause | 1 month ago | |
| sebastian/complexity | 0.77 | Compute code complexity metrics for PHP units (functions, methods, classes). sebastian/complexity provides programmatic analysis useful for static analysis tools, quality gates, and CI reporting; install via Composer for project or dev-only use. | 1,261 | 1,262 | 10 | 13M | 1 | 18.7 | 60.6 | BSD-3-Clause | 5 months ago | |
| sebastian/global-state | 0.75 | sebastian/global-state snapshots and restores PHP global state (globals, superglobals, ini settings, etc.), extracted from PHPUnit as a standalone component. Useful for test isolation and detecting side effects by capturing state before and after code runs. | 6,606 | 6,609 | 19 | 14M | 1 | 46.1 | 53.2 | BSD-3-Clause | 1 month ago | |
| sebastian/lines-of-code | 0.74 | Count lines of code in PHP source with sebastian/lines-of-code. A lightweight library for analyzing PHP files and reporting LOC metrics, useful for tooling, CI checks, and development workflows. Install easily via Composer as a runtime or dev dependency. | 1,179 | 1,180 | 9 | 13M | 1 | 27.5 | 64.7 | BSD-3-Clause | 1 week ago |
How can I help you explore Laravel packages today?