{"id":14984047,"url":"https://github.com/symfony/slack-notifier","last_synced_at":"2026-01-24T18:04:43.748Z","repository":{"id":44440238,"uuid":"212991179","full_name":"symfony/slack-notifier","owner":"symfony","description":"Symfony Slack Notifier Bridge","archived":false,"fork":false,"pushed_at":"2025-12-19T08:35:58.000Z","size":216,"stargazers_count":43,"open_issues_count":0,"forks_count":11,"subscribers_count":4,"default_branch":"7.3","last_synced_at":"2025-12-22T02:51:37.096Z","etag":null,"topics":["component","notifier","php","slack","symfony","symfony-component"],"latest_commit_sha":null,"homepage":"https://symfony.com/notifier","language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/symfony.png","metadata":{"funding":{"github":["fabpot","nicolas-grekas"],"custom":"https://symfony.com/sponsor","tidelift":"packagist/symfony/symfony"},"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-10-05T11:55:37.000Z","updated_at":"2025-10-02T19:52:52.000Z","dependencies_parsed_at":"2023-10-01T18:57:57.318Z","dependency_job_id":"3f97b644-64ef-4c85-9562-4c69add78237","html_url":"https://github.com/symfony/slack-notifier","commit_stats":{"total_commits":127,"total_committers":33,"mean_commits":"3.8484848484848486","dds":0.7480314960629921,"last_synced_commit":"452a17e3935192e6a9a5b16f0443911d67e456af"},"previous_names":[],"tags_count":126,"template":false,"template_full_name":null,"purl":"pkg:github/symfony/slack-notifier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symfony%2Fslack-notifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symfony%2Fslack-notifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symfony%2Fslack-notifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symfony%2Fslack-notifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/symfony","download_url":"https://codeload.github.com/symfony/slack-notifier/tar.gz/refs/heads/7.3","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symfony%2Fslack-notifier/sbom","scorecard":{"id":863038,"data":{"date":"2025-08-11","repo":{"name":"github.com/symfony/slack-notifier","commit":"802d7ae6701db205edbf8b29a7e338ecce62f8e2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch '7.3'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/symfony/.github/SECURITY.md:1","Info: Found linked content: github.com/symfony/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/symfony/.github/SECURITY.md:1","Info: Found text in security policy: github.com/symfony/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}}]},"last_synced_at":"2025-08-24T01:55:50.485Z","repository_id":44440238,"created_at":"2025-08-24T01:55:50.486Z","updated_at":"2025-08-24T01:55:50.486Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28733413,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T17:51:25.893Z","status":"ssl_error","status_checked_at":"2026-01-24T17:50:48.377Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["component","notifier","php","slack","symfony","symfony-component"],"created_at":"2024-09-24T14:08:22.390Z","updated_at":"2026-01-24T18:04:43.732Z","avatar_url":"https://github.com/symfony.png","language":"PHP","funding_links":["https://github.com/sponsors/fabpot","https://github.com/sponsors/nicolas-grekas","https://symfony.com/sponsor","https://tidelift.com/funding/github/packagist/symfony/symfony"],"categories":[],"sub_categories":[],"readme":"Slack Notifier\n==============\n\nProvides [Slack](https://slack.com) integration for Symfony Notifier.\n\nDSN example\n-----------\n\n```\nSLACK_DSN=slack://TOKEN@default?channel=CHANNEL\n```\n\nwhere:\n - `TOKEN` is your Bot User OAuth Access Token (they begin with `xoxb-`)\n - `CHANNEL` is a channel, private group, or IM channel to send message to, it can be an encoded ID, or a name.\n\nvalid DSN's are:\n```\nSLACK_DSN=slack://xoxb-......@default?channel=my-channel-name\nSLACK_DSN=slack://xoxb-......@default?channel=@fabien\n```\n\ninvalid DSN's are:\n```\nSLACK_DSN=slack://xoxb-......@default?channel=#my-channel-name\nSLACK_DSN=slack://xoxb-......@default?channel=fabien\n```\n\nAdding Interactions to a Message\n--------------------------------\n\nWith a Slack message, you can use the `SlackOptions` class to add some\ninteractive options called [Block elements](https://api.slack.com/reference/block-kit/block-elements).\n\n```php\nuse Symfony\\Component\\Notifier\\Bridge\\Slack\\Block\\SlackActionsBlock;\nuse Symfony\\Component\\Notifier\\Bridge\\Slack\\Block\\SlackDividerBlock;\nuse Symfony\\Component\\Notifier\\Bridge\\Slack\\Block\\SlackImageBlockElement;\nuse Symfony\\Component\\Notifier\\Bridge\\Slack\\Block\\SlackSectionBlock;\nuse Symfony\\Component\\Notifier\\Bridge\\Slack\\SlackOptions;\nuse Symfony\\Component\\Notifier\\Message\\ChatMessage;\n\n$chatMessage = new ChatMessage('Contribute To Symfony');\n\n// Create Slack Actions Block and add some buttons\n$contributeToSymfonyBlocks = (new SlackActionsBlock())\n    -\u003ebutton(\n        'Improve Documentation',\n        'https://symfony.com/doc/current/contributing/documentation/standards.html',\n        'primary'\n    )\n    -\u003ebutton(\n        'Report bugs',\n        'https://symfony.com/doc/current/contributing/code/bugs.html',\n        'danger'\n    );\n\n$slackOptions = (new SlackOptions())\n    -\u003eblock((new SlackSectionBlock())\n        -\u003etext('The Symfony Community')\n        -\u003eaccessory(\n            new SlackImageBlockElement(\n                'https://symfony.com/favicons/apple-touch-icon.png',\n                'Symfony'\n            )\n        )\n    )\n    -\u003eblock(new SlackDividerBlock())\n    -\u003eblock($contributeToSymfonyBlocks);\n\n// Add the custom options to the chat message and send the message\n$chatMessage-\u003eoptions($slackOptions);\n\n$chatter-\u003esend($chatMessage);\n```\n\nAlternatively, a single button can be added to a section using the `accessory()` method and the `SlackButtonBlockElement` class.\n\n```php\nuse Symfony\\Component\\Notifier\\Bridge\\Slack\\Block\\SlackButtonBlockElement;\nuse Symfony\\Component\\Notifier\\Bridge\\Slack\\Block\\SlackDividerBlock;\nuse Symfony\\Component\\Notifier\\Bridge\\Slack\\Block\\SlackSectionBlock;\nuse Symfony\\Component\\Notifier\\Bridge\\Slack\\SlackOptions;\nuse Symfony\\Component\\Notifier\\Message\\ChatMessage;\n\n$chatMessage = new ChatMessage('Contribute To Symfony');\n\n$slackOptions = (new SlackOptions())\n    -\u003eblock((new SlackSectionBlock())\n        -\u003etext('Symfony Framework')\n        -\u003eaccessory(\n            new SlackButtonBlockElement(\n                'Report bugs',\n                'https://symfony.com/doc/current/contributing/code/bugs.html',\n                'danger'\n            )\n        )\n    )\n    -\u003eblock(new SlackDividerBlock())\n    -\u003eblock((new SlackSectionBlock())\n        -\u003etext('Symfony Documentation')\n        -\u003eaccessory(\n            new SlackButtonBlockElement(\n                'Improve Documentation',\n                'https://symfony.com/doc/current/contributing/documentation/standards.html',\n                'primary'\n            )\n        )\n    );\n\n// Add the custom options to the chat message and send the message\n$chatMessage-\u003eoptions($slackOptions);\n\n$chatter-\u003esend($chatMessage);\n```\n\nAdding Fields and Values to a Message\n-------------------------------------\n\nTo add fields and values to your message you can use the `field()` method.\n\n```php\nuse Symfony\\Component\\Notifier\\Bridge\\Slack\\Block\\SlackDividerBlock;\nuse Symfony\\Component\\Notifier\\Bridge\\Slack\\Block\\SlackSectionBlock;\nuse Symfony\\Component\\Notifier\\Bridge\\Slack\\SlackOptions;\nuse Symfony\\Component\\Notifier\\Message\\ChatMessage;\n\n$chatMessage = new ChatMessage('Symfony Feature');\n\n$options = (new SlackOptions())\n    -\u003eblock((new SlackSectionBlock())-\u003etext('My message'))\n    -\u003eblock(new SlackDividerBlock())\n    -\u003eblock(\n        (new SlackSectionBlock())\n            -\u003efield('*Max Rating*')\n            -\u003efield('5.0')\n            -\u003efield('*Min Rating*')\n            -\u003efield('1.0')\n    );\n\n// Add the custom options to the chat message and send the message\n$chatMessage-\u003eoptions($options);\n\n$chatter-\u003esend($chatMessage);\n```\n\nDefine text objects properties\n------------------------------\n\n[Text objects properties](https://api.slack.com/reference/block-kit/composition-objects#text) can be set on any `text()` or `field()` method :\n\n```php\nuse Symfony\\Component\\Notifier\\Bridge\\Slack\\Block\\SlackSectionBlock;\nuse Symfony\\Component\\Notifier\\Bridge\\Slack\\SlackOptions;\nuse Symfony\\Component\\Notifier\\Message\\ChatMessage;\n\n$chatMessage = new ChatMessage('Slack Notifier');\n\n$options = (new SlackOptions())\n    -\u003eblock(\n        (new SlackSectionBlock())\n            -\u003efield('My **Markdown** content with clickable URL : symfony.com') // Markdown content (default)\n            -\u003efield('*Plain text content*', markdown: false) // Plain text content\n            -\u003efield('Not clickable URL : symfony.com', verbatim: true) // Only for markdown content\n            -\u003efield('Thumbs up emoji code is :thumbsup: ', emoji: false) // Only for plain text content\n    );\n\n// Add the custom options to the chat message and send the message\n$chatMessage-\u003eoptions($options);\n\n$chatter-\u003esend($chatMessage);\n```\n\n\nAdding a Header to a Message\n----------------------------\n\nTo add a header to your message use the `SlackHeaderBlock` class.\n\n```php\nuse Symfony\\Component\\Notifier\\Bridge\\Slack\\Block\\SlackDividerBlock;\nuse Symfony\\Component\\Notifier\\Bridge\\Slack\\Block\\SlackHeaderBlock;\nuse Symfony\\Component\\Notifier\\Bridge\\Slack\\Block\\SlackSectionBlock;\nuse Symfony\\Component\\Notifier\\Bridge\\Slack\\SlackOptions;\nuse Symfony\\Component\\Notifier\\Message\\ChatMessage;\n\n$chatMessage = new ChatMessage('Symfony Feature');\n\n$options = (new SlackOptions())\n    -\u003eblock((new SlackHeaderBlock('My Header')))\n    -\u003eblock((new SlackSectionBlock())-\u003etext('My message'))\n    -\u003eblock(new SlackDividerBlock())\n    -\u003eblock(\n        (new SlackSectionBlock())\n            -\u003efield('*Max Rating*')\n            -\u003efield('5.0')\n            -\u003efield('*Min Rating*')\n            -\u003efield('1.0')\n    );\n\n// Add the custom options to the chat message and send the message\n$chatMessage-\u003eoptions($options);\n\n$chatter-\u003esend($chatMessage);\n```\n\nAdding a Footer to a Message\n----------------------------\n\nTo add a header to your message use the `SlackContextBlock` class.\n\n```php\nuse Symfony\\Component\\Notifier\\Bridge\\Slack\\Block\\SlackContextBlock;\nuse Symfony\\Component\\Notifier\\Bridge\\Slack\\Block\\SlackDividerBlock;\nuse Symfony\\Component\\Notifier\\Bridge\\Slack\\Block\\SlackSectionBlock;\nuse Symfony\\Component\\Notifier\\Bridge\\Slack\\SlackOptions;\nuse Symfony\\Component\\Notifier\\Message\\ChatMessage;\n\n$chatMessage = new ChatMessage('Symfony Feature');\n\n$contextBlock = (new SlackContextBlock())\n    -\u003etext('My Context')\n    -\u003eimage('https://symfony.com/logos/symfony_white_03.png', 'Symfony Logo')\n;\n\n$options = (new SlackOptions())\n    -\u003eblock((new SlackSectionBlock())-\u003etext('My message'))\n    -\u003eblock(new SlackDividerBlock())\n    -\u003eblock(\n        (new SlackSectionBlock())\n            -\u003efield('*Max Rating*')\n            -\u003efield('5.0')\n            -\u003efield('*Min Rating*')\n            -\u003efield('1.0')\n    )\n    -\u003eblock($contextBlock)\n;\n\n// Add the custom options to the chat message and send the message\n$chatMessage-\u003eoptions($options);\n\n$chatter-\u003esend($chatMessage);\n```\n\nSending a Message as a Reply\n----------------------------\n\nTo send your Slack message as a reply in a thread use the `threadTs()` method.\n\n```php\nuse Symfony\\Component\\Notifier\\Bridge\\Slack\\Block\\SlackSectionBlock;\nuse Symfony\\Component\\Notifier\\Bridge\\Slack\\SlackOptions;\nuse Symfony\\Component\\Notifier\\Message\\ChatMessage;\n\n$chatMessage = new ChatMessage('Symfony Feature');\n\n$options = (new SlackOptions())\n    -\u003eblock((new SlackSectionBlock())-\u003etext('My reply'))\n    -\u003ethreadTs('1621592155.003100')\n;\n\n// Add the custom options to the chat message and send the message\n$chatMessage-\u003eoptions($options);\n\n$chatter-\u003esend($chatMessage);\n```\n\nUpdating a Slack Message\n------------------------\n\nFirst, save the message ID and channel ID when sending a message:\n\n```php\nuse Symfony\\Component\\Notifier\\Bridge\\Slack\\SlackSentMessage;\nuse Symfony\\Component\\Notifier\\Message\\ChatMessage;\n\n$sentMessage = $chatter-\u003esend(new ChatMessage('Original message'));\n\n// Make sure that Slack transport was used\nif ($sentMessage instanceOf SlackSentMessage) {\n    $messageId = $sentMessage-\u003egetMessageId();\n    $channelId = $sentMessage-\u003egetChannelId();\n}\n```\n\nThen, use that message ID and channel ID to create a new\n``UpdateMessageSlackOptions`` class:\n\n```php\nuse Symfony\\Component\\Notifier\\Bridge\\Slack\\UpdateMessageSlackOptions;\nuse Symfony\\Component\\Notifier\\Message\\ChatMessage;\n\n$options = new UpdateMessageSlackOptions($channelId, $messageId);\n$chatter-\u003esend(new ChatMessage('Updated message', $options));\n```\n\nScheduling a Slack Message\n--------------------------\n\nTo schedule a message to be sent at a later time, use the `postAt()` method:\n\n```php\nuse Symfony\\Component\\Notifier\\Bridge\\Slack\\SlackOptions;\nuse Symfony\\Component\\Notifier\\Message\\ChatMessage;\n\n$options = (new SlackOptions())-\u003epostAt(new \\DateTime('+1 day'));\n\n$chatMessage = new ChatMessage('Symfony Feature');\n$chatMessage-\u003eoptions($options);\n\n$chatter-\u003esend($chatMessage);\n```\n\nResources\n---------\n\n * [Contributing](https://symfony.com/doc/current/contributing/index.html)\n * [Report issues](https://github.com/symfony/symfony/issues) and\n   [send Pull Requests](https://github.com/symfony/symfony/pulls)\n   in the [main Symfony repository](https://github.com/symfony/symfony)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsymfony%2Fslack-notifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsymfony%2Fslack-notifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsymfony%2Fslack-notifier/lists"}