Renamed GuzzleServiceProvider to HttpClientServiceProvider, fixed translation and import error

This commit is contained in:
Igor Scheller 2019-12-01 22:10:10 +01:00
parent 47e209e125
commit 064a175027
5 changed files with 9 additions and 8 deletions

View File

@ -31,7 +31,7 @@ return [
// Additional services
\Engelsystem\Helpers\VersionServiceProvider::class,
\Engelsystem\Mail\MailerServiceProvider::class,
\Engelsystem\Http\GuzzleServiceProvider::class,
\Engelsystem\Http\HttpClientServiceProvider::class,
],
// Application middleware

View File

@ -451,13 +451,14 @@ class ImportSchedule extends BaseController
$guid = $shift->guid;
$shift = $this->loadShift($shift->shift_id);
$event = $scheduleEvents[$guid];
$room = $rooms->where('name', $event->getRoom()->getName())->first();
if (
$shift->title != $event->getTitle()
|| $shift->shift_type_id != $shiftType
|| Carbon::createFromTimestamp($shift->start) != $event->getDate()
|| Carbon::createFromTimestamp($shift->end) != $event->getEndDate()
|| $shift->room_id != $rooms->where('name', $event->getRoom()->getName())->first()->id
|| $shift->room_id != ($room->id ?? '')
|| $shift->url != $event->getUrl()
) {
$changeEvents[$guid] = $event;

View File

@ -2817,7 +2817,7 @@ msgid "schedule.import.title"
msgstr "Programm importieren"
msgid "schedule.import.text"
msgstr "Dieser Import erstellt Räume and erstellt, aktualisiert und löscht Schichten anhand des schedule.xml exportes."
msgstr "Dieser Import erstellt Räume und erstellt, aktualisiert und löscht Schichten anhand des schedule.xml exportes."
msgid "schedule.import.load.title"
msgstr "Programm importieren: Vorschau"

View File

@ -5,7 +5,7 @@ namespace Engelsystem\Http;
use Engelsystem\Container\ServiceProvider;
use GuzzleHttp\Client as GuzzleClient;
class GuzzleServiceProvider extends ServiceProvider
class HttpClientServiceProvider extends ServiceProvider
{
public function register()
{

View File

@ -3,20 +3,20 @@
namespace Engelsystem\Test\Unit\Http;
use Engelsystem\Application;
use Engelsystem\Http\GuzzleServiceProvider;
use Engelsystem\Http\HttpClientServiceProvider;
use Engelsystem\Test\Unit\ServiceProviderTest;
use GuzzleHttp\Client as GuzzleClient;
class GuzzleServiceProviderTest extends ServiceProviderTest
class HttpClientServiceProviderTest extends ServiceProviderTest
{
/**
* @covers \Engelsystem\Http\GuzzleServiceProvider::register
* @covers \Engelsystem\Http\HttpClientServiceProvider::register
*/
public function testRegister()
{
$app = new Application();
$serviceProvider = new GuzzleServiceProvider($app);
$serviceProvider = new HttpClientServiceProvider($app);
$serviceProvider->register();
/** @var GuzzleClient $guzzle */