Skip to content

Commit

Permalink
Redundant class removed #345 #344
Browse files Browse the repository at this point in the history
Redundant class `ClientManager::class` removed and config handling moved to depending library "webklex/php-imap" #345 #344
  • Loading branch information
Webklex committed Oct 8, 2020
1 parent 706d6c7 commit 3950cc2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 139 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip
### Breaking changes
- NaN

## [2.1.0] - 2020-10-08
### Fixed
- Redundant class `ClientManager::class` removed and config handling moved to depending library "webklex/php-imap" #345 #344

### Breaking changes
- `\Webklex\IMAP\ClientManager::class` no longer exists. Please use the `\Webklex\IMAP\Facades\Client::class` facade or `\Webklex\PHPIMAP\ClientManager::class` instead.

## [2.0.2] - 2020-09-23
### Fixed
- Missing default config parameter added (#337)
Expand Down
134 changes: 0 additions & 134 deletions src/ClientManager.php

This file was deleted.

2 changes: 1 addition & 1 deletion src/Facades/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
namespace Webklex\IMAP\Facades;

use Illuminate\Support\Facades\Facade;
use Webklex\IMAP\ClientManager;
use Webklex\PHPIMAP\ClientManager;

/**
* Class Client
Expand Down
8 changes: 4 additions & 4 deletions src/Providers/LaravelServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
namespace Webklex\IMAP\Providers;

use Illuminate\Support\ServiceProvider;
use Webklex\IMAP\ClientManager;
use Webklex\PHPIMAP\ClientManager;
use Webklex\PHPIMAP\Client;

/**
Expand All @@ -40,15 +40,15 @@ public function boot() {
* @return void
*/
public function register() {
$this->setVendorConfig();

$this->app->singleton(ClientManager::class, function($app) {
return new ClientManager($app);
return new ClientManager($app['config']["imap"]);
});

$this->app->singleton(Client::class, function($app) {
return $app[ClientManager::class]->account();
});

$this->setVendorConfig();
}

/**
Expand Down

0 comments on commit 3950cc2

Please sign in to comment.