Skip to content
This repository was archived by the owner on Nov 6, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
.php_cs.cache
/composer.lock
/vendor/
/.php_cs.cache
/.phpunit.result.cache
16 changes: 8 additions & 8 deletions .php_cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ $headerPhpDoc = "This file is part of the WoW-Apps/Symfony-Slack-Bot bundle for
. "\n"
. "Author Alexey Samara <lion.samara@gmail.com>\n"
. "\n"
. "Copyright 2016 WoW-Apps.";
. "Copyright 2016 - " . date("Y") . " WoW-Apps.";

return PhpCsFixer\Config::create()
->setRules([
Expand Down Expand Up @@ -49,11 +49,11 @@ return PhpCsFixer\Config::create()
'no_spaces_around_offset' => ['positions' => ['inside', 'outside']],
])
->setFinder(PhpCsFixer\Finder::create()
->exclude('vendor')
->exclude('var')
->exclude('.github')
->exclude('config')
->exclude('public')
->exclude('docker')
->exclude('bin')
->exclude('.githooks')
->in(__DIR__ . '/../../../')
);
->exclude('var')
->exclude('vendor')
->in(__DIR__)
)
;
4 changes: 2 additions & 2 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
filter:
excluded_paths: [Tests/*]
excluded_paths: [tests/*]

checks:
php:
Expand All @@ -24,7 +24,7 @@ build:
php: 7.1.12
dependencies:
before:
- composer require phpunit/phpunit:^7.1 --dev
- composer require phpunit/phpunit:^7.5 --dev
tests:
override:
-
Expand Down
14 changes: 7 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ matrix:
fast_finish: true
include:
- php: 7.1
env: SYMFONY_VERSION="3.0.*"
env: SYMFONY_VERSION="4.0.*"
- php: 7.1
env: SYMFONY_VERSION="3.1.*"
env: SYMFONY_VERSION="4.1.*"
- php: 7.1
env: SYMFONY_VERSION="3.2.*"
env: SYMFONY_VERSION="4.2.*"
- php: 7.1
env: SYMFONY_VERSION="3.3.*"
env: SYMFONY_VERSION="4.3.*"
- php: 7.1
env: SYMFONY_VERSION="3.4.*"
env: SYMFONY_VERSION="4.4.*"
- php: 7.1
env: SYMFONY_VERSION="4.0.*"
env: SYMFONY_VERSION="5.0.*"
- php: 7.1
env: SYMFONY_VERSION="4.1.*"
env: SYMFONY_VERSION="5.1.*"

before_install:
- if [ "$DEPENDENCIES" = "beta" ]; then composer config minimum-stability beta; fi;
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2016 Alexey Samara
Copyright (c) 2016 - 2020 Alexey Samara

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
[![Scrutinizer Build](https://img.shields.io/scrutinizer/build/g/wow-apps/symfony-slack-bot.svg?style=popout&label=Scrutinizer%20build)](https://scrutinizer-ci.com/g/wow-apps/symfony-slack-bot/?branch=master)
[![ContinuousPHP Build](https://img.shields.io/continuousphp/git-hub/wow-apps/symfony-slack-bot/master.svg?style=popout&label=ContinuousPHP%20build)](https://app.continuousphp.com/git-hub/wow-apps/symfony-slack-bot)

[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/wow-apps/symfony-slack-bot.svg?style=popout&label=Code%20coverage)](https://scrutinizer-ci.com/g/wow-apps/symfony-slack-bot/?branch=master)

> Version 5 is coming this November. It will require PHP 7.1 and support Symfony 4 and 5 (Symfony 3 users can stay on version 4 of bundle)
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/wow-apps/symfony-slack-bot.svg?style=popout&label=Code%20coverage)](https://scrutinizer-ci.com/g/wow-apps/symfony-slack-bot/?branch=master)

# Symfony Slack Bot

Expand Down
28 changes: 18 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
"name": "wow-apps/symfony-slack-bot",
"license": "MIT",
"description": "Simple Symfony 3 and 4 Bundle for sending customizeable messages to Slack via incoming webhooks",
"description": "Symfony (3, 4, 5) Bundle for sending customizeable messages to Slack via incoming webhooks",
"type": "symfony-bundle",
"keywords": [
"slack",
"slack bot",
"slackbot",
"symfony",
"symfony 3",
"symfony 4"
"symfony 4",
"symfony 5"
],
"homepage": "https://wow-apps.github.io/symfony-slack-bot/",
"authors": [
Expand All @@ -26,13 +27,16 @@
"source": "https://github.com/wow-apps/symfony-slack-bot"
},
"require": {
"php": "^7.0",
"php": "^7.1",
"ext-json": "*",
"ext-ctype": "*",
"ext-iconv": "*",
"psr/log": "^1.1",
"symfony/framework-bundle": "^3.0 || ^4.0",
"symfony/http-foundation": "^3.0 || ^4.0",
"symfony/yaml": "^3.0 || ^4.0",
"guzzlehttp/guzzle": "^6.0"
"symfony/framework-bundle": "^4.1.12 || ^5.0",
"symfony/console": "^4.0 || ^5.0",
"symfony/http-foundation": "^4.2.12 || ^5.0",
"symfony/yaml": "^4.0 || ^5.0",
"guzzlehttp/guzzle": "^6.5"
},
"require-dev": {
"phpunit/phpunit": "^7.5",
Expand All @@ -43,11 +47,15 @@
},
"autoload": {
"psr-4": {
"WowApps\\SlackBundle\\": "",
"WowApps\\SlackBundle\\Tests\\": "tests/"
"WowApps\\SlackBundle\\": "src/"
},
"exclude-from-classmap": [
"/Tests/"
"tests/"
]
},
"autoload-dev": {
"psr-4": {
"WowApps\\SlackBundle\\Tests\\": "tests/"
}
}
}
8 changes: 4 additions & 4 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="../../../vendor/autoload.php"
bootstrap="./vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
Expand All @@ -15,15 +15,15 @@

<testsuites>
<testsuite name="Symfony Slack Bot Test Suite">
<directory>./Tests/</directory>
<directory>./tests/</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory>./</directory>
<directory>./src/</directory>
<exclude>
<directory>./Tests</directory>
<directory>./tests</directory>
</exclude>
</whitelist>
</filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* Author Alexey Samara <lion.samara@gmail.com>
*
* Copyright 2016 WoW-Apps.
* Copyright 2016 - 2020 WoW-Apps.
*/

namespace WowApps\SlackBundle\Command;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* Author Alexey Samara <lion.samara@gmail.com>
*
* Copyright 2016 WoW-Apps.
* Copyright 2016 - 2020 WoW-Apps.
*/

namespace WowApps\SlackBundle\DependencyInjection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* Author Alexey Samara <lion.samara@gmail.com>
*
* Copyright 2016 WoW-Apps.
* Copyright 2016 - 2020 WoW-Apps.
*/

namespace WowApps\SlackBundle\DependencyInjection;
Expand Down
6 changes: 3 additions & 3 deletions Entity/Attachment.php → src/Entity/Attachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* Author Alexey Samara <lion.samara@gmail.com>
*
* Copyright 2016 WoW-Apps.
* Copyright 2016 - 2020 WoW-Apps.
*/

namespace WowApps\SlackBundle\Entity;
Expand Down Expand Up @@ -108,8 +108,8 @@ public function __construct(
string $footerIconUrl = '',
string $fallback = '',
int $timestamp = 0,
array $fields = [],
array $actions = []
array $fields = [],
array $actions = []
) {
$this->color = $color;
$this->pretext = $pretext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* Author Alexey Samara <lion.samara@gmail.com>
*
* Copyright 2016 WoW-Apps.
* Copyright 2016 - 2020 WoW-Apps.
*/

namespace WowApps\SlackBundle\Entity;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* Author Alexey Samara <lion.samara@gmail.com>
*
* Copyright 2016 WoW-Apps.
* Copyright 2016 - 2020 WoW-Apps.
*/

namespace WowApps\SlackBundle\Entity;
Expand Down Expand Up @@ -53,7 +53,7 @@ class AttachmentActionConfirm
* @param string $buttonDismissText
*/
public function __construct(
bool $active = false,
bool $active = false,
string $title = '',
string $text = '',
string $buttonOkText = self::BUTTON_DEFAULT_TEXT_OK,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* Author Alexey Samara <lion.samara@gmail.com>
*
* Copyright 2016 WoW-Apps.
* Copyright 2016 - 2020 WoW-Apps.
*/

namespace WowApps\SlackBundle\Entity;
Expand Down
11 changes: 8 additions & 3 deletions Entity/SlackMessage.php → src/Entity/SlackMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* Author Alexey Samara <lion.samara@gmail.com>
*
* Copyright 2016 WoW-Apps.
* Copyright 2016 - 2020 WoW-Apps.
*/

namespace WowApps\SlackBundle\Entity;
Expand All @@ -28,6 +28,7 @@ class SlackMessage

/**
* @deprecated
*
* @var string
*/
private $channel;
Expand Down Expand Up @@ -64,8 +65,8 @@ public function __construct(
string $channel = '',
string $iconUrl = '',
string $iconEmoji = '',
bool $markdown = true,
array $attachments = []
bool $markdown = true,
array $attachments = []
) {
$this->text = $text;
$this->username = $username;
Expand Down Expand Up @@ -102,7 +103,9 @@ public function setUsername(string $username): SlackMessage

/**
* Returns the name of channel where the message will be sent.
*
* @deprecated
*
* @return string
*/
public function getChannel(): string
Expand All @@ -112,7 +115,9 @@ public function getChannel(): string

/**
* Set the name of channel where the message will be sent.
*
* @deprecated
*
* @param string $channel
*
* @return SlackMessage
Expand Down
2 changes: 1 addition & 1 deletion Entity/Workspace.php → src/Entity/Workspace.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* Author Alexey Samara <lion.samara@gmail.com>
*
* Copyright 2016 WoW-Apps.
* Copyright 2016 - 2020 WoW-Apps.
*/

namespace WowApps\SlackBundle\Entity;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* Author Alexey Samara <lion.samara@gmail.com>
*
* Copyright 2016 WoW-Apps.
* Copyright 2016 - 2020 WoW-Apps.
*/

namespace WowApps\SlackBundle\Exception;
Expand Down
2 changes: 1 addition & 1 deletion Service/SlackBot.php → src/Service/SlackBot.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* Author Alexey Samara <lion.samara@gmail.com>
*
* Copyright 2016 WoW-Apps.
* Copyright 2016 - 2020 WoW-Apps.
*/

namespace WowApps\SlackBundle\Service;
Expand Down
2 changes: 1 addition & 1 deletion Service/SlackColor.php → src/Service/SlackColor.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* Author Alexey Samara <lion.samara@gmail.com>
*
* Copyright 2016 WoW-Apps.
* Copyright 2016 - 2020 WoW-Apps.
*/

namespace WowApps\SlackBundle\Service;
Expand Down
2 changes: 1 addition & 1 deletion Service/SlackEmoji.php → src/Service/SlackEmoji.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* Author Alexey Samara <lion.samara@gmail.com>
*
* Copyright 2016 WoW-Apps.
* Copyright 2016 - 2020 WoW-Apps.
*/

namespace WowApps\SlackBundle\Service;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* Author Alexey Samara <lion.samara@gmail.com>
*
* Copyright 2016 WoW-Apps.
* Copyright 2016 - 2020 WoW-Apps.
*/

namespace WowApps\SlackBundle\Service;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* Author Alexey Samara <lion.samara@gmail.com>
*
* Copyright 2016 WoW-Apps.
* Copyright 2016 - 2020 WoW-Apps.
*/

namespace WowApps\SlackBundle\Service;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* Author Alexey Samara <lion.samara@gmail.com>
*
* Copyright 2016 WoW-Apps.
* Copyright 2016 - 2020 WoW-Apps.
*/

namespace WowApps\SlackBundle\Service;
Expand Down
Loading