Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Type Laravel Package

typhoon/type

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.

View on GitHub
Deep Wiki
Context7
0.8.1
0.8.0

Changed

  • BC Break: Make generic T in Typhoon\Type invariant.
0.7.0

In this release, we refocus the library: typhoon/type now contains only the types necessary for building runtime tools like is() or HMap. Complex types requiring reflection and/or additional context have been removed and will be later implemented in typhoon/algebra.

Added

  • Add WeakVisitor.

Changed

  • BC Break: Rename Mask::match() to test().
  • BC Break: Use float in FloatValueT and FloatRangeT.
  • BC Break: Use nullable limits in IntRangeT.
  • BC Break: Use K, V templates in ArrayT.
  • BC Break: Remove $templates from CallableT and ClosureT.
  • BC Break: Simplify Parameter::__construct() signature.
  • BC Break: Make Reduce a trait.
  • BC Break: Rename ObjectBareT to ObjectT.
  • BC Break: Require at least one type in intersectionT, return IntersectionT.
  • BC Break: Require at least one type in unionT, return UnionT.
  • BC Break: Require at least one type in bitmaskT.
  • BC Break: Do not accept WeakReference<Visitor> in Stringify — use WeakVisitor instead.
  • BC Break: Rename namedObjectT() to objectT().
  • Allow to pass Mask instance to constantMaskT() and classConstantMaskT().

Removed

  • BC Break: Remove Mask::toString(), use Mask::$mask instead.
  • BC Break: Remove fromReflection() function, will be later implemented in a separate package.
  • BC Break: Remove Template and Variance, will be later implemented in algebra.
  • BC Break: Remove Alias and corresponding visitor methods, will be later implemented in algebra.
  • BC Break: Remove IsSubtype and corresponding visitor methods, will be later implemented in algebra.
  • BC Break: Remove KeyOf and corresponding visitor methods, will be later implemented in algebra.
  • BC Break: Remove LiteralString and corresponding visitor methods, will be later implemented in algebra.
  • BC Break: Remove ObjectT and corresponding visitor methods, will be later implemented in algebra.
  • BC Break: Remove Offset and corresponding visitor methods, will be later implemented in algebra.
  • BC Break: Remove ParentBare and corresponding visitor methods, will be later implemented in algebra.
  • BC Break: Remove SelfBare and corresponding visitor methods, will be later implemented in algebra.
  • BC Break: Remove Self and corresponding visitor methods, will be later implemented in algebra.
  • BC Break: Remove StaticBare and corresponding visitor methods, will be later implemented in algebra.
  • BC Break: Remove Static and corresponding visitor methods, will be later implemented in algebra.
  • BC Break: Remove Template and corresponding visitor methods, will be later implemented in algebra.
  • BC Break: Remove Ternary and corresponding visitor methods, will be later implemented in algebra.
  • BC Break: Remove Untyped and corresponding visitor methods, will be later implemented in algebra.
  • BC Break: Remove ValueOf and corresponding visitor methods, will be later implemented in algebra.
  • BC Break: Remove andT() and orT().
0.6.0

Accepted ADRs

Fixed

  • Stringify alias template arguments.
  • Add .0 to stringified floats with zero scale.

Added

  • Add a reduced representation for the mixed type.
  • BC Break: Add an untyped type (ADR).
  • Add fromReflection(?ReflectionType): Type function.

Changed

  • BC Break: Use BigDecimal for floats (ADR).
  • BC Break: Move Typhoon\Type\Type interface to Typhoon\Type (#51).
  • BC Break: Use PHP_INT_MIN, PHP_INT_MAX for IntRangeT limits instead of null.
  • BC Break: Rename *DefaultT to *BareT, Visitor::*DefaultT() to Visitor::*BearT() (#56).
  • BC Break: Move Reduced::callableBareT() to Fallback::callableBareT() (ADR).
  • BC Break: Make Stringify final and allow composition via a Visitor<non-empty-string> parameter (#54).
  • BC Break: Add Template::new(), Template::factory() constructors, make primary private.

Removed

  • BC Break: Remove Reduced::visit() and visitMultiple() — let developer implement them.
  • BC Break: Remove of() for now — it cannot infer types correctly anyway.
0.5.0

The library was rewritten from scratch with a new philosophy in mind:

Changed

  • Extract types constants to global constants: types::int -> intT.
  • Extract types methods to functions: types::intRange() -> intRangeT().
  • Make Type classes public.
  • Rename TypeVisitor to Visitor, pass types as objects without destructuring.
  • Rename TypeStringifier to Stringify, make it abstract.
  • Rename DefaultTypeVisitor to Fallback.

Added

  • Reduced visitor that expresses some types via the others, reducing the number of Visitor methods to implement.
  • Support for generics in anonymous functions and objects.
0.3.0

Full release information in Typhoon monorepo.

What's Changed

New Contributors

Full Changelog: https://github.com/typhoon-php/type/compare/0.2.0...0.3.0

0.2.0

Released during live stream at PHP Point.

Спасибо Пыхарям за поддержку ❤️

0.1.0

Released during live stream at PHP Point.

Спасибо Пыхарям за поддержку ❤️

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
sentix/ai-chatbot
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky