mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-26 08:05:53 +03:00
[PR #801] [MERGED] Add fluent setters for parameters in the slack handler #1356
Labels
No labels
Bug
Documentation
Feature
Needs Work
Support
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/monolog#1356
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Seldaek/monolog/pull/801
Author: @EspadaV8
Created: 5/31/2016
Status: ✅ Merged
Merged: 7/6/2019
Merged by: @Seldaek
Base:
master← Head:add-fluent-setters-for-slack-handler📝 Commits (1)
c9d15bbAdd fluent setters for parameters in the slack handler📊 Changes
2 files changed (+210 additions, -17 deletions)
View changed files
📝
src/Monolog/Handler/Slack/SlackRecord.php(+122 -17)📝
src/Monolog/Handler/SlackHandler.php(+88 -0)📄 Description
The current slack handler has way too many constructor parameters and no clear order as to their position. This makes it confusing to work out what is actually trying to be set when constructing a new class, e.g,
This PR makes things a bit easier by adding some fluent setters into the class.
It would be nice to cut back the number of constructor parameters and reorder them to make a bit more sense
Since that would be a fairly major breaking change though I've not included it in this PR. If it would be okay to do in another PR I'll open one up for it.
I've included scalar type hints for the methods because the file include the
declare(strict_types=1);which is only valid for PHP7 so I assume that is okay. If not then I can easily remove them.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.