PackageTrack
Sign in Get early access

sebastian/type

Collection of value objects that represent the types of the PHP type system

7.0.2 690M downloads/mo #60 most downloaded on composer sebastianbergmann/type

What this package is like to depend on

Last release 13 days ago

10 Aug 2026

Ships fairly regularly

a new release about every 4 months

Nearly every release is documented

notes for 34 of 36 stable releases

Nothing withdrawn

no release was ever pulled

7 years old

36 releases · first in 2019

4 releases in the last 12 months

see the full history below

Release timeline

36 releases · Jun 2019 to Aug 2026
2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 36
  1. 7.0.2 10 Aug 2026
    Release notes

    Changed

    • Improved the performance of Type::fromValue() as well as isAssignable() for object, callable, and iterable types

    Fixed

    • CallableType::isAssignable() and IterableType::isAssignable() raise an error when the other type is an ObjectType for a class that does not exist
      • TypeName::fromReflection() cannot be called with a ReflectionClass object for a concrete class without an error being reported by PHPStan
    Open source →
    Release notes

    Changed

    • Improved the performance of Type::fromValue() as well as isAssignable() for object, callable, and iterable types

    Fixed

    • CallableType::isAssignable() and IterableType::isAssignable() raise an error when the other type is an ObjectType for a class that does not exist
      • TypeName::fromReflection() cannot be called with a ReflectionClass object for a concrete class without an error being reported by PHPStan
    Open source →
  2. 7.0.1 20 May 2026
    Release notes

    Fixed

    • #18: Class aliases are not resolved when checking type assignability
    Open source →
    Release notes

    Fixed

    • #18: Class aliases are not resolved when checking type assignability
    Open source →
  3. 7.0.0 06 Feb 2026
    Release notes

    Removed

    • This component is no longer supported on PHP 8.3
    Open source →
    Release notes

    Removed

    • This component is no longer supported on PHP 8.3
    Open source →
  4. 6.0.4 20 May 2026
    Release notes

    Fixed

    • #18: Class aliases are not resolved when checking type assignability
    Open source →
    Release notes

    Fixed

    • #18: Class aliases are not resolved when checking type assignability
    Open source →
  5. 6.0.3 09 Aug 2025
    Release notes

    Fixed

    • #34: infection.json is missing from .gitattributes
    Open source →
    Release notes

    Fixed

    • #34: infection.json is missing from .gitattributes
    Open source →
  6. 6.0.2 18 Mar 2025
    Release notes

    Fixed

    • #33: ReflectionMapper does not handle unions that contain iterable correctly
    Open source →
    Release notes

    Fixed

    • #33: ReflectionMapper does not handle unions that contain iterable correctly
    Open source →
  7. 6.0.1 18 Mar 2025
    Release notes

    Fixed

    • #33: ReflectionMapper does not handle unions that contain iterable correctly
    Open source →
    Release notes

    Fixed

    • #33: ReflectionMapper does not handle unions that contain iterable correctly
    Open source →
  8. 6.0.0 07 Feb 2025
    Release notes

    Removed

    • This component is no longer supported on PHP 8.2
    Open source →
  9. 5.1.3 09 Aug 2025
    Release notes

    Fixed

    • #34: infection.json is missing from .gitattributes
    Open source →
    Release notes

    Fixed

    • #34: infection.json is missing from .gitattributes
    Open source →
  10. 5.1.2 18 Mar 2025
    Release notes

    Fixed

    • #33: ReflectionMapper does not handle unions that contain iterable correctly
    Open source →
    Release notes

    Fixed

    • #33: ReflectionMapper does not handle unions that contain iterable correctly
    Open source →
  11. 5.1.1 18 Mar 2025
    Release notes

    Fixed

    • #33: ReflectionMapper does not handle unions that contain iterable correctly
    Open source →
    Release notes

    Fixed

    • #33: ReflectionMapper does not handle unions that contain iterable correctly
    Open source →
  12. 5.1.0 17 Sep 2024
    Release notes

    Added

    • Added ReflectionMapper::fromPropertyType() for mapping \ReflectionProperty to a Type object
    Open source →
  13. 5.0.1 03 Jul 2024
    Release notes

    Changed

    • This project now uses PHPStan instead of Psalm for static analysis
    Open source →
  14. 5.0.0 02 Feb 2024
    Release notes

    Removed

    • This component is no longer supported on PHP 8.1
    Open source →
  15. 4.0.0 03 Feb 2023
    Release notes

    Removed

    • This component is no longer supported on PHP 7.3, PHP 7.4 and PHP 8.0
    Open source →
  16. 3.2.1 03 Feb 2023
    Release notes

    Fixed

    • #28: Potential undefined offset warning/notice
    Open source →
  17. 3.2.0 12 Sep 2022
    Release notes

    Added

    • #25: Support Disjunctive Normal Form types
    • Added ReflectionMapper::fromParameterTypes()
    • Added IntersectionType::types() and UnionType::types()
    • Added UnionType::containsIntersectionTypes()
    Open source →
  18. 3.1.0 29 Aug 2022
    Release notes

    Added

    • #21: Support true as stand-alone type
    Open source →
  19. 3.0.0 15 Mar 2022
    Release notes

    Added

    • Support for intersection types introduced in PHP 8.1
    • Support for the never return type introduced in PHP 8.1
    • Added Type::isCallable(), Type::isGenericObject(), Type::isIterable(), Type::isMixed(), Type::isNever(), Type::isNull(), Type::isObject(), Type::isSimple(), Type::isStatic(), Type::isUnion(), Type::isUnknown(), and Type::isVoid()

    Changed

    • Renamed ReflectionMapper::fromMethodReturnType(ReflectionMethod $method) to ReflectionMapper::fromReturnType(ReflectionFunctionAbstract $functionOrMethod)

    Removed

    • Removed Type::getReturnTypeDeclaration() (use Type::asString() instead and prefix its result with ': ')
    • Removed TypeName::getNamespaceName() (use TypeName::namespaceName() instead)
    • Removed TypeName::getSimpleName() (use TypeName::simpleName() instead)
    • Removed TypeName::getQualifiedName() (use TypeName::qualifiedName() instead)
    Open source →
  20. 2.3.4 15 Jun 2021
    Release notes

    Fixed

    • Fixed regression introduced in 2.3.3
    Open source →
  21. 2.3.2 04 Jun 2021
    Release notes

    Fixed

    • Fixed handling of tentatively declared return types
    Open source →
  22. 2.3.1 26 Oct 2020
    Release notes

    Fixed

    • SebastianBergmann\Type\Exception now correctly extends \Throwable
    Open source →
  23. 2.3.0 06 Oct 2020
    Release notes

    Added

    • #14: Support for static return type that is introduced in PHP 8
    Open source →
  24. 2.2.2 28 Sep 2020
    Release notes

    Changed

    • Changed PHP version constraint in composer.json from ^7.3 || ^8.0 to >=7.3
    Open source →
  25. 2.2.1 05 Jul 2020
    Release notes

    Fixed

    • Fixed handling of mixed type in ReflectionMapper::fromMethodReturnType()
    Open source →
  26. 2.2.0 05 Jul 2020
    Release notes

    Added

    • Added MixedType object for representing PHP 8's mixed type
    Open source →
  27. 2.1.1 26 Jun 2020
    Release notes

    Added

    • This component is now supported on PHP 8
    Open source →
  28. 2.1.0 01 Jun 2020
    Release notes

    Added

    • Added UnionType object for representing PHP 8's Union Types
    • Added ReflectionMapper::fromMethodReturnType() for mapping \ReflectionMethod::getReturnType() to a Type object
    • Added Type::name() for retrieving the name of a type
    • Added Type::asString() for retrieving a textual representation of a type

    Changed

    • Deprecated Type::getReturnTypeDeclaration() (use Type::asString() instead and prefix its result with ': ')
    • Deprecated TypeName::getNamespaceName() (use TypeName::namespaceName() instead)
    • Deprecated TypeName::getSimpleName() (use TypeName::simpleName() instead)
    • Deprecated TypeName::getQualifiedName() (use TypeName::qualifiedName() instead)
    Open source →
  29. 2.0.0 07 Feb 2020
    Release notes

    Removed

    • This component is no longer supported on PHP 7.2
    Open source →
  30. 1.1.5 01 Mar 2024

    Nothing published for this version

  31. 1.1.4 30 Nov 2020

    Nothing published for this version

  32. 1.1.3 02 Jul 2019
    Release notes

    Fixed

    • Fixed class name comparison in ObjectType to be case-insensitive
    Open source →
  33. 1.1.2 19 Jun 2019
    Release notes

    Fixed

    • Fixed handling of object type
    Open source →
  34. 1.1.1 08 Jun 2019
    Release notes

    Fixed

    • Fixed autoloading of callback_function.php fixture file
    Open source →
  35. 1.1.0 07 Jun 2019
    Release notes

    Added

    • Added support for callable type
    • Added support for iterable type
    Open source →
  36. 1.0.0 06 Jun 2019
    Release notes Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive