Releases: slack-php/slack-php-app-framework
Releases · slack-php/slack-php-app-framework
v1.0.0
v0.7.1
- Fixed missing
Context::error()
method. 😅 - Added
InputStateValidator::new()
method. - Fixed
InputStateValidator::rule()
so that callback can acceptstring
orstring[]
(e.g., for multi-selects) values.
v0.7.0
- Added
Context::appHome()
that returns aHome
object. - Added
Home::update()
(force),Home::safeUpdate()
, andHome::updateIfSafe()
. - Deprecated
Context::home()
in favor ofContext::appHome()
. - Updated
Modals::update()
andAdded Modals::safeUpdate()
andModals::updateIfSafe()
. - Updated
Context::error()
to return anError
object, that helps you log and display errors. - Added methods in
AppConfig
to configure the error templates for theError
object. - Added
InputStateValidator
andInputStateValidationException
for validatingInputState
. - Updated
ClassResolver
listener to add the listener's class to the logging context. - Updated
WIP
listener to better handle push vs. open for modals. - Removed vestigial
Context::setSensitive()
method.
v0.6.0
- Improved
Base
listener. - Fixed another bug in the
WIP
listener. - Removed previously deprecated
Dual
listener (should useBase
listener now).
v0.5.0
- Added support for Socket Mode in a separate package: slack-php/slack-php-socket-mode.
- Removed
SensitiveValue
code and logic. Was unused by framework and not something we want to support externally. - Added
InputState
helper class to assist in extracting submitted data fromview_submission
into a flat associative array structure and simplify the non-uniform input types. - Fixed a bug in the
Chain
interceptor that was preventing interceptors from firing more than once in Socket Mode. - Added the
Base
listener, which is an improvement onDual
listener. - Deprecated the
Dual
listener (should useBase
listener now). - Fixed a bug in the
WIP
listener.
v0.4.0
- Fixed a bug with
App::viewSubmissionAsync()
. - Updated
Context::home()
for better support when working with App Home surfaces:- Allows specifying the user now via the 2nd parameter, instead of only being able to use the current user.
- Allows specifying whether to include the
hash
via the 3rd parameter for better control over handling race conditions. - Bumped up the version requirement for
slack-php/slack-block-kit
to0.19.0
which allows you to set all the supported fields (includingprivate_metadata
) on App Home surfaces. - Updated
Payload::getMetadata()
to work correctly for extracting data from theapp_home_opened
event.
- Updated the
HasData
trait (part ofContext
, to make the generalget*()
functions less restrictive on return type. - Added a
timestamp
value to theContext
(for HTTP server) that holds the request timestamp value provided by Slack.- This could potentially be used to determine how close you are to the ack/
trigger_id
timeout.
- This could potentially be used to determine how close you are to the ack/
v0.3.0
This release contains updates made while dogfooding.
- Improved
Router
:- Added
viewSubmissionAsync
to routing (available via eitherApp
orRouter
). I found myself unexpectedly needing this while dogfooding.
- Added
- Improved
Context
object:- Added
Context::getAppConfig()
andContext::getApiClient()
getters toContext
. Seemed useful while dogfooding to have these. - Added support for
Surface
factories (i.e.,callable
s that returnSurface
s) to methods accepting surfaces like:ack()
,respond()
,say()
,home()
,modals()
, andview()
. Applies to anything calling theCoerce
methods forSurface
s.
- Added
- Improve
Payload
object:- Added
HasData::getAllOf()
method, which also applies to thePayload
. - Updated
Payload::getMetadata()
to return an emptyPrivateMetadata
object when metadata isnull
, instead of throwing an exception. - Added
Payload::getResponseUrl()
for abstracting the process of getting theresponse_url
from the payload. Works forview_submission
payloads too, whereresponse_urls
are created from Conversation or Channel Select inputs.
- Added
- Added some new
Listeners
:Dual
- An abstractListener
you can extend to provide both sync/pre-Ack and async/post-Ack logic.WIP
- A stub-likeListener
that outputs "Work in progress" in the best way (e.g., message, modal, log) available for the current interaction type.
- Improved logging:
- (BC) Renamed
SlackLogger::addData()
to SlackLogger::addContext()` because it fit with PSR-3 nomenclature better. - Added the ability to add and get context data with the base
Exception
class via::addContext()
and::getContext()
, respectively. - Improve
StderrLogger
to include context from the exception, when available.
- (BC) Renamed
- Improved
CommandRouter
:- (BC) Renamed the default
list
command inCommandRouter
tohelp
. - Added support for custom default commands by using
'*'
or theCommandRouter::withDefault()
command. - (BC) Renamed
CommandRouter::description()
towithDescription()
.
- (BC) Renamed the default
- Improved
Deferrers
:- Fixed a couple of issues with
DeferredContextCliServer
while dogfooding. - Fixed
ShellExecDeferrer
so that it allows logging viastderr
.
- Fixed a couple of issues with
v0.2.0
- Improved
AppServer
implementations:- Added overrideable
init()
method to assist in initialization since constructor is final. - Added support for setting AppCredentials on the base AppServer.
- Added overrideable
- Improved
Deferrer
implementations:- Moved
PreAckDeferrer
to newDeferral
namespace. - Added
ShellExecDeferrer
to allow deferring via a backgroundshell_exec
call. - Added
DeferredContextCliServer
for processing deferredContext
s via CLI. - Fixed initialization bug in
Ack
listener.
- Moved
- Improved
MultiTenantHttpServer
implementation:- Added support for more lenient/intuitive app registrations.
- Added
Coerce::application()
helper.
- Improved
Auth
components:- Fixed bug in
AuthMiddleware
that validated credentials too early. - Updated
AppCredentials::supports*()
methods. - Added missing
App::withBotToken()
method.
- Fixed bug in
v0.1.2
- Fixes
AppCredentials::fromEnv()
to handlenull
values.
v0.1.1
- Replaced
jeremeamia/slack-block-kit
with the new version:slack-php/slack-block-kit