Skip to content

This library aggregates multiple PHP libraries and wraps them in a single repo, providing decorator classes / sub-types with some extra features.

License

Notifications You must be signed in to change notification settings

PhpTyping/types

Repository files navigation

Types

Gitter Documentation Build Job Patch Job License Issues Downloads Latest

Quality Gate Status Maintainability Rating Reliability Rating Security Rating Bugs Coverage Duplicated Lines (%) Lines of Code Technical Debt Vulnerabilities

PhpTyping

PHP Primitive wrappers.

Description

Types is a library that provides a collection of useful primitive wrappers, similar to what other languages can do ( Java, etc). It fixes a few issues some internal functions have, and limits coercion around native PHP functions.

This library aggregates multiple PHP libraries and wraps them in a single repo, providing decorator classes / sub-types with some extra features.

SPL_Types has been broken since...forever. The last release was in 2012. No library has tried to do this since, and SPL_Types providing an empty interface for each primitive object was not terribly useful.

Libraries such as Doctrine/Collections, Stringy, PHPMoney/Money, MyClabs/Enum and others like them, are infinitely more useful. They provide rich interfaces that allow you to breeze through coding as opposed to trying to remember the name of specific functions for particular primitives.

Documentation

Full docs

Please see the online documentation

Requirements

PHP 8.0 or above.

Optional Requirements:
Installation

Using CLI:

composer require typing/types:*@stable

Or directly on the composer.json file:

{
    "require": {
        "typing/types": "*@stable"
    }
}

See https://getcomposer.org/ for more information and documentation.

Contributing

For locally testing workflows, use Act workflow tester.

If you want to contribute, please read the CONTRIBUTING.

License

This library is released under the MIT license. See the complete license in the LICENSE file.

About

This library aggregates multiple PHP libraries and wraps them in a single repo, providing decorator classes / sub-types with some extra features.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages