Releases: slack-php/slack-php-block-kit
v2.3.0
What's Changed
- feat: add
.gitattributes
to exclude unnecessary files from Composer dist package by @maartenpaauw in #67 - Add rich text block, elements and parts by @maartenpaauw in #66
Full Changelog: 2.2.0...2.3.0
v2.2.0
What's Changed
- Bump friendsofphp/php-cs-fixer from 3.14.4 to 3.65.0 by @dependabot in #62
- Bump actions/checkout from 3 to 4 by @dependabot in #49
- Bump ramsey/composer-install from 2 to 3 by @dependabot in #55
- Add dev container configuration by @maartenpaauw in #63
- Add video block by @maartenpaauw in #61
New Contributors
- @maartenpaauw made their first contribution in #63
Full Changelog: 2.1.2...2.2.0
v2.1.2
What's Changed
- Fix code block creation without block ID by @AdryanSignor in #41
New Contributors
- @AdryanSignor made their first contribution in #41
Full Changelog: 2.1.1...2.1.2
v2.1.1
What's Changed
- Fix wrong property name for MultiUserSelectMenu initial value by @attepulkkinen in #59
New Contributors
- @attepulkkinen made their first contribution in #59
Full Changelog: 2.1.0...2.1.1
v2.1.0
- Adds
NumberInput
element. - Fixes a handful of reported issues.
Thank you contributors.
v2.0.0
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 namedMd
. - 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.
v2.0.0 Alpha 2
- Rename
ActionsCollection
toActionCollection
for consistency - Separate unique ID validation from
ValidCollection
intoUniqueIds
validation attribute - Add support for new
accessibility_label
field onElements\Button
v2.0.0 Alpha 1
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. - 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.
v1.0.0
It's about time I cut a v1 release, so here it is! It's not perfect, but it's complete.
This release includes recent contributions for internationalization, unique ID checks, and test updates as well (Thank you!).
Going forward, any patches for v1 should use the v1
branch.
The main
branch (formerly master) has diverged now to v2 work.
v0.19.0
- Adds
tapIf()
to allElement
s. Works the same astap()
, but allows you to specify a condition to decide if the tap is needed. - Adds
blocks()
methods to allSurface
s for adding arrays/iterables of blocks easily. - Adds support for
callbackId
,externalId
, andprivateMetadata
toAppHome
surfaces. This was previously missing.- This was done by creating a base
View
surface class that bothModal
andAppHome
extend.
- This was done by creating a base
- Adds the
encodePrivateMetadata(array $data)
method toModal
andAppHome
, which provides an easy way to set encoded private metadata from an array. - Adds support for the
newInput()
method to all surfaces, instead of justModals
. - Updates all
VirtualBlock
s to implementIteratorAggregate
for emitting it'sBlockElement
s.