Closed seyfer closed 7 years ago
The Laravel framework should be separated from the core functionality.
This is plugin for irazasyed/elegram-bot-sdk and this library not require use of Laravel.
Laravel should be an option, not requirement or dependency.
For example
/** * Class Dialogs * @package BotDialogs */ class Dialogs ... /** * @param Api $telegram * @param Redis $redis */ public function __construct(Api $telegram, Redis $redis)
Depends on
use Illuminate\Redis\Database as Redis; use Illuminate\Support\Facades\Config;
Redis and Config should be replaced with independent realization and usage of Illuminate packages should be only an option. It should look like
/** * @param ApiInterface $telegram * @param RedisInterface $redis */ public function __construct(ApiInterface $telegram, RedisInterface $redis)
In this case developer could use Dialogues in any framework with own implementation of Interfaces.
I responded in #5. You right, it would be better to remove dependencies. I'll take care about refactoring a little bit later.
Conversation moved to #7
The Laravel framework should be separated from the core functionality.
This is plugin for irazasyed/elegram-bot-sdk and this library not require use of Laravel.
Laravel should be an option, not requirement or dependency.
For example
Depends on
Redis and Config should be replaced with independent realization and usage of Illuminate packages should be only an option. It should look like
In this case developer could use Dialogues in any framework with own implementation of Interfaces.