Download the PHP package compono-kit/types without Composer

On this page you can find all versions of the php package compono-kit/types. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package types

ComponoKit / Types

Strongly typed value objects for PHP 8+

This package provides a lightweight foundation for building domain-driven, immutable, and type-safe value objects in PHP implementing compono-kit/types-interfaces. Each type implements its own interfaces and can be used directly via traits or abstract classes. It is designed for type safety, validation, and consistent methods for comparison, conversion, and manipulation.

100% code coverage without senseless LLM generated tests!

Requirements


🚀 Installation


Type Overview

Type Interface Description
BooleanType RepresentsBoolean Represents a boolean value with conversion and comparison methods
IntegerType RepresentsInteger Represents an integer with mathematical and comparison operations
FloatType RepresentsFloat Represents a float with mathematical and comparison operations
StringType RepresentsString Represents a string with extensive methods for manipulation, comparison, and regex
DateType RepresentsDate Represents a date/time with comparison, addition/subtraction, and formatting
Uuid4 RepresentsString Represents a Uuid v4 value
Uuid7 RepresentsString Represents a Uuid v7 value

All types implement the base interface RepresentsType, which includes methods such as equals() and toNativeType().


Architecture

Each type can be used in three ways:

  1. Trait – Implements all interface methods.
    Advantage: You can use traits in your own classes without inheriting the abstract class.

  2. Abstract Class – Uses the trait and adds an abstract isValid() method for validation.
    Advantage: Easily extendable for specific type rules.

  3. Default Implementation – Standard implementation without special validation.
    Advantage: Quick usage for generic types.

Usage Examples

String

Integer

Float

Boolean

Date

UUID4


Exceptions

All types use their own exceptions derived from RepresentsTypeException.


Summary


All versions of types with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
ext-intl Version *
ext-json Version *
ext-ctype Version *
compono-kit/types-interfaces Version ^1.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package compono-kit/types contains the following files

Loading the files please wait ...