承接 marshmallow/slack-extended-envoy 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

marshmallow/slack-extended-envoy

Composer 安装命令:

composer require marshmallow/slack-extended-envoy

包简介

Rich Text notification for Laravel Envoy

README 文档

README

alt text

Slack Extended for Laravel Envoy

Latest Version on Packagist Total Downloads

Rich Text notification for Laravel Envoy.

This package sends a richly formatted Slack message from your Laravel Envoy deployment scripts. Instead of a plain line of text, it posts a Slack Block Kit attachment with a colored success/failure header, the release number, deployment details (host, branch, PHP version, the user who triggered the deploy) and a button linking back to GitHub.

Installation

Install the package via Composer:

composer require marshmallow/slack-extended-envoy

Usage

The entry point is the Marshmallow\SlackExtended\SlackExtended class. Build a message with make(), optionally set the failing task with task(), and call send() to post it to your Slack Incoming Webhook.

use Marshmallow\SlackExtended\SlackExtended;

SlackExtended::make(
    hook: 'https://hooks.slack.com/services/XXX/YYY/ZZZ',
    channel: '#deployments',
    options: [
        'host'        => 'production',
        'release'     => '20260611120000',
        'user'        => 'stefvanesch',
        'branch'      => 'main',
        'php_version' => '8.5',
        'github_url'  => 'https://github.com/marshmallow-packages/slack-extended-envoy',
    ],
    success: true,
)->send();

Constructor / make() arguments

Argument Type Default Description
hook string The Slack Incoming Webhook URL to post the message to.
channel mixed '' The Slack channel the message is posted to.
options array [] The deployment details rendered in the message (see below). When empty, a set of placeholder values is used.
success bool false Whether the deployment succeeded. Controls the header text, color (green/red) and image.

The options array is rendered into the message body and recognises these keys:

Key Description
host The host the deployment ran on.
release The release number, shown as #{release}.
user The user that triggered the deployment. Known handles (LTKort, stefvanesch, lucienversendaal) are mapped to a Slack mention; others render as "Unknown user".
branch The branch that was deployed.
php_version The PHP version used for the deployment.
github_url The URL the "View" button links to.

Reporting the failing task

When a deployment fails, use task() to include the name of the task that failed in the message. task() is chainable and returns the instance:

use Marshmallow\SlackExtended\SlackExtended;

SlackExtended::make($hook, $channel, $options, success: false)
    ->task('deploy')
    ->send();

Using it from Envoy

Call the package from your Envoy.blade.php deployment hooks, for example in @error and @finished:

@finished
    @php
        \Marshmallow\SlackExtended\SlackExtended::make(
            $slackHook,
            '#deployments',
            $options,
            success: true,
        )->send();
    @endphp
@endfinished

Credits

Security Vulnerabilities

Please report security vulnerabilities by email rather than via the public issue tracker.

License

The MIT License. Please see the License File for more information.

marshmallow/slack-extended-envoy 适用场景与选型建议

marshmallow/slack-extended-envoy 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.93k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 05 月 08 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 marshmallow/slack-extended-envoy 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 marshmallow/slack-extended-envoy 我们能提供哪些服务?
定制开发 / 二次开发

基于 marshmallow/slack-extended-envoy 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 3.93k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 13
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-05-08