Skip to content

v2.0.0

Compare
Choose a tag to compare
@jeremeamia jeremeamia released this 19 Feb 01:41
· 18 commits to main since this release

Welcome to Version 2!

V2 is written for PHP 8.1+, and uses all the latest and greatest PHP features (enums, named parameters, attributes, etc.).

The library itself has gone through quite a few changes:

  • Many classes/namespaces have been renamed (Elements -> Components, Inputs -> Elements, Partials -> Parts, etc.). Most of these changes are to align better with Slack documentation.
  • Named parameters have become the primary interface now, but the fluent interface is still there too (and more reliable than before, IMO).
  • Lots of fixes across the different components (found a lot of little bugs here and there), and improvements to validations.
  • Validation is no longer implicit. You have to call ->validate() explicitly now. This means you can choose to validate or not.
  • The Kit class is now a facade for all the components, not just surfaces.
  • The Formatter class is now named Md.
  • Existing component objects are easier to read/update. This makes them more useful in the context of APIs and app code where block kit JSON is received and needs to be altered (very common for modals and app homes).

The README is updated with new examples and diagrams that will help you get a feel for everything.