Download the PHP package extended-type-system/type without Composer

On this page you can find all versions of the php package extended-type-system/type. 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 type

Typhoon Type

PHP Version Requirement GitHub Release Code Coverage Mutation testing badge

Typhoon Type is an object abstraction over the modern PHP type system. Use this library to build tools that work with sophisticated types:

Installation

Printing types

To print any type, use stringify():

Supported types

Native

Typhoon Native
nullT null
voidT void
neverT never
falseT false
trueT true
boolT bool
intT int
floatT float
stringT string
arrayT array
objectT object
objectT(Foo::class) Foo
selfT self
parentT parent
staticT static
iterableT iterable
callableT callable
resourceT resource
nullOrT(stringT) ?string
unionT(intT, stringT) int\|string
intersectionT(objectT(Countable::class), objectT(Traversable::class)) Countable&Traversable
mixedT mixed

PHPDoc numbers

Typhoon PHPDoc
intT(123) 123
positiveIntT positive-int
negativeIntT negative-int
nonPositiveIntT non-positive-int
nonNegativeIntT non-negative-int
nonZeroIntT non-zero-int
intRangeT(-5, 6) int<-5, 6>
intRangeT(max: 6) int<min, 6>
intRangeT(min: -5) int<-5, max>
intMaskT(1, 2, 4) int-mask<1, 2, 4>
intMaskT(classConstantMaskT(Foo::class, 'INT_*') int-mask-of<Foo::INT_*>
floatT(12.5) 12.5
floatRangeT(-0.001, 2.344) float<-0.001, 2.344>

PHPDoc strings

Typhoon PHPDoc
nonEmptyStringT non-empty-string
truthyStringT, nonFalsyStringT truthy-string, non-falsy-string
numericStringT numeric-string
lowercaseString lowercase-string
stringT('abc') 'abc'
classT(Foo::class), classStringT(Foo::class), classT(objectT(Foo::class)) class-string<Foo>
stringT(Foo::class), classConstantT(Foo::class, 'class') Foo::class
literalStringT literal-string

PHPDoc constants

Typhoon PHPDoc
constantT('PHP_INT_MAX') PHP_INT_MAX
constantMaskT('JSON_*') JSON_*
classConstantT(Foo::class, 'BAR') Foo::BAR
classConstantMaskT(Foo::class, 'IS_*') Foo::IS_*

PHPDoc arrays and iterables

Typhoon PHPDoc
arrayT(value: objectT(Foo::class)) Foo[]
listT(stringT) list<string>
nonEmptyListT(stringT) non-empty-list<string>
listShapeT([intT, stringT]) list{int, string}
arrayShapeT([intT, optional(stringT)]) list{int, 1?: string}
unsealedListShapeT([intT]) list{int, ...}
unsealedListShapeT([intT], stringT) list{int, ...<string>}
arrayT(value: stringT) array<string>
arrayT(intT, stringT) array<int, string>
nonEmptyArrayT(arrayKeyT, stringT) non-empty-array<array-key, string>
arrayShapeT() array{}
arrayShapeT([intT, stringT]) array{int, string}
arrayShapeT([intT, 'a' => optional(stringT)]) array{int, a?: string}
unsealedArrayShapeT([intT]) array{int, ...}
unsealedArrayShapeT([floatT], intT, stringT) array{float, ...<int, string>}
keyOfT(classConstantT(Foo::class, 'ARRAY')) key-of<Foo::ARRAY>
valueOfT(classConstantT(Foo::class, 'ARRAY')) value-of<Foo::ARRAY>
offsetT($TArray->type, $TKey->type) TArray[TKey]
iterableT(objectT, stringT) iterable<object, string>
iterableT(value: stringT) iterable<string>

PHPDoc objects

Typhoon PHPDoc
objectT(Foo::class, [stringT, floatT]) Foo<string, float>
selfT([stringT, floatT]) self<string, float>
parentT([stringT, floatT]) parent<string, float>
staticT([stringT, floatT]) static<string, float>
objectShapeT(['prop' => stringT]) object{prop: string}
objectShapeT(['prop' => optional(stringT))]) object{prop?: string}

PHPDoc callables

Typhoon PHPDoc
callableT([stringT], voidT) callable(string): void
callableT([param(stringT, default: true)]) callable(string=): mixed
callableT([param(stringT, variadic: true)]) callable(string...): mixed
callableT([param(stringT, byRef: true)]) callable(string&): mixed
closureT([stringT], voidT) Closure(string): void
closureT([param(stringT, default: true)]) Closure(string=): mixed
closureT([param(stringT, variadic: true)]) Closure(string...): mixed
closureT([param(stringT, byRef: true)]) Closure(string&): mixed

Union aliases

Typhoon PHPDoc
array-key arrayKeyT
numericT numeric
scalarT scalar

All versions of type with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
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 extended-type-system/type contains the following files

Loading the files please wait ...